开发者

how to set text color in array adapter in android

in my app i have created a list view and added some text in the list. In my coding part the text are been added as an array adapter to have a check box. In the layout i have given a white color for the list view because of this the text appear to be very dull. How to set the text color to be as black.

i have placed the list view in layout file and placed the values for text view in coding. the following is the part of my coding

names = new String[] { "Sequenced","Random"开发者_StackOverflow };
list1 = (ListView) findViewById(R.id.cardlist);
list1.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_checked,names));

                list1.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

                list1.setItemChecked(0,true);

please help me......


Change the text color in the simple_list_item_checked layout

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜