Show alertDialog with radiobuttons when click a listViewItem

后端 未结 1 644
挽巷
挽巷 2021-01-05 08:38

I have a listView with 2 items in it, the 2 items are \"seconds\" and \"minutes\" When I press \"seconds\" I\'d like a alertDialogBox to open en show 5,10,15,... seconds. Sa

相关标签:
1条回答
  • 2021-01-05 09:02

    The error is clearly explanatory, you are missing a semicolon. Your code should be like

    listView.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) 
            {
               AlertDialogView();
            }//ERROR I'm GETTING HERE is Syntax error, insert ";" to complete Statement
         };
    

    and the above code should be inside the onCreate(). In the code that you provided, its floating in the middle of nowhere!

    0 讨论(0)
提交回复
热议问题