My listview background doesn’t change when calling listView.setBackgroundDrawable().
I’ve searched a lot but didn’t find a solution.
This is the code
ListView v= new ListView(Menu2.this); v.setBackgroundDrawable(getResources().getDrawable(R.drawable.android)); Context c=v.getContext(); setListAdapter(new ArrayAdapter(c, android.R.layout.simple_list_item_1, list));
The background stays as if I didn’t call the method.
Thanks.
Use this :
Instead of,