[JAVA] I'm looking for a way to return Yes / No of Dialog as boolean ...

Currently studying application development using Java in Android Studio I'm stumbling on the Dialog part.

As an example, we would like to move it as follows. Press the registration button on screen A        ↓ Dialog: Are you sure you want to register Yes, No   ↓          ↓  Press Yes Press No   ↓          ↓ Return True to screen A Press False to screen        ↓ Continue processing after receiving True or False on screen A

I tried to find out, but is it wrong? I couldn't find a sample Dialog that would return a boolean.

Can you help us? Thank you for your cooperation.

Recommended Posts

I'm looking for a way to return Yes / No of Dialog as boolean ...
A way for Java / Scala developers to advance their careers as data engineers.
Pass arguments to the method and receive the result of the operation as a return value
Item 47: Prefer Collection to Stream as a return type