fix so groups correctly redraw unselected on ICS+. TODO: integrate

with the expiring stuff.
This commit is contained in:
Eric House 2013-10-21 06:29:02 -07:00
parent b9afc47a25
commit a38370c2f5

View file

@ -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 );
}