diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2012-09-01 22:22:13 +0400 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2012-09-01 22:22:13 +0400 |
| commit | b826481001889868a57fb37b80fcfd7b109ab1a8 (patch) | |
| tree | d742b01a01b820ca7e8fd2675f35d4a1de1c27dd /src/org/fox/ttrss/MainActivity.java | |
| parent | 77352728e7085bf9883c2c7d94501bce1ab8e4cf (diff) | |
properly detect portrait orientation
move to ICS style of naming resources for various dpi
bump version
Diffstat (limited to 'src/org/fox/ttrss/MainActivity.java')
| -rw-r--r-- | src/org/fox/ttrss/MainActivity.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 5cb281ef..6f4f4348 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -660,7 +660,7 @@ public class MainActivity extends CommonActivity implements OnlineServices { if (!isCompatMode()) { if (!isSmallScreen()) { - findViewById(R.id.feeds_fragment).setVisibility(m_selectedArticle != null && getOrientation() % 2 != 0 ? View.GONE : View.VISIBLE); + findViewById(R.id.feeds_fragment).setVisibility(m_selectedArticle != null && isPortrait() ? View.GONE : View.VISIBLE); findViewById(R.id.article_fragment).setVisibility(m_selectedArticle != null ? View.VISIBLE : View.GONE); } @@ -1414,7 +1414,7 @@ public class MainActivity extends CommonActivity implements OnlineServices { m_navigationAdapter.clear(); - if (m_activeCategory != null || (m_activeFeed != null && (isSmallScreen() || getOrientation() % 2 != 0))) { + if (m_activeCategory != null || (m_activeFeed != null && (isSmallScreen() || isPortrait()))) { getActionBar().setDisplayShowTitleEnabled(false); getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); @@ -1862,11 +1862,11 @@ public class MainActivity extends CommonActivity implements OnlineServices { ft.hide(getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES)); ft.add(R.id.fragment_container, frag, FRAG_ARTICLE); } else { - findViewById(R.id.feeds_fragment).setVisibility(getOrientation() % 2 != 0 ? View.GONE : View.VISIBLE); + findViewById(R.id.feeds_fragment).setVisibility(isPortrait() ? View.GONE : View.VISIBLE); findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); ft.replace(R.id.article_fragment, frag, FRAG_ARTICLE); - if (getOrientation() % 2 == 0) refresh(); + if (!isPortrait()) refresh(); } ft.commit(); } |