From 431b24409fb78c4aa6325c4d726cbf41d6c3f1ff Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 4 Mar 2014 07:40:25 -0800 Subject: [PATCH] Fix kitkat-only problem where expiring rects are clipped at top and left --- .../src/org/eehouse/android/xw4/ExpiringDelegate.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java index db432731a..430800771 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java @@ -37,6 +37,9 @@ public class ExpiringDelegate { private static final long INTERVAL_SECS = 3 * 24 * 60 * 60; // private static final long INTERVAL_SECS = 60 * 10; // for testing + private static boolean s_kitkat = + 19 <= Integer.valueOf( android.os.Build.VERSION.SDK ); + private Context m_context; private View m_view; private boolean m_active = false; @@ -117,6 +120,11 @@ public class ExpiringDelegate { int redWidth = width * m_pct / 100; Assert.assertTrue( redWidth <= width ); + if ( s_kitkat ) { + ++s_rect.top; + ++s_rect.left; + } + // left edge addPoints( 0, s_rect.left, s_rect.top, s_rect.left, s_rect.bottom - 1 );