How to listen for preference changes within a PreferenceFragment?

前端 未结 9 2074
自闭症患者
自闭症患者 2020-11-28 19:16

As described here, I am subclassing PreferenceFragment and displaying it inside an Activity. That document explains how to listen for preference changes here, but only if yo

9条回答
  •  时光取名叫无心
    2020-11-28 19:49

    If you only want to update the summary, using androidx preference library (see the official guides), and adding the following attribute in your layout xml will be enough:

    
    

提交回复
热议问题