java - Issues with having a method start after user input from custom dialog -


here's situation. in program user presses button , custom dialog box appears requesting input. once user finishes, need information reflected in activity running beforehand, via textviews , imageviews. have method this, problem once user hits original button, codes goes next method reflects changes. i'm looking way have program wait until dialog box finishes before proceeding next method update information. best way go this? , appreciated.

i've tried update code advice of using dialogfragments, i'm getting error stating there's type mismatch can't convert bettype dialogfragment. have class called bettype extends dialogfragment. i'm following examples that' see online , they're structured same way. i'm @ stand still once again.

   private void selectbets() {      if (bettype != 1) {        dialogfragment dialog = bettype(); //my error here        dialog.show(getsupportfragmentmanager(), "bettype_dialog");      }     } 

you should using dialoginterface.onclicklistener listen clicking of dialog's ok button (or equivalent button). listener can call displaybets(). see this page several examples of how type of listener can used.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -