Android: How to maximize PreferenceFragment width (or get rid of margin)?

后端 未结 8 1076
误落风尘
误落风尘 2020-11-28 12:58

\"Android

\"FragmentsBC

8条回答
  •  萌比男神i
    2020-11-28 13:30

    getListView().setPadding(left, top, right, bottom)

    Make sure to call it after your view has been created (not onCreate).

    Keep in mind that the int you pass in is in pixels, not dp. To convert from dp to pixels see this answer.

提交回复
热议问题