I am using ActionBarSherlock and want a similiar functionality of the home button as it is known by Google Maps.
I already managed to open a QuickAction (http://code.google.com/p/simple-quickactions/) when pressing the home button with this piece of code:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
View anchor = findViewById(R.id.text); // how do I get the home button view here?
quickAction.show(anchor);
return true;
}
return false;
}
However I am using a simple TextView of the activity as an anchor (R.id.text). How do I retrieve the home button view from the ActionBar there?
Oh, and findViewById(android.R.id.home)
or findViewById(item.getItemId())
both return null.