From 2073098a5e37bb013f1ea99f0aecde480236a74b Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 13 Jan 2015 19:53:02 -0800 Subject: [PATCH] fix crash: adding wrong item to list --- .../src/org/eehouse/android/xw4/XWConnAddrPreference.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConnAddrPreference.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConnAddrPreference.java index 05f8e8c3d..aa77c1ccc 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConnAddrPreference.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConnAddrPreference.java @@ -53,7 +53,6 @@ public class XWConnAddrPreference extends DialogPreference { super( context, attrs ); m_context = context; - // setWidgetLayoutResource( R.layout.conn_types_display ); setDialogLayoutResource( R.layout.conn_types_display ); setNegativeButtonText( LocUtils.getString( context, R.string.button_cancel ) ); @@ -74,7 +73,7 @@ public class XWConnAddrPreference extends DialogPreference { CheckBox box = (CheckBox)layout.findViewById( R.id.inviter_check ); box.setText( typ.longName( m_context ) ); box.setChecked( m_curSet.contains( typ ) ); - list.addView( box ); + list.addView( layout ); // failed!!! final CommsConnType typf = typ; box.setOnCheckedChangeListener( new OnCheckedChangeListener() {