non-static method getActivity()

后端 未结 4 835
情深已故
情深已故 2021-01-29 10:53

I made the method \"showResult\" static but i have problem with :

\"Toast.makeText(`getActivity()`.getApplication(), result2 + \"\\n\" + \"Total Amount:=\" + tot         


        
4条回答
  •  星月不相逢
    2021-01-29 11:20

    remove .getApplication()

    and add

    Toast.makeText(getActivity(), result2 + "\n" + "Total Amount:=" + totalAmount2 + "€", Toast.LENGTH_LONG).show();
    

提交回复
热议问题