‫I'll start with the convert view.
‫Dot set tag my viewholder.
‫The set tag method is used to attach an arbitrary object to the view object.
‫This tag can be any object that you find useful for associating additional data or information with
‫that view.
‫So I'm attaching my Viewholder, which is the viewholder object to the convert view using the set tag
‫method.
‫By doing this, you are associating the Viewholder with the specific view that it represents and the
‫primary reason for attaching Viewholder to the view using set tag method is to ensure that you later
‫can retrieve it from the view.
‫When you need to update the View's content, I'll move to add the else statement, and this else statement
‫refers for the case that the view is recycled.
‫Here.
‫I'm creating a new view because the convert view is not exist here.
‫I'm reusing the view because it exists and recycled.
‫When the view is recycled, you can retrieve the associated Viewholder using get tag method and use
‫it to efficiently populate the view with the data for the current starting by the my Viewholder equal
‫viewholder convert the view dot get tag result equal to convert view so the get tag method is used to
‫retrieve an object that was previously set as a tag using the set tag method on the view object.
‫It allows you to retrieve custom data or objects associated with a view and by using get tag and set
‫tag methods, you're able to access the viewholder that holds references to the views within the layout.
‫This allows you to efficiently update the recycled view with the appropriate data without needing to
‫find and assign views using fine view by ID method.
‫Repeatedly.
‫Then I'll move to use the my Viewholder dot planet name dot set text.
‫And here I'm getting the data from the modal class which is the planet set text data model or the planets.
‫Here I'll name it as planets.
‫Planets dot get planet name.
‫Also I need to get the moon count dot set text planets dot get moon count my viewholder dot planet image
‫dot set image resource and here I'll use planets dot get planet image.
‫You can see with text views.
‫I'll use the set text method while with the image views I'll use set image resource return.
‫Convert a view or the result.