ListView and adapters in Android, does it fall under the adapter design template?

I'm just a novice Android app developer. And I came to this creation ListViewand manipulated content for ListView. We all know what we usually use Adapteras a data source and Viewfor ListView. You have one doubt that this really falls under normal Adapter Design Pattern. Another doubt is that I am collecting content for my list from a third-party API. In this, I use two types of views to show the loading view when the content is loaded from the API and the other is normal View(ListRow). Is this a good way to do this? Any help or explanation would be greatly appreciated.

thank

0
source share
2 answers

Android List Adaptersfollows a creational object, not a structural template. I wonder why this name is Adapters. They would call him what ItemListFactory.

+1
source

Android adapters are actually the same adapter design pattern according to GoF. Adapters are used to provide a known interface to unknown objects. for example: if we use any third-party libraries, it is recommended to adapt the adapters so that the third-party interface is converted to a known interface. Then it becomes easier to replace the 3rp batch libraries by simply adding a new adapter.

ListView Android . , , Android-. , .

0

Source: https://habr.com/ru/post/1666681/


All Articles