Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to change the foreground color of a button when it focus

How to change the foreground color of a button when it focus

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to change the foreground color of a button when it focus

Postby silverburgh.meryl » Thu Mar 19, 2009 6:48 pm

Hi,

How can I change the foreground color of a button when it has focus?
In android, the foreground of each Tab change color when it has focus. (black when it has focus, grey when it does not)

how can I achieve that for button?

Thank you.
silverburgh.meryl
Junior Developer
Junior Developer
 
Posts: 23
Joined: Sun Feb 08, 2009 11:17 pm

Top

Postby asolanki » Mon Mar 23, 2009 6:33 am

hi

you can do this by

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/btn_pressed" />
<item android:state_focused="true"
android:drawable="@drawable/btn_selected" />
<item
android:drawable="@drawable/btn_activated" />
</selector>
asolanki
Senior Developer
Senior Developer
 
Posts: 151
Joined: Thu Jan 08, 2009 7:32 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 2 guests