基于 List 的适配器 BeanAdapter

码农软件 · 软件分类 · Java开发工具 · 2019-11-06 19:14:38

软件介绍

BeanAdapter

BeanAdapter 是以List<Object> 为适配来源的adapter。List<Object>对adapter解决自定义对象的线性填充。

demo:

List trips = new ArrayList();
trips.add(trip1);
trips.add(trip2);
trips.add(trip3);
BeanAdapter beanAdapter = new BeanAdapter()
//准备对应的object 字段
.buildNames("name","desc","positionRef","shareSuggestion","district","url")
//准备和上面字段对应的填充id
.buildViewId(R.id.name,R.id.desc,R.id.positionref,R.id.sharesuggestion,R.id.district,R.id.image)
//完成配对,注意字段不要拼错,然后设置id群所在的item布局
.buildItemLayout(R.layout.item_layout)
//最后一步配置view和value 在内部配对的converter,保证值解入view,可自定义设定
.buildConverter(new DefaultValueViewConverter()).build(trips);
adapterView.setAdapter(beanAdapter);


本文地址:https://www.codercto.com/soft/d/18417.html

Modeling the Internet and the Web

Modeling the Internet and the Web

Pierre Baldi、Paolo Frasconi、Padhraic Smyth / Wiley / 2003-7-7 / USD 115.00

Modeling the Internet and the Web covers the most important aspects of modeling the Web using a modern mathematical and probabilistic treatment. It focuses on the information and application layers, a......一起来看看 《Modeling the Internet and the Web》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具