0
我擁有電子ArrayAdapter以使電子CustomListView ......這裏是完整的代碼...我想從Java代碼中設置XML R.layout.streampage_custom_row_view
的背景顏色務實....任何幫助,請以編程方式更改自定義ListView的顏色?
adapter = new ArrayAdapter<String>(StreamPage_modified.this,
R.layout.streampage_custom_row_view, R.id.title, targetArray) {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = super.getView(position, convertView, parent);
TextView Description = (TextView) row
.findViewById(R.id.description);
Log.d("SPOC COUNT", "" + SPOC.size());
Log.d("SPOC POSitiON", "" + position);
Description.setText(SPOC.get(position).getDescription());
return row;
}
};
adapter.notifyDataSetChanged();
list.setAdapter(adapter);
list.setOnItemClickListener(StreamPage_modified.this);