Difference between android:widgetLayout and android:layout for preference?

ぃ、小莉子 提交于 2019-12-10 17:29:27

问题


I'm getting some weird configuration where widgetLayout configures the inner space of a list item and layout configures the whole item list and the screen background? Can someone actually explain what is the widgetLayout?


回答1:


android:layout: The layout for the entire Preference (include title, summary and widget)

android:widgetLayout: The layout for the controllable widget portion of a Preference (e.g. a checkbox preference would specify a custom layout consisting of just the CheckBox here)

https://code.luasoftware.com/tutorials/android/override-layout-of-android-preference/




回答2:


android:widgetLayout

The layout for the controllable widget portion of a Preference. This is inflated into the layout for a Preference and should be used more frequently than the layout attribute. For example, a checkbox preference would specify a custom layout (consisting of just the CheckBox) here.

Check this link for more Explanation



来源:https://stackoverflow.com/questions/25111910/difference-between-androidwidgetlayout-and-androidlayout-for-preference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!