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

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 color of Divider in Listview

how to change the color of Divider in Listview

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

how to change the color of Divider in Listview

Postby nbagade » Wed Jan 20, 2010 4:23 pm

Hi all,

I have ListView having imageview and textview in each List Item.

after each list item divider will display.
I want to change the color of that divider.

any one have idea.?

thanks,
Narendra
nbagade
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Fri Nov 20, 2009 7:49 am
Location: India

Top

Postby dystopia » Thu Jan 21, 2010 7:08 am

Have you tried "android:divider" in your listview's layout?

android:divider="@color/white"
android:dividerHeight="5dip"
User avatar
dystopia
Freshman
Freshman
 
Posts: 2
Joined: Mon Dec 31, 2007 9:55 pm
Location: Silicon Valley

Postby nbagade » Thu Jan 21, 2010 7:24 am

Hi,

No I am creating listview through code.

so how to change the divider color of listview in Java file.

Thanks
nbagade
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Fri Nov 20, 2009 7:49 am
Location: India

Postby dystopia » Thu Jan 21, 2010 7:18 pm

Hmm, maybe something like this will work?

ListView listView = (ListView) findViewById(android.R.id.list);

ColorDrawable color1 = new ColorDrawable(0xffff0000);
//ColorDrawable color2 = new ColorDrawable(Color.WHITE);

listView.setDivider(color1);
User avatar
dystopia
Freshman
Freshman
 
Posts: 2
Joined: Mon Dec 31, 2007 9:55 pm
Location: Silicon Valley

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests