I need to change color on selected item in list view, i know how to do that in click method, but the thing is that I want to set it then i load new activity. In that activity I'm creating listview and then I want to change one item background color from that list.
I have tried
this.slideMenuList = (ListView) findViewById(R.id.listSlideMenu);
ArrayAdapter<String> adapter2 =
new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, this.menuListResut);
this.slideMenuList.setAdapter(adapter2);
this.slideMenuList.getChildAt(0).setBackgroundColor(R.color.red);
but I get NullPointer