Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arrayList = new ArrayList<String>();
- ListView listView = (ListView) findViewById(R.id.listView);
- ArrayAdapter adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList);
- listView.setAdapter(adapter);
- arrayList.add(0,"Test");
- listView.setBackgroundColor(Color.WHITE);
- View view = listView.getChildAt(0);
- listView.getAdapter().getView(0, view, listView).setBackgroundColor(Color.RED);
- adapter.notifyDataSetChanged();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement