RecyclerView With Multiple View Types | Android Studio Tutorial

Published: 14 January 2022
on channel: The Code City
11,281
143

In this Android Tutorial, we'll be create a RecyclerView with multiple view types, or multiple layouts in our recyclerView.
As usual, we use the regular ViewHolder, ReyclerView Adapters, but in addition we override the getItemViewType method of the Adapter.
Follow along the code in your Android Studio, and we'll be done in no time!

For Using RecyclerView and CardView in your project, add the following dependencies in your app level gardle file:
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"

Github Link: https://github.com/Vysh01/MultiView-R...

Chapters:
00:00 - Intro
00:35 - Creating Layout 1 for Main Content of RecyclerView
12:33 - Create Layout 2 for Ads in RecyclerView
14:10 - Creating Main Activity Layout
14:37 - Creating MainActivity Java File
16:58 - Overring getItemViewType for Implementing Multiple ItemViews
21:00 - Running and Checking

#android #recyclerview


On this page of the site you can watch the video online RecyclerView With Multiple View Types | Android Studio Tutorial with a duration of hours minute second in good quality, which was uploaded by the user The Code City 14 January 2022, share the link with friends and acquaintances, this video has already been watched 11,281 times on youtube and it was liked by 143 viewers. Enjoy your viewing!