Tuesday, 6 August 2013

CheckBoxPreference with additional Button?

CheckBoxPreference with additional Button?

I'd like to show an additional button in a CheckBoxPreference. I've
managed this by subclassing CheckBoxPreference and a custom layout (using
this code as a basis). However, I struggle to add an OnClickListenerto
this button in my PreferenceActivity. I've tried using a global
OnClickListener-variable in the class extending CheckBoxPreference as well
as creating a getView()-method that is supposed to return the Preference's
view to the PreferenceActivity(to be able to use
findViewById(R.id.my_button), but both approaches don't work :-(.

No comments:

Post a Comment