mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
first success at showing focus. Just red for now; needs work.
This commit is contained in:
parent
3e83f50c84
commit
60f497d756
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,7 @@ package org.eehouse.android.xw4;
|
|||
import android.widget.TextView;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.graphics.Rect;
|
||||
|
||||
public class XWListItem extends TextView {
|
||||
private int m_position;
|
||||
|
@ -33,4 +34,12 @@ public class XWListItem extends TextView {
|
|||
|
||||
public int getPosition() { return m_position; }
|
||||
public void setPosition( int indx ) { m_position = indx; }
|
||||
|
||||
protected void onFocusChanged( boolean gainFocus, int direction,
|
||||
Rect previouslyFocusedRect )
|
||||
{
|
||||
setBackgroundColor( gainFocus? 0xFFFF0000 : 0xFFFFFFFF );
|
||||
// invalidate();
|
||||
super.onFocusChanged( gainFocus, direction, previouslyFocusedRect );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue