diff options
author | Andrew Dolgov <[email protected]> | 2012-10-09 12:55:26 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-10-09 12:55:26 +0400 |
commit | 77bd9f3923542060992cec625d76d4ba9217e445 (patch) | |
tree | b02056725e8fb8e7df34064881bbb92312256b0b /src/org | |
parent | bb33e875db5f5ed50f7d584935c6a4a16602d2d5 (diff) |
fullscreen article view in portrait mode on tablets
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/fox/ttrss/HeadlinesActivity.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/org/fox/ttrss/HeadlinesActivity.java b/src/org/fox/ttrss/HeadlinesActivity.java index 24d4fabc..9d6746a3 100644 --- a/src/org/fox/ttrss/HeadlinesActivity.java +++ b/src/org/fox/ttrss/HeadlinesActivity.java @@ -44,6 +44,10 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL }
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
+
+ if (isPortrait()) {
+ findViewById(R.id.headlines_fragment).setVisibility(View.GONE);
+ }
if (savedInstanceState == null) {
Intent i = getIntent();
@@ -136,8 +140,8 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
- m_menu.setGroupVisible(R.id.menu_group_headlines, hf != null && hf.getSelectedArticles().size() == 0);
- m_menu.setGroupVisible(R.id.menu_group_headlines_selection, hf != null && hf.getSelectedArticles().size() != 0);
+ m_menu.setGroupVisible(R.id.menu_group_headlines, !isPortrait()&& hf != null && hf.getSelectedArticles().size() == 0);
+ m_menu.setGroupVisible(R.id.menu_group_headlines_selection, !isPortrait() && hf != null && hf.getSelectedArticles().size() != 0);
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
@@ -182,9 +186,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL } else {
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
- if (hf != null) {
- hf.setActiveArticle(article);
- }
+ hf.setActiveArticle(article);
}
GlobalState.getInstance().m_activeArticle = article;
|