add workaround for android issue #78154

This commit is contained in:
Andrew Dolgov 2014-11-18 01:44:03 +03:00
parent e5ab4e5968
commit b9e7f82297
2 changed files with 13 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="284"
android:versionName="1.76" >
android:versionCode="285"
android:versionName="1.77" >
<uses-sdk
android:minSdkVersion="10"

View File

@ -11,6 +11,7 @@ import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.util.TypedValue;
import android.view.Display;
import android.view.KeyEvent;
import android.view.WindowManager;
import android.widget.Toast;
@ -64,6 +65,16 @@ public class CommonActivity extends ActionBarActivity {
return m_prefs.getBoolean("show_unread_only", true);
}
// fuck you LG FUCK YOU
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU){
openOptionsMenu();
return true;
}
return super.onKeyDown(keyCode, event);
}
public void setUnreadOnly(boolean unread) {
SharedPreferences.Editor editor = m_prefs.edit();
editor.putBoolean("show_unread_only", unread);