‫Hello my friends, and welcome back.
‫In this video we're going to introduce a new concept in Android called the View Holders.
‫The view holder is a design pattern used in Android to improve the performance of List View and Recycler
‫View by caching views for smoother scrolling.
‫It's particularly helpful when working with adapters, where the get the view method is called a.
‫Frequently, as the user scrolls through a list or grid of items, the view holder is an inner class
‫within the custom adapter.
‫It serves as a container for the views for a single item in the grid view.
‫The purpose of using view holder is to reduce the number of calls to find a view by ID method, which
‫can be an expensive operation, especially in large lists or grids.
‫Imagine you have 100 items in your grid view or list view.
‫You need to call Find View by ID 100 times, but with using the view holder technique and design pattern,
‫this will be reduced.
‫The third step is to override the get view.
‫So I'll go up and write Get View and click okay.
‫And here I'm overriding the Get View method.
‫The get view method is a crucial part of the adapter class in Android, and it's responsible for returning
‫a view that represents an item at a specific position in a list, grid view, or other similar components.
‫In the next video, we're going to deep dive into the getter view and link the view holder with the
‫get view.
‫So this is how we create the inner class view holder in our adapters.