I have a ListView with color names (array of strings stored in separate xml). How do I change background of my application depending on which color in the list I clicked? I have a function that displays a toast message depending on Item clicked but I don't know how to transform it into background color changing function.
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView parent, View view, int position, long id) {
Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show();
}
});