Reputation: 83
I am implementing staggered gridview in one of my app. I am following this tutorial (http://www.technotalkative.com/lazy-productive-android-developer-part-6-staggered-gridview/). but what i want is, adding the text below the image. So can you please tell me how to accomplish this..? I've googled around but cant able to find the right answer.
Thanks in advance.
Upvotes: 0
Views: 818
Reputation: 1855
private List<ItemObjects> getListItemData(){
List<ItemObjects> listViewItems = new ArrayList<ItemObjects>();
listViewItems.add(new ItemObjects("Alkane", R.drawable.one));
listViewItems.add(new ItemObjects("Ethane", R.drawable.two));
listViewItems.add(new ItemObjects("Alkyne", R.drawable.three));
listViewItems.add(new ItemObjects("Benzene", R.drawable.four));
listViewItems.add(new ItemObjects("Amide", R.drawable.one));
listViewItems.add(new ItemObjects("Amino Acid", R.drawable.two));
listViewItems.add(new ItemObjects("Phenol", R.drawable.three));
listViewItems.add(new ItemObjects("Carbonxylic", R.drawable.four));
listViewItems.add(new ItemObjects("Nitril", R.drawable.one));
listViewItems.add(new ItemObjects("Ether", R.drawable.two));
listViewItems.add(new ItemObjects("Ester", R.drawable.three));
listViewItems.add(new ItemObjects("Alcohol", R.drawable.four));
return listViewItems;
}
try this http://inducesmile.com/android/android-staggeredgridlayoutmanager-example-tutorial/
Upvotes: 1
Reputation: 128448
row_grid_item.xml
which is Step-3 given in tutorial.(BTW, thanks for referring my article, I am glad!)
Upvotes: 1