Android专项练习题
来源:互联网 发布:在职研究生网络教育 编辑:程序博客网 时间:2024/06/06 02:01
-->1. 使用SimpleAdapter作为 ListView的适配器,行布局中支持哪些组件?
answer: 解决上述问题可以通过以下方式,
----->1.搜索SimpleAdapter的API Reference,
-----> 2.在IDE中打开SimpleAdapter.java
/** * An easy adapter to map static data to views defined in an XML file. You can specify the data * backing the list as an ArrayList of Maps. Each entry in the ArrayList corresponds to one row * in the list. The Maps contain the data for each row. You also specify an XML file that * defines the views used to display the row, and a mapping from keys in the Map to specific * views. * * Binding data to views occurs in two phases. First, if a * {@link android.widget.SimpleAdapter.ViewBinder} is available, * {@link ViewBinder#setViewValue(android.view.View, Object, String)} * is invoked. If the returned value is true, binding has occurred. * If the returned value is false, the following views are then tried in order: * <ul> * <li> A view that implements Checkable (e.g. CheckBox). The expected bind value is a boolean. * <li> TextView. The expected bind value is a string and {@link #setViewText(TextView, String)} * is invoked. * <li> ImageView. The expected bind value is a resource id or a string and * {@link #setViewImage(ImageView, int)} or {@link #setViewImage(ImageView, String)} is invoked. * </ul> * If no appropriate binding can be found, an {@link IllegalStateException} is thrown. */public class SimpleAdapter extends BaseAdapter implements Filterable
------>3.通过以上资料,总结出
SimpleAdapter支持的View按照顺序分别为:
---->1.实现Checkable接口的View
---->2.TextView
---->3.ImageView
Reference
0 0
- Android专项练习题
- Android性能专项测试
- android 性能专项
- Android专项测试
- 面试——计算机网络专项练习题(一)
- Android安全专项-Apk加固
- Android应用专项测试浅谈
- Android性能专项测试之MAT
- Android性能专项测试之Systrace工具
- Android性能专项测试之GPU Monitor
- Android性能专项测试之Network monitor
- Android性能专项测试之Batterystats
- Android性能专项测试之Systrace工具
- Android性能专项测试之Network monitor
- Android性能专项测试之GPU Monitor
- Android性能专项测试之Network monitor
- Android性能专项测试之MAT
- Android性能专项测试之Systrace工具
- Swift学习笔记14——初始化(Initialization)和析构(Deinitialization)其一
- GNU Autotools的使用方法
- 天声人語 20151005
- OSI七层协议各层功能及典型设备
- 语义化前段UI框架Semantic UI
- Android专项练习题
- SEnginx安全相关模块配置说明
- JDBC
- 【PA2008】【BZOJ3500】Cliquers
- 1272:小希的迷宫
- 工具类
- 1.Python补充_序列的方法
- ASP.NET页面内传递参数方法
- 删除绿色版MySq