开发者

Reference issue with android HelloGridView tutorial

开发者 https://www.devze.com 2023-03-05 16:10 出处:网络
The classes GridView and BaseAdapter class can not be resolved. I added import android.widget.gridview, as well as import android.widget.baseadapter. But now setAdapter() is becoming not valid, and

The classes GridView and BaseAdapter class can not be resolved.

I added import android.widget.gridview, as well as import android.widget.baseadapter. But now setAdapter() is becoming not valid, and neither is setOnItemClickListener(OnItemClickListener).

Should I create a public class ImageAdapter in its own ImageAdapter.java file?

I believ开发者_StackOverflow中文版e the tutorials did not explain all the stuff clearly.


The tutorials suppose you already know some Java, and your environment is setup properly. If you cannot resolve your imports, it's not a Android issue, but your Eclipse/SDK setup that you should check.

You also definitely should create one file per public class.

0

精彩评论

暂无评论...
验证码 换一张
取 消