I have an App in which information from a restaurant order ie 3 x chips, 2 x burger, 4 x cans, Total is: £13-40 is displayed in a Toast. All very well, but I would prefer to have the user shown this information in a Dialog Box, with, say, Accept and Decline buttons. How do I go about this? Obviously, the xml part is straightforward, but how do I add the code in MainActivity - at present, I have a Submit Order button, which then pops up the toast with the order. This is my Toast lines of code..
DecimalFormat decimalFormat = new DecimalFormat(COMMA_SEPERATED);
result.append("\nTotal: £"+decimalFormat.format(totalamount)); //totalamount);
//Displaying the message on the toast
Toast.makeText(MainActivity.this, result.toString(), Toast.LENGTH_LONG).show();