getActionView()
for action bar was introduced in API 11
, If I want backward compatibility what is the alternative for getActionView()
?
e.g.
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.action_bar_menu, menu);
final MenuItem item = menu.findItem(R.id.menuitem);
item.getActionView() //Works from API level 11
return true;
}
question from:https://stackoverflow.com/questions/15641183/what-is-the-alternative-to-getactionview-before-api-level11-in-android