mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix so groups correctly redraw unselected on ICS+. TODO: integrate
with the expiring stuff.
This commit is contained in:
parent
b9afc47a25
commit
a38370c2f5
1 changed files with 7 additions and 1 deletions
|
@ -21,6 +21,7 @@ package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
@ -30,8 +31,13 @@ class ExpiringTextView extends TextView {
|
||||||
private ExpiringDelegate m_delegate = null;
|
private ExpiringDelegate m_delegate = null;
|
||||||
private Context m_context;
|
private Context m_context;
|
||||||
private Drawable m_origDrawable;
|
private Drawable m_origDrawable;
|
||||||
|
private static Drawable s_selDrawable;
|
||||||
protected boolean m_selected = false;
|
protected boolean m_selected = false;
|
||||||
|
|
||||||
|
static {
|
||||||
|
s_selDrawable = new ColorDrawable( XWApp.SEL_COLOR );
|
||||||
|
}
|
||||||
|
|
||||||
public ExpiringTextView( Context context, AttributeSet attrs )
|
public ExpiringTextView( Context context, AttributeSet attrs )
|
||||||
{
|
{
|
||||||
super( context, attrs );
|
super( context, attrs );
|
||||||
|
@ -60,7 +66,7 @@ class ExpiringTextView extends TextView {
|
||||||
m_selected = !m_selected;
|
m_selected = !m_selected;
|
||||||
if ( m_selected ) {
|
if ( m_selected ) {
|
||||||
m_origDrawable = getBackground();
|
m_origDrawable = getBackground();
|
||||||
setBackgroundColor( XWApp.SEL_COLOR );
|
setBackgroundDrawable( s_selDrawable );
|
||||||
} else {
|
} else {
|
||||||
setBackgroundDrawable( m_origDrawable );
|
setBackgroundDrawable( m_origDrawable );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue