Toast.makeText from resource string

前端 未结 4 1524
南旧
南旧 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:53

    Try:

    Toast.makeText(this, this.getString(R.string.my_resource_string), Toast.LENGTH_SHORT);
    

提交回复
热议问题