diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java')
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java | 16 |
1 files changed, 15 insertions, 1 deletions
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 4773535d..eef2fa08 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 @@ -3,6 +3,7 @@ package org.fox.ttrss; import android.annotation.SuppressLint; import android.content.Intent; import android.content.SharedPreferences; +import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; @@ -39,6 +40,10 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL GlobalState.getInstance().load(savedInstanceState); + if (isPortrait() && !isSmallScreen()) { + findViewById(R.id.headlines_fragment).setVisibility(View.GONE); + } + if (savedInstanceState == null) { Intent i = getIntent(); @@ -99,6 +104,15 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL } } + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + + if (!isSmallScreen()) { + findViewById(R.id.headlines_fragment).setVisibility(isPortrait() ? View.GONE : View.VISIBLE); + } + } + @Override protected void refresh() { super.refresh(); @@ -223,7 +237,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL } public void showSidebar(boolean show) { - if (!isSmallScreen()) { + if (!isSmallScreen() && !isPortrait()) { findViewById(R.id.headlines_fragment).setVisibility(show ? View.VISIBLE : View.GONE); invalidateOptionsMenu(); } |