diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java index cee016a6d..98b508bac 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java @@ -21,6 +21,7 @@ package org.eehouse.android.xw4; import android.content.Context; import android.graphics.Canvas; +import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Handler; import android.util.AttributeSet; @@ -30,8 +31,13 @@ class ExpiringTextView extends TextView { private ExpiringDelegate m_delegate = null; private Context m_context; private Drawable m_origDrawable; + private static Drawable s_selDrawable; protected boolean m_selected = false; + static { + s_selDrawable = new ColorDrawable( XWApp.SEL_COLOR ); + } + public ExpiringTextView( Context context, AttributeSet attrs ) { super( context, attrs ); @@ -60,7 +66,7 @@ class ExpiringTextView extends TextView { m_selected = !m_selected; if ( m_selected ) { m_origDrawable = getBackground(); - setBackgroundColor( XWApp.SEL_COLOR ); + setBackgroundDrawable( s_selDrawable ); } else { setBackgroundDrawable( m_origDrawable ); }