diff options
Diffstat (limited to 'org.fox.ttrss/src/main')
8 files changed, 29 insertions, 43 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 684cc438..e266e712 100644 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="239" + android:versionCode="240" android:versionName="1.41" > <uses-sdk diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index 5a64ae57..a6599b54 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -25,6 +25,7 @@ import android.util.Log; import android.util.TypedValue; import android.view.Display; import android.view.View; +import android.view.WindowManager; import android.widget.TextView; import android.widget.Toast; @@ -50,6 +51,7 @@ public class CommonActivity extends ActionBarActivity { private boolean m_smallScreenMode = true; private boolean m_compatMode = false; private String m_theme; + private boolean m_fullScreen; protected SharedPreferences m_prefs; @@ -122,7 +124,9 @@ public class CommonActivity extends ActionBarActivity { public void onResume() { super.onResume(); - if (!m_theme.equals(m_prefs.getString("theme", CommonActivity.THEME_DEFAULT))) { + if (!m_theme.equals(m_prefs.getString("theme", CommonActivity.THEME_DEFAULT)) || + m_fullScreen != m_prefs.getBoolean("full_screen_mode", false)) { + Log.d(TAG, "theme changed, restarting"); finish(); @@ -145,8 +149,10 @@ public class CommonActivity extends ActionBarActivity { if (savedInstanceState != null) { m_theme = savedInstanceState.getString("theme"); + m_fullScreen = savedInstanceState.getBoolean("fullscreen"); } else { m_theme = m_prefs.getString("theme", CommonActivity.THEME_DEFAULT); + m_fullScreen = m_prefs.getBoolean("full_screen_mode", false); } initDatabase(); @@ -159,13 +165,16 @@ public class CommonActivity extends ActionBarActivity { } public void setStatusBarTint() { - if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.KITKAT) { + if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.KITKAT && + !m_prefs.getBoolean("full_screen_mode", false)) { + + getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, + WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + SystemBarTintManager tintManager = new SystemBarTintManager(this); // enable status bar tint tintManager.setStatusBarTintEnabled(true); - // enable navigation bar tint - tintManager.setNavigationBarTintEnabled(true); - + TypedValue tv = new TypedValue(); getTheme().resolveAttribute(R.attr.statusBarHintColor, tv, true); @@ -178,6 +187,7 @@ public class CommonActivity extends ActionBarActivity { super.onSaveInstanceState(out); out.putString("theme", m_theme); + out.putBoolean("fullscreen", m_fullScreen); } public boolean isSmallScreen() { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java index 90e2c118..bc6c39a4 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java @@ -56,9 +56,8 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe setContentView(R.layout.headlines); - setStatusBarTint(); - - setSmallScreen(findViewById(R.id.sw600dp_anchor) == null && + setStatusBarTint(); + setSmallScreen(findViewById(R.id.sw600dp_anchor) == null && findViewById(R.id.sw600dp_port_anchor) == null); GlobalState.getInstance().load(savedInstanceState); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java index c4e0f0cc..fc8d3621 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java @@ -33,9 +33,9 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL setContentView(R.layout.headlines_articles); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - - setStatusBarTint(); - setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); + + setStatusBarTint(); + setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); GlobalState.getInstance().load(savedInstanceState); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java index e33a02b7..c1adef52 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java @@ -172,8 +172,8 @@ public class OnlineActivity extends CommonActivity { Log.d(TAG, "m_isOffline=" + isOffline); setContentView(R.layout.login); - - setStatusBarTint(); + + setStatusBarTint(); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).build(); ImageLoader.getInstance().init(config); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java index f7263fe0..c2318501 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -40,9 +40,9 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead super.onCreate(savedInstanceState); setContentView(R.layout.headlines); - - setStatusBarTint(); - setSmallScreen(findViewById(R.id.sw600dp_anchor) == null && + + setStatusBarTint(); + setSmallScreen(findViewById(R.id.sw600dp_anchor) == null && findViewById(R.id.sw600dp_port_anchor) == null); GlobalState.getInstance().load(savedInstanceState); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java index de57c985..3a76ea2a 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java @@ -35,9 +35,9 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline setContentView(R.layout.headlines_articles); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - - setStatusBarTint(); - setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); + + setStatusBarTint(); + setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); if (isPortrait() || m_prefs.getBoolean("headlines_hide_sidebar", false)) { findViewById(R.id.headlines_fragment).setVisibility(View.GONE); diff --git a/org.fox.ttrss/src/main/res/values-v19/style.xml b/org.fox.ttrss/src/main/res/values-v19/style.xml deleted file mode 100644 index 67781339..00000000 --- a/org.fox.ttrss/src/main/res/values-v19/style.xml +++ /dev/null @@ -1,23 +0,0 @@ -<resources xmlns:android="http://schemas.android.com/apk/res/android"> - - <style name="LightTheme" parent="LightThemeBase"> - <item name="android:windowTranslucentStatus">true</item> - <item name="android:windowTranslucentNavigation">false</item> - </style> - - <style name="SepiaTheme" parent="SepiaThemeBase"> - <item name="android:windowTranslucentStatus">true</item> - <item name="android:windowTranslucentNavigation">false</item> - </style> - - <style name="HoloTheme" parent="HoloThemeBase"> - <item name="android:windowTranslucentStatus">true</item> - <item name="android:windowTranslucentNavigation">false</item> - </style> - - <style name="DarkTheme" parent="DarkThemeBase"> - <item name="android:windowTranslucentStatus">true</item> - <item name="android:windowTranslucentNavigation">false</item> - </style> - -</resources>
\ No newline at end of file |