I want to make a view with first item is larger than others like attach image. i used RecyclerView but i don't know how to custom layout for first item. Someone please tell me the way to do it.
Many thanks!
I want to make a view with first item is larger than others like attach image. i used RecyclerView but i don't know how to custom layout for first item. Someone please tell me the way to do it.
Many thanks!
You should look into view types for RecyclerView. This allows you to use different layouts for different types of rows. You can find several examples on this site such as this.
I recommend you to use a StaggeredGridLayout in your RecyclerView. It will look like Pinterest and you can then put all the items of the same size, except for the first one where you can put a bigger one and the layout will do everything for you. The StaggeredGridLayout will look like this:

You can also use a GridLayout and make an item use more than one cell like here:

You can easily google for a tutorial using the terms I provided.
I hope it helps!