fix upside-down orientation handling

This commit is contained in:
Andrew Dolgov 2011-11-27 12:03:45 +03:00
parent 89123afc87
commit eb140e1366
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="10" android:versionCode="11"
android:versionName="0.1.9"> android:versionName="0.1.10">
<uses-sdk android:minSdkVersion="8" /> <uses-sdk android:minSdkVersion="8" />
<!-- <supports-screens android:smallScreens="false" android:normalScreens="false" /> --> <!-- <supports-screens android:smallScreens="false" android:normalScreens="false" /> -->

View File

@ -115,8 +115,8 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
Display display = getWindowManager().getDefaultDisplay(); Display display = getWindowManager().getDefaultDisplay();
int orientation = display.getOrientation(); int orientation = display.getOrientation();
int minWidth = orientation == 0 ? 1024 : 600; int minWidth = orientation % 2 == 0 ? 1024 : 600;
int minHeight = orientation == 0 ? 600 : 1024; int minHeight = orientation % 2 == 0 ? 600 : 1024;
if (display.getWidth() > minWidth && display.getHeight() >= minHeight) { if (display.getWidth() > minWidth && display.getHeight() >= minHeight) {
m_smallScreenMode = false; m_smallScreenMode = false;