由网友(>不带符号的长:我们都是毕业后才爱上学校)分享简介:我要开始从AB的活动,(从LinearLayout中延伸)一个新的活动..但这个code是不正确的。 意向书I =新意图(SearchResultForm.this,MainActivity.class);startActivity(ⅰ); ...... 公共类SearchResultForm扩展的LinearLa...
我要开始从AB的活动,(从LinearLayout中延伸)一个新的活动..但这个code是不正确的。
意向书I =新意图(SearchResultForm.this,MainActivity.class);startActivity(ⅰ);
......
公共类SearchResultForm扩展的LinearLayout {...
和我得到这个错误。
类型SearchResultForm没有外围实例是在范围访问
我该怎么办呢?
解决方案只是猜测,因为我看不到你的code的休息,但尝试:
意向书I =新意图(这一点,MainActivity.class);startActivity(ⅰ);
i want to start a new activity from ab activity that (extends from Linearlayout) .. but this code is not right
Intent i = new Intent(SearchResultForm.this, MainActivity.class);
startActivity(i);
... ...
public class SearchResultForm extends LinearLayout{ ...
and i get this error ..
No enclosing instance of the type SearchResultForm is accessible in scope
how can i do it ?
解决方案Just guessing since I can't see the rest of your code, but try:
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
相关推荐
最新文章