On Android is possible to inflate a layout inside a gridview

Asked

Viewed 148 times

0

I’m trying to create an e-book reader, in the main Activity should appear a gridview where each position should present a thumbnail of the book cover, below appear the book name, author name and publication date: what I hope is something like this:

inserir a descrição da imagem aqui

BS.: Please disregard the stars and the options button only need the image and the three texts.

at the moment I am using a Gridview, to place within each position a Linear layout that contains an imageview and three textview.

My question is: Can I inflate a layout within a gridview or is there another way to do what I intend?

1 answer

0


The best solution in this case is to use Recyclerview and Gridlayoutmanager.

Recyclerview works as a Listview, that is, you will need an Adapter. This Tutorial in English shows how you can use Recyclerview. It uses Linearlayoutmanager. In your case, you will use Gridlayoutmanager.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.