android support v14 PreferenceFragment crashes

后端 未结 2 1969
借酒劲吻你
借酒劲吻你 2021-01-06 11:13

I\'m trying to display settings in an Android app using a PreferenceFragment from the android.support.v14.preference library. However, when I try to open the pr

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-06 11:44

    Comment out your onCreateView() method.

    Or, chain to the superclass implementation of onCreateView() and embed its response in your own wrapper, if for some reason you want additional stuff around the stock PreferenceFragment UI.

    PreferenceFragment probably is expecting its onCreateView() to create the RecyclerView that is missing per your stack trace.

提交回复
热议问题