Creating a Dialog after an onClick event

后端 未结 4 861
梦如初夏
梦如初夏 2021-01-27 18:26

Hi i am working the first time with dialogs. i want to create a dialog after an item in a listView was clicked:

    String[] listItems = {\"Colour\", \"Font Size         


        
4条回答
  •  囚心锁ツ
    2021-01-27 18:52

    move

     public dialog onCreateDialog(Bundle savedInstanceState) {
         AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
         builder.setTitle("Choose Font Size");
     }
    

    int the class scope, and call it from the onItemClick

提交回复
热议问题