Closed hoAlimoradi closed 7 years ago
same problem.
Please share more details about your problem. What "error" are you seeing? "How to declare" what? The sample project is in the repository, you can browse it and run the sample app yourself.
I mean this line : adapter = new ListAdapter(this, listView, items); please help me
I know this is old but i'll clarify it just in case someone finds it useful.
ListAdapter
is an interface. So, this line adapter = new ListAdapter(this, listView, items);
means that you must instantiate your custom adapter that implements ListAdapter
Just like some adapters extens other classes like:
public class MyCustomViewPagerAdapter extends EnchantedViewPagerAdapter{ }
you should declare your adapter and use it in that instantiation.
public class MyCustomGalleryListAdapter implements ListAdapter {
private Context myContext;
private AsymmetricGridView listView;
private ArrayList<AsymmetricItem> myElements;
public(Context myContext, AsymmetricGridView listView, ArrayList<AsymmetricItem> myElements){
this.myContext = myContext;
this.listView = listView;
this.myElements = myElements;
}
// All other interface methods and implementations
}
And then
adapter = new MyCustomGalleryListAdapter(this, listView, items);
I cant use AsymmetricGridView library becuase found erorr in "adapter" , how to declear it? can you send me sample project ?