forked from extern/Unexpected-Keyboard
ListGroupPreference: Fix change items
[Preference.onClick] is apparently not called on [Item]s, though it is on [AddButton]. Workaround this by listening on click events on the view.
This commit is contained in:
parent
500f4e41d3
commit
febc23776f
@ -193,17 +193,6 @@ public abstract class ListGroupPreference<E> extends PreferenceGroup
|
||||
setWidgetLayoutResource(R.layout.pref_listgroup_item_widget);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onClick()
|
||||
{
|
||||
select(new SelectionCallback<E>() {
|
||||
public void select(E value)
|
||||
{
|
||||
change_item(_index, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View onCreateView(ViewGroup parent)
|
||||
{
|
||||
@ -217,6 +206,18 @@ public abstract class ListGroupPreference<E> extends PreferenceGroup
|
||||
remove_item(_index);
|
||||
}
|
||||
});
|
||||
v.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View _v)
|
||||
{
|
||||
select(new SelectionCallback<E>() {
|
||||
public void select(E value)
|
||||
{
|
||||
change_item(_index, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
@ -26,4 +26,10 @@ public final class Logs
|
||||
_debug_logs.println("swapEnterActionKey: "+conf.swapEnterActionKey);
|
||||
_debug_logs.println("actionLabel: "+conf.actionLabel);
|
||||
}
|
||||
|
||||
public static void debug(String s)
|
||||
{
|
||||
if (_debug_logs != null)
|
||||
_debug_logs.println(s);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user