0
我想從下面的代碼如何從操作欄下拉導航選擇的項目外onNavigationItemSelected安卓
@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
mSelected.setText("Selected: " + mLocations[itemPosition]);//I want this selected item from the below code
我想之外獲得操作欄下拉導航的選擇項目值從下面的代碼
@Override
public boolean onContextItemSelected(android.view.MenuItem item) {
int selected_item__position = //here I want to get the selected item from the Action bar drop down
這可能嗎?任何幫助。 – Jack