public static Delivery newSimpleListMail(@NotNull Context ctx, CharSequence title, Design design, CharSequence[] contents, ListStyle.OnItemAcceptedListener<CharSequence> listener){
        ArrayAdapter<CharSequence> adapterHolo = new ArrayAdapter<>(ctx, android.R.layout.simple_list_item_1, contents);
        ArrayAdapter<CharSequence> adapterMtrl = new ArrayAdapter<>(ctx, design.isLight() ? R.layout.simple_listitem_mtrl_light : R.layout.simple_listitem_mtrl_dark, contents);

        return newMail(ctx)
                .setTitle(title)
                .setDesign(design)
                .setStyle(new ListStyle.Builder(ctx)
                        .setDividerHeight(design.isMaterial() ? 0 : 2)
                        .setOnItemAcceptedListener(listener)
                        .build(design.isMaterial() ? adapterMtrl : adapterHolo))
                .build();
    }
public static Delivery newSimpleListMail ( @ NotNull Context ctx , CharSequence title , Design design , CharSequence [ ] contents , ListStyle . OnItemAcceptedListener < CharSequence > listener ) { ArrayAdapter < CharSequence > adapterHolo = new ArrayAdapter < > ( ctx , android . R . layout . simple_list_item_1 , contents ) ; ArrayAdapter < CharSequence > adapterMtrl = new ArrayAdapter < > ( ctx , design . isLight ( ) ? R . layout . simple_listitem_mtrl_light : R . layout . simple_listitem_mtrl_dark , contents ) ; return newMail ( ctx ) . setTitle ( title ) . setDesign ( design ) . setStyle ( new ListStyle . Builder ( ctx ) . setDividerHeight ( design . isMaterial ( ) ? 0 : 2 ) . setOnItemAcceptedListener ( listener ) . build ( design . isMaterial ( ) ? adapterMtrl : adapterHolo ) ) . build ( ) ; }
Create a new Simple List Dialog

@param ctx           the application context
@param title         the dialog title
@param design        the dialog design
@param contents      the list of CharSequence for the contents
@param listener      the acceptance listener that gets called when the user selects an item
@return              the new Delivery