Android7.0中文文档(API)-- ArrayAdapter
来源:互联网 发布:初中数学辅导软件 编辑:程序博客网 时间:2024/06/01 08:25
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/ArrayAdapter.html
ArrayAdapter
public class ArrayAdapter
extends BaseAdapter
implements Filterable, ThemedSpinnerAdapter
A concrete BaseAdapter that is backed by an array of arbitrary objects. By default this class expects that the provided resource id references a single TextView. If you want to use a more complex layout, use the constructors that also takes a field id. That field id should reference a TextView in the larger layout resource.
一个由任意对象数组支持的具体的BaseAdapter。默认情况下,这个类希望通过所提供的资源id来引用一个TextView。如果你想要使用更复杂的布局,请使用包含id字段的构造函数。该id字段应该在较大的布局资源中引用TextView。
However the TextView is referenced, it will be filled with the toString() of each object in the array. You can add lists or arrays of custom objects. Override the toString() method of your objects to determine what text will be displayed for the item in the list.
但是,引用的TextView将由数组中的每个对象的toString()方法来填充。你可以添加列表或自定义对象的数组。重载你的对象的toString()方法,以决定为列表中的项显示什么文本。
To use something other than TextViews for the array display, for instance, ImageViews, or to have some of data besides toString() results fill the views, overridegetView(int, View, ViewGroup)
to return the type of view you want.
要在除了TextView之外的其他控件中显示数组,例如,ImageView,或者除toString()之外的一些数据来填充视图,重载getView(int, View, ViewGroup)
,以返回你想要的视图类型。
摘要
继承常量
android.widget.Adapter
Public构造方法
ArrayAdapter(Context context, int resource)
Constructor
构造方法
ArrayAdapter(Context context, int resource, int textViewResourceId)
Constructor
构造方法
ArrayAdapter(Context context, int resource, T[] objects)
Constructor
构造方法
ArrayAdapter(Context context, int resource, int textViewResourceId, T[] objects)
Constructor
构造方法
ArrayAdapter(Context context, int resource, List<T> objects)
Constructor
构造方法
ArrayAdapter(Context context, int resource, int textViewResourceId, List<T> objects)
Constructor
构造方法
- Android7.0中文文档(API)-- ArrayAdapter
- Android7.0中文文档(API)--- FrameLayout
- Android7.0中文文档(API)--- DatePicker
- Android7.0中文文档(API) --- MediaController
- Android7.0中文文档(API)--- TabHost
- Android7.0中文文档(API) -- TimePicker
- Android7.0中文文档(API)-- ViewAnimator
- Android7.0中文文档(API)--- AbsoluteLayout
- Android7.0中文文档(API) -- Switch
- Android7.0中文文档(API) --- ToggleButton
- Android7.0中文文档(API) --- RadioButton
- Android7.0中文文档(API) --- CheckedTextView
- Android7.0中文文档(API) -- ScrollView
- Android7.0中文文档(API)-- DigitalClock
- Android7.0中文文档(API)-- TextClock
- Android7.0中文文档(API)---Chronometer
- Android7.0中文文档(API)--- AdapterView
- Android7.0中文文档(API)--- AdapterViewAnimator
- 阻抗计算(用SI9000如何计算微带线)
- 常见的差分(动)阻抗计算模型
- 阻抗计算公式、polar si9000(教程)
- 【原创】Capture CIS利用Access数据库建立封装库说明
- Arduino学习笔记二:修改LED点灯程序
- Android7.0中文文档(API)-- ArrayAdapter
- 控制Arduino的利器-Windows Remote Arduino
- [原创]Allegro 导入DXF文件,保留布好的线路信息
- c++ 堆、栈、自由存储区、全局/静态存储区和常量存储区
- 双模蓝牙CC2564调试笔记
- Android TextView文字底部或者中间 加横线
- 什么是SPI通信
- ELK5.1搭建过程(ElasticSearch, Logstash, Kibana)
- 【公式+矩阵快速幂】HDU_3117 Fibonacci Numbers