Toast.makeText from resource string

前端 未结 4 1537
南旧
南旧 2020-12-29 17:00

I have a class named MyPrimaryClass, this class has a button witch when pressed, creates an Intent with the class myClassForResult.

I use this to start it:



        
4条回答
  •  星月不相逢
    2020-12-29 17:27

    Toast.makeText(getApplicationContext(), getApplicationContext().getResources.getString(R.string.imgval), Toast.LENGTH_SHORT).toShow();
    

提交回复
热议问题