From 2e5bccb94290dae8fee7088283e8e3ecda6c764e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 26 Nov 2011 18:04:54 +0300 Subject: [PATCH] fix smallscreenmode being enabled in portrait --- res/menu/main_menu.xml | 2 +- src/org/fox/ttrss/MainActivity.java | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml index 3d73fe82..3e3a466e 100644 --- a/res/menu/main_menu.xml +++ b/res/menu/main_menu.xml @@ -25,7 +25,7 @@ + android:showAsAction=""/> 1000 && display.getHeight() >= 600) { + if (display.getWidth() > minWidth && display.getHeight() >= minHeight) { m_smallScreenMode = false; - + setContentView(R.layout.main); } else { m_smallScreenMode = true; setContentView(R.layout.main_small); } - + + Log.d(TAG, "m_smallScreenMode=" + m_smallScreenMode); + Log.d(TAG, "orientation=" + display.getOrientation()); if (android.os.Build.VERSION.SDK_INT > 10) { LayoutTransition transitioner = new LayoutTransition();