2013-02-20 93 views

回答

1

不,你必須誇大它才能訪問它。例如:

public boolean onCreateOptionsMenu(Menu menu) { 
    super.onCreateOptionsMenu(menu); 
    getMenuInflater().inflate(R.menu.my_menu, menu); 
    View v = menu.findItem(R.id.item).getActionView(); // Get access to a View associated with example item 
    return true; 
}