I have an application with an icon. In this application there is a button "Change icon". So, I need to click on this button in the activity of the icon changed in the application menu. Is it possible to? If yes, then help the code. Thank you in advance

  • Replacing the application icon from the category of hacks of the system, I myself did not do this, so see the options in this answer , try it. Then write what happened. - pavlofff
  • Yes, thanks) everything works) - Bendel
  • If you have found the solution yourself, post it as an answer (the button “answer your own question”). This will help other users solve similar problems faster. - pavlofff

2 answers 2

assign the event listener to the button, change the icon in the listener.

  • The only question is how to change? - Bendel
image.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { image.setBackgroundResource(R.drawable.otherImage); } }); 
  • need to change the application icon - pavlofff