From 814dd8945873a21315d2a1783cc71b07a405afa5 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 29 Oct 2010 07:40:41 -0700 Subject: [PATCH] remove unused ivar; override setEnabled to dis/enable delete button --- .../src/org/eehouse/android/xw4/XWListItem.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListItem.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListItem.java index 64bc15331..791e39a30 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListItem.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListItem.java @@ -30,7 +30,6 @@ import android.graphics.Rect; public class XWListItem extends LinearLayout { private int m_position; - private ImageButton m_button; private Context m_context; DeleteCallback m_cb; @@ -64,4 +63,15 @@ public class XWListItem extends LinearLayout { } ); button.setVisibility( View.VISIBLE ); } + + @Override + public void setEnabled( boolean enabled ) + { + ImageButton button = (ImageButton)getChildAt( 1 ); + button.setEnabled( enabled ); + // calling super here means the list item can't be opened for + // the user to inspect data. Might want to reconsider this. + // PENDING + super.setEnabled( enabled ); + } }