2015年4月21日 星期二

[Android] Android The method startActivity(Intent) is undefined


Android The method startActivity(Intent) is undefined for the type new View.OnClickListener(){}

You can pass the object activity class to the adapter, from which you are calling the adapter. Then use that object to call startActivity.

reference:
http://stackoverflow.com/questions/13983129/android-the-method-startactivityintent-is-undefined-for-the-type-new-view-oncl

http://stackoverflow.com/questions/17505969/how-to-fix-the-method-startactivityintent-is-undefined-for-the-type-new-view-o

沒有留言:

張貼留言