I’m trying to implement an actionbar in the API 10. I’ve created the layout file as ‘actionbar.xml’ which is included as a layout on every screen. I have a clickable image view on the actionbar layout. How do I write an ‘onClick()’ method for this. Meaning, do I have to write this method in every activity? Is there anyway I can create a separate activity as ‘ActiobarActivity.java’ which will have ‘onClick()’? If so, then how do I link it to the flow of the application as it is there on every screen?
Basically, can anyone suggest an approach to implement a clickable widget on actionbar in API < 11.
That is what Actionbar Sherlock is for:
http://actionbarsherlock.com/