Remove obsolete menu items
This commit is contained in:
parent
358c809d07
commit
2fb0aa7a12
@ -5,46 +5,6 @@
|
||||
android:orderInCategory="10"
|
||||
android:showAsAction="ifRoom|collapseActionView"
|
||||
android:actionViewClass="android.widget.SearchView" />
|
||||
<item
|
||||
android:id="@+id/menu_info"
|
||||
android:icon="@drawable/action_about"
|
||||
android:orderInCategory="30"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/menu_info">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/menu_chat"
|
||||
android:icon="@drawable/social_group"
|
||||
android:orderInCategory="35"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/menu_chat">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/menu_full"
|
||||
android:orderInCategory="40"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/menu_full">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/menu_compact"
|
||||
android:orderInCategory="50"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/menu_compact">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/menu_public"
|
||||
android:orderInCategory="60"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/menu_public">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/menu_faction"
|
||||
android:orderInCategory="70"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/menu_faction">
|
||||
</item>
|
||||
</menu>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/layer_chooser"
|
||||
android:icon="@drawable/ic_layer_chooser"
|
||||
@ -63,7 +23,7 @@
|
||||
android:id="@+id/reload_button"
|
||||
android:icon="@drawable/navigation_refresh"
|
||||
android:orderInCategory="110"
|
||||
android:showAsAction="ifRoom"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/reload">
|
||||
</item>
|
||||
<item
|
||||
@ -77,15 +37,8 @@
|
||||
android:id="@+id/action_settings"
|
||||
android:icon="@drawable/action_settings"
|
||||
android:orderInCategory="130"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/action_settings">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/menu_debug"
|
||||
android:icon="@drawable/alerts_and_states_warning"
|
||||
android:orderInCategory="190"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/menu_debug">
|
||||
android:title="@string/action_settings">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/menu_clear_cookies"
|
||||
|
@ -83,13 +83,6 @@
|
||||
<string name="pref_select_iitc">IITC source</string>
|
||||
<string name="pref_select_iitc_sum">Load IITC main script from url or use local script. Currently used source:</string>
|
||||
|
||||
<string name="menu_chat">Chat</string>
|
||||
<string name="menu_full">Full</string>
|
||||
<string name="menu_compact">Compact</string>
|
||||
<string name="menu_public">Public</string>
|
||||
<string name="menu_faction">Faction</string>
|
||||
<string name="menu_info">Info</string>
|
||||
<string name="menu_debug">Debug</string>
|
||||
<string name="menu_clear_cookies">Clear Cookies</string>
|
||||
<string name="menu_search">Search</string>
|
||||
<string name="choose_account_to_login">Choose account to login</string>
|
||||
|
@ -387,15 +387,16 @@ public class IITC_Mobile extends Activity {
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
// Get the SearchView and set the searchable configuration
|
||||
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
||||
this.mSearchMenuItem = menu.findItem(R.id.menu_search);
|
||||
mSearchMenuItem = menu.findItem(R.id.menu_search);
|
||||
final SearchView searchView =
|
||||
(SearchView) mSearchMenuItem.getActionView();
|
||||
// Assumes current activity is the searchable activity
|
||||
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
|
||||
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
|
||||
|
||||
// enable/disable mDesktopMode menu
|
||||
enableDesktopUI(menu);
|
||||
enableAdvancedMenu(menu);
|
||||
MenuItem item = menu.findItem(R.id.menu_clear_cookies);
|
||||
item.setVisible(mAdvancedMenu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -446,24 +447,6 @@ public class IITC_Mobile extends Activity {
|
||||
.getIITCVersion());
|
||||
startActivity(intent);
|
||||
return true;
|
||||
case R.id.menu_info:
|
||||
switchToPane(Pane.INFO);
|
||||
return true;
|
||||
case R.id.menu_full:
|
||||
switchToPane(Pane.FULL);
|
||||
return true;
|
||||
case R.id.menu_compact:
|
||||
switchToPane(Pane.COMPACT);
|
||||
return true;
|
||||
case R.id.menu_public:
|
||||
switchToPane(Pane.PUBLIC);
|
||||
return true;
|
||||
case R.id.menu_faction:
|
||||
switchToPane(Pane.FACTION);
|
||||
return true;
|
||||
case R.id.menu_debug:
|
||||
switchToPane(Pane.DEBUG);
|
||||
return true;
|
||||
case R.id.menu_clear_cookies:
|
||||
CookieManager cm = CookieManager.getInstance();
|
||||
cm.removeAllCookie();
|
||||
@ -579,17 +562,6 @@ public class IITC_Mobile extends Activity {
|
||||
setLoadingState(true);
|
||||
}
|
||||
|
||||
// disable/enable some menu buttons...
|
||||
public void enableDesktopUI(Menu menu) {
|
||||
MenuItem item;
|
||||
item = menu.findItem(R.id.menu_chat);
|
||||
item.setVisible(!mDesktopMode);
|
||||
item = menu.findItem(R.id.menu_info);
|
||||
item.setVisible(!mDesktopMode);
|
||||
item = menu.findItem(R.id.menu_debug);
|
||||
item.setVisible(!mDesktopMode);
|
||||
}
|
||||
|
||||
// remove dialog and add it back again
|
||||
// to ensure it is the last element of the list
|
||||
// focused dialogs should be closed first
|
||||
@ -622,14 +594,6 @@ public class IITC_Mobile extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
public void enableAdvancedMenu(Menu menu) {
|
||||
MenuItem item;
|
||||
item = menu.findItem(R.id.menu_debug);
|
||||
item.setVisible(mAdvancedMenu);
|
||||
item = menu.findItem(R.id.menu_clear_cookies);
|
||||
item.setVisible(mAdvancedMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated ActionBar related stuff should be handled by IITC_NavigationHelper
|
||||
* @see getNavigationHelper()
|
||||
|
@ -226,13 +226,13 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnNa
|
||||
|
||||
@Override
|
||||
public void onDrawerClosed(View drawerView) {
|
||||
// TODO Auto-generated method stub
|
||||
// TODO change menu? (via invalidateOptionsMenu)
|
||||
super.onDrawerClosed(drawerView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrawerOpened(View drawerView) {
|
||||
// TODO Auto-generated method stub
|
||||
// TODO change menu? (via invalidateOptionsMenu)
|
||||
super.onDrawerOpened(drawerView);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user