androidpreferencescreen

How to specify custom layout for a DropdownPreference?


I want to use a custom layout for a DropDownPreference.

When I specify the layout as an android:layout="@layout/mylayout", I get a runtime error. Can anyone confirm if they have done this previously?


Solution

  • I solved it myself.

    The issue was that I was not implementing Spinner component inside my custom Layout and DropDownPreference uses a Spinner component internally.