i have started to learn android development. i am making an app in which i want to show movie thumbnails(image view and text view) combined in grid view layout i have made custo
Here's the solution to your issue. You're using the adapter incorrectly. You're inflating the 'GridView' with the adapter in this line.
convertView =inflater.inflate(R.layout.activity_main,viewGroup,false);
That's no what you want to do. You want to make an other XML Layout
that represents each movie's title in a TextView
and image in an Imageview
This tutorial should help you. It's for a list view but all adapters in android pretty much work the same way. Adapter Tutorial
I noticed a something you can improve upon. Put your inflator
inside you convertview == null
. There's no point to creating this object when it's not used.