Search code examples
androidandroid-resourceslistpreference

Is simple_list_item_single_choice the default layout for ListPreference items?


I replicated the ListPreference code into my own custom ListPreference and created an ArrayAdapter<> for the list, which inflates simple_list_item_single_choice in getView()
But I get a list with short rows, as opposed to the original ListPreferences which has taller rows.

Am I using the wrong layout resource?


Solution

  • I found out what the default layout is for ListPreference.

    android.R.layout.select_dialog_singlechoice
    

    I always forget that the source code I cannot see in Eclipse is always available at the GrepCode site
    I traced the source code for AlertParams in AlertController and there I found what the dialog.mSingleChoiceItemLayout field was.