I am trying to make a small project for a shopping system in a supermarket. How can I display my result in another activity? Note that my result is displayed in a Toast in the same activity.
Here is my code:
public void showResult(View v) {
String result = "Selected Product are :";
int totalAmount = 0;
for (Product p : boxAdapter.getBox()) {
if (p.box) {
result += "\n" + p.name;
totalAmount += p.price;
}
}
Toast.makeText(this, result + "\n" + "Total Amount:=" + totalAmount,
Toast.LENGTH_LONG).show();
The toast msg here shows the result.
I want to display the result in a textView for example in another activity.