How to setOnTouchListener() on a ListPreference?

后端 未结 1 1458
说谎
说谎 2021-01-18 10:04

Handling onTouchEvent on a view is straightforward as every view has the setOnTouchListener() method to do just that.

Alas, although ListPreference is a view, it isn

1条回答
  •  一整个雨季
    2021-01-18 10:24

    Use registerOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) for the shared preferences, if you are interested in all the preferences, or .setOnPreferenceChangeListener(listener) if you only want to know the changes on one item. You will be notified when the preference is changed.

    0 讨论(0)
提交回复
热议问题