How to add a “long click listener” to a Preference?

前端 未结 2 536
情歌与酒
情歌与酒 2020-12-06 18:53

I have an PreferenceActivity where I would like to add Preferences dynamically.

On a long click, these shall do something, however OnPreferenceCli

2条回答
  •  眼角桃花
    2020-12-06 19:29

    Unable to test for you at the moment, but I'm wondering if you could achieve this by using the getView() method on a Preference. Then, once you have that View, use setOnLongClickListener().

提交回复
热议问题