I want to implement on click listener on icon of sherlock actionbar show in above image. How can I do this? Please anyone can give this answer.
In your activity,
in your onCreate()
getActionBar().setDisplayHomeAsUpEnabled(true);
and then
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
//do your stuff here
}
return super.onOptionsItemSelected(item);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.