我正在做一个他们使用的教程:
c = this;
当我尝试时,“c”以红色突出显示。
最佳答案
简单,使用前需要先声明:
YourActivity c = this; // or SomeOtherClass c =this;
关于java - 你能在Android Studio中为 "this"设置一个变量吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39927193/