From c784d66394e8dfbc05f39b91e1cc8a1953cc9616 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 5 Jan 2012 10:36:21 +0300 Subject: [PATCH] fix width/height detection for portrait screens --- src/org/fox/ttrss/MainActivity.java | 8 ++++---- src/org/fox/ttrss/OfflineActivity.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index f1e12456..9e2d7d86 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -469,11 +469,11 @@ public class MainActivity extends FragmentActivity implements OnlineServices { int height = display.getHeight(); if (height > width) { - int tmp = height; - width = tmp; - height = width; + int tmp = width; + width = height; + height = tmp; } - + m_smallScreenMode = m_compatMode || (width < 960 || height < 720); setContentView(R.layout.main); diff --git a/src/org/fox/ttrss/OfflineActivity.java b/src/org/fox/ttrss/OfflineActivity.java index 19e33836..fb7a9ad5 100644 --- a/src/org/fox/ttrss/OfflineActivity.java +++ b/src/org/fox/ttrss/OfflineActivity.java @@ -125,9 +125,9 @@ public class OfflineActivity extends FragmentActivity implements int height = display.getHeight(); if (height > width) { - int tmp = height; - width = tmp; - height = width; + int tmp = width; + width = height; + height = tmp; } m_smallScreenMode = m_compatMode || (width < 960 || height < 720);