public void dialog ( final int title , int list , DialogInterface . OnClickListener listener ) { AlertDialog . Builder builder = new AlertDialog . Builder ( getContext ( ) ) ; builder . setTitle ( title ) . setItems ( list , listener ) ; builder . create ( ) . show ( ) ; }
Open a dialog with single choice list