How can I set a window icon for all the activities. I have gone through the window features and relative methods to set the features.
Here is the code I have used to set the icon:
requestWindowFeature(Window.FEATURE_LEFT_ICON);
setContentView(R.layout.main);
setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.icon);
I have called this code in the ‘onCreate’ method of an activity. Icon is set for the main activity. But whenever I go to other activities, no icon is set in the window. I cannot see any errors in the logcat. Please help me.
It was a cache problem 🙂
I have Uninstalled the application from the emulator and deleted the following files from the ‘bin’ folder:
Deleted the R.java file.
It worked perfectly after reinstalling the application.