diff options
author | Andrew Dolgov <[email protected]> | 2020-10-03 09:05:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-10-03 09:05:49 +0300 |
commit | 393a81a35400484b5347bedeac6ecb9d6e556595 (patch) | |
tree | c240ad1fd81f1913a08900144c340acc5443ffd6 /org.fox.ttrss/src/main/java/org/fox | |
parent | 839f09b06e9175397b8f241fed8f5005eb064dd8 (diff) |
detail activity: always hide sidebar in portrait
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java | 7 | ||||
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java index 3144fc74..97819411 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java @@ -58,8 +58,11 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList Application.getInstance().load(savedInstanceState); - if (isPortrait() && !isSmallScreen()) { - findViewById(R.id.headlines_fragment).setVisibility(View.GONE); + if (isPortrait()) { + View headlines = findViewById(R.id.headlines_fragment); + + if (headlines != null) + headlines.setVisibility(View.GONE); } FloatingActionButton fab = findViewById(R.id.detail_fab); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java index 22d7e362..1871ad0b 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java @@ -84,8 +84,11 @@ public class OfflineDetailActivity extends OfflineActivity implements OfflineHea setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); - if (isPortrait() && !isSmallScreen()) { - findViewById(R.id.headlines_fragment).setVisibility(View.GONE); + if (isPortrait()) { + View headlines = findViewById(R.id.headlines_fragment); + + if (headlines != null) + headlines.setVisibility(View.GONE); } if (savedInstanceState == null) { |