Android中的ListView和适配器,是否属于适配器设计模式? [英] ListView And Adapters In Android, Does Falls Under Adapter Design Pattern?

查看:296
本文介绍了Android中的ListView和适配器,是否属于适配器设计模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是Android应用程序开发的初学者.我开始创建ListView并处理ListView的内容.众所周知,我们通常将Adapter用作数据,并将View提供程序用于ListView.有人怀疑这真的属于正常的Adapter Design Pattern之下.另一个疑问是我是否要从第三方API获取列表的内容.在本文中,我使用两种视图类型,一种是在从API加载内容时显示加载视图,另一种是普通的View(ListRow).这是个好方法吗?任何帮助或解释将不胜感激.

I'm just a beginner in Android application development. And I came to this creating ListView and manipulating content for the ListView. We all know we usually use Adapter as a data and View provider for the ListView. Have one doubt is this really falls under the normal Adapter Design Pattern. One more doubt I'm fetching the content for my list from a third party API. In this I'm using two types of Views one is to show the loading view while the content is getting loaded from the API and the other is the normal View(ListRow). Is it good way of doing it ? Any help or explanation would be largely appreciated.

谢谢

推荐答案

Android List Adapters关注创造物对象而不是结构模式.我想知道为什么这个名称是Adapters.他们会像某些ItemListFactory一样命名它.

Android List Adapters follow creational object not structural pattern. I wonder why this name Adapters. They would have named it like some ItemListFactory.

这篇关于Android中的ListView和适配器,是否属于适配器设计模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆