Reference issue with android HelloGridView tutorial
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.
精彩评论