這是我的列表視圖代碼我怎樣才能改變列表視圖的顏色如何更改ListView的字體顏色
public class eat extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_eat);
String [] Hotels ={"Deer Park","Araliya","Royal Lotus","Kandalama"};
ListAdapter hoteladapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,Hotels);
ListView hotellist= (ListView)findViewById(R.id.lv);
hotellist.setAdapter(hoteladapter);
// hotellist.setc
}
只需使用'textView.setColor(R.color.your_color);在.class文件'每TextView的你在列表中設置 – Apurva 2015-02-23 18:07:43