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 TextColor of TextView through Java Code?

How to change TextColor of TextView through Java Code?

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

How to change TextColor of TextView through Java Code?

Postby prajkti.khadse » Wed Apr 01, 2009 2:03 pm

Hi all

i want to change the text color of text in TextView through Java file(not through xml)

i've tried setTextColor(int color) method of TextView class.

but not getting what to provide as the parameter color. :oops:

please help....
prajkti.khadse
Developer
Developer
 
Posts: 32
Joined: Thu Mar 19, 2009 1:01 pm
Location: Bangalore

Top

Postby stifry » Wed Apr 01, 2009 5:37 pm

You have a couple options:

Set the text color using one of the default colors:

Code: Select all
countDownView.setTextColor(Color.GREEN);


or a custom color:

Code: Select all
colorRed = Color.argb(255, 248, 51, 6);

countDownView.setTextColor(colorRed);
Visit Trackaroo.com!
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno
Image Image
User avatar
stifry
Developer
Developer
 
Posts: 46
Joined: Tue Feb 17, 2009 7:50 pm

Postby prajkti.khadse » Thu Apr 02, 2009 4:30 am

hi stifry,

thanks a lot.... it worked.....
prajkti.khadse
Developer
Developer
 
Posts: 32
Joined: Thu Mar 19, 2009 1:01 pm
Location: Bangalore

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests