fullscreen article view in portrait mode on tablets
This commit is contained in:
parent
bb33e875db
commit
77bd9f3923
@ -45,6 +45,10 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
|
|||||||
|
|
||||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||||
|
|
||||||
|
if (isPortrait()) {
|
||||||
|
findViewById(R.id.headlines_fragment).setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
Intent i = getIntent();
|
Intent i = getIntent();
|
||||||
|
|
||||||
@ -136,8 +140,8 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
|
|||||||
|
|
||||||
HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
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, !isPortrait()&& 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_selection, !isPortrait() && hf != null && hf.getSelectedArticles().size() != 0);
|
||||||
|
|
||||||
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
||||||
|
|
||||||
@ -182,9 +186,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
if (hf != null) {
|
hf.setActiveArticle(article);
|
||||||
hf.setActiveArticle(article);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalState.getInstance().m_activeArticle = article;
|
GlobalState.getInstance().m_activeArticle = article;
|
||||||
|
Loading…
Reference in New Issue
Block a user