summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2009-11-18 13:32:30 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-18 13:32:30 -0800
commit60ed3c9b9e6c31d2760e94a50713023b6c923362 (patch)
treed0db2f63ac5cbc1407bf8c0d4fcd40002bf8099d
parent6ef49a4b04b75148b6255f194dd7897565fdab13 (diff)
parent30142f7ef7bf3d4699526cb9ce02b220a8045c5d (diff)
downloadframeworks_base-60ed3c9b9e6c31d2760e94a50713023b6c923362.zip
frameworks_base-60ed3c9b9e6c31d2760e94a50713023b6c923362.tar.gz
frameworks_base-60ed3c9b9e6c31d2760e94a50713023b6c923362.tar.bz2
am 30142f7e: Merge change I9f239766 into eclair
Merge commit '30142f7ef7bf3d4699526cb9ce02b220a8045c5d' into eclair-plus-aosp * commit '30142f7ef7bf3d4699526cb9ce02b220a8045c5d': Workaround for 2262578: Don't draw tabs if view is not in the correct orientation for the layout
-rw-r--r--core/java/com/android/internal/widget/SlidingTab.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java
index b7dd27d..cb67bfc 100644
--- a/core/java/com/android/internal/widget/SlidingTab.java
+++ b/core/java/com/android/internal/widget/SlidingTab.java
@@ -17,6 +17,7 @@
package com.android.internal.widget;
import android.content.Context;
+import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -150,6 +151,14 @@ public class SlidingTab extends ViewGroup {
// TODO: For debugging; remove after glitches debugged.
@Override
protected void dispatchDraw(Canvas canvas) {
+ int orientation = getResources().getConfiguration().orientation;
+ if (mOrientation == HORIZONTAL && orientation != Configuration.ORIENTATION_PORTRAIT
+ || mOrientation == VERTICAL && orientation != Configuration.ORIENTATION_LANDSCAPE) {
+ // UBER HACK ALERT. This is a workaround for a configuration race condition between
+ // orientation changed notification and the resize notification. This just prevents
+ // us from drawing under this circumstance, though the view will still be wrong.
+ return;
+ }
super.dispatchDraw(canvas);
}