I am making an app in which I want to set images onto gridview and on itemclick I want to show the description of an image via textview. I have already done the setting of images onto gridview, but now I want to do the second part of it.
Following Images shows the visualization of The layout :
Basically, I want to Add a new layout in between of 2 rows of gridview below the clicked image. I have done a lot of research and also seen many libraries and StackOverflow answers but can't figure out to do so. I need example code to do so for gridview or any other views. Thanks.
All the stackoverflow Answers and libraries that i have gone through :=
You can try the following approach for your reference : I am using text view instead of ImageView. But the concept remain same. It is displayed something like this.
Const.java : Class to keep constants.
RowData.java : An Interface which will be used by the adapter class to get view type of each element.
FoodItem.java : Just a plain pojo class which implements RowData ( The parent item FoodItem item 0 is populated )
FakeData.java : Pojo class to populate empty views.
FoodAdapter.java : Adapter class.
MainActivity.java : Activity class.
activity_main.xml
des.xml
layout.xml