Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
Famangled ABS into letting me show the menu always.
Browse files Browse the repository at this point in the history
ABS now always thinks there's no hardware button. I also broke something
somehow last commit (I didn't stash right)
  • Loading branch information
indrora committed Apr 2, 2014
1 parent 06f7171 commit 116c65d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
16 changes: 8 additions & 8 deletions application/res/menu/conversations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:id="@+id/join"
android:title="@string/join_channel"
android:icon="@drawable/actionbar_add"
android:showAsAction="always|withText" />
android:showAsAction="never" />
<item
android:id="@+id/chooseConversation"
android:icon="@drawable/ic_action_conversations"
android:title="Conversations"
android:showAsAction="never" />
<item
android:id="@+id/users"
android:title="@string/users"
android:icon="@drawable/actionbar_users"
android:showAsAction="always|withText" />
android:showAsAction="ifRoom|withText" />
<item
android:id="@+id/close"
android:title="@string/close"
Expand All @@ -40,10 +45,5 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:title="@string/disconnect"
android:icon="@android:drawable/ic_menu_revert"
android:showAsAction="never" />
<item
android:id="@+id/chooseConversation"
android:icon="@drawable/ic_action_conversations"
android:title="Conversations"
android:showAsAction="always|withText"
/>

</menu>
4 changes: 0 additions & 4 deletions application/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >

<PreferenceScreen
android:icon="@drawable/ic_settings_network"
android:title="@string/settings_connection" >
<CheckBoxPreference
android:defaultValue="@string/default_reconnect"
Expand All @@ -48,7 +47,6 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:title="@string/settings_ignore_motd_title" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_settings_interface"
android:title="@string/settings_chat" >
<PreferenceCategory android:title="@string/settings_chat_colors" >
<ListPreference
Expand Down Expand Up @@ -155,7 +153,6 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
</PreferenceCategory>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_settings_highlight"
android:title="@string/settings_highlight" >
<CheckBoxPreference
android:defaultValue="@string/default_sound_highlight"
Expand Down Expand Up @@ -183,7 +180,6 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:title="@string/settings_led_highlight_title" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_settings_misc"
android:title="@string/settings_misc" >
<CheckBoxPreference
android:defaultValue="@string/default_voice_recognition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,12 @@ public void initForMenu(Context context, MenuBuilder menu) {
}

public static boolean reserveOverflow(Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB);
} else {
return !HasPermanentMenuKey.get(context);
}
return true;
}

private static class HasPermanentMenuKey {
public static boolean get(Context context) {
return ViewConfiguration.get(context).hasPermanentMenuKey();
return false;
}
}

Expand Down

0 comments on commit 116c65d

Please sign in to comment.