开发者

Android ListPreference - Preform a method on listItem select?

I've created a ListPreference in PreferenceActivity and it works good:

  • user clicks on the Preference item
  • a list dialog opens (retrieves listItems and their values from arra开发者_JS百科y.xml)
  • if the user selects one of the list items it saves his selection (which I can later retrieve).

My question is: how can I preform a method the second he presses one of the list items (according to the user selection)?

Appreciate any help!


You can register a OnPreferenceChangeListener for any given preference by calling its setOnPreferenceChangeListener() method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜