I made the method \"showResult\" static but i have problem with :
\"Toast.makeText(`getActivity()`.getApplication(), result2 + \"\\n\" + \"Total Amount:=\" + tot
remove .getApplication()
.getApplication()
and add
Toast.makeText(getActivity(), result2 + "\n" + "Total Amount:=" + totalAmount2 + "€", Toast.LENGTH_LONG).show();