4

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?

kyrax
  • 1,192
  • 3
  • 13
  • 29
  • check this link i think it will help you http://stackoverflow.com/questions/2609078/qt-what-is-the-difference-between-layout-and-widget – Buggy IdioT Sep 17 '14 at 09:11

2 Answers2

2

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/

Desmond Lua
  • 6,142
  • 4
  • 37
  • 50
  • This is the correct answer. The `layout` defines the whole `preference` row where as the `widgetLayout` defines only the part usually contains a control (e.g. switch, checkbox, seekbar, dropdown...). Therefore you're free to define either the whole row or only the widget if the default preferences don't serve you. – Bruno Bieri Dec 10 '19 at 10:44
-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

Muhammad Zahid
  • 607
  • 1
  • 7
  • 17
  • 3
    the reason i asked on stack overflow is because i did not understand the documentation. what is the "controllable widget portion"? – kyrax Aug 04 '14 at 05:59