I am new to Android and am having difficult times handling a very simple task. I understand that in Android, a DialogFragment is non-blocking programmatically. I have my DialogFragment with positive and negative buttons on it and I am calling it from activity that is set as listener for this DialogFragment. That is all fine.
The problem I am having is that in C#, I would use a MessageBox which allows me to check what user has choosen (Yes or No). So, I could write something like this
public void DoSomething(){
if (boolA == false){
if (MessageBox.Show(....) == mbYes){
DoTask();
}
}
else {
DoTask();
}
}
In C#, the execution would stop at MessageBox.Show(). But in Android, that is not the case. Also, in C#, I know how to get result of the MessageBox.Show (Yes or No) but I dont know how do I do that in Android.
So, I am trying to use DialogFragment to make decision what to do next. How do I do that? Please provide example as I am novice to Android.
Much appreciated