[Solved] How can i simplify this java Statement
Where do You set color for the selected item? is it possible to set all colors to white and then use switch to set only the selected one to desired color? It would make it at least more pleasant to look at. nav_news_bg.setBackground(color); nav_feed_bg.setBackground(color); nav_profile_bg.setBackground(color); nav_chat_bg.setBackground(color); nav_books_bg.setBackground(color); switch(v.getId()){ case R.id.nav_news: nav_news_bg.setBackground(desiredColor); break; case R.id.nav_feed: . … Read more