摘要: 安卓组件中,凡是需要配置数据的组件,一般都是用Adapter配置。 AutoCompleteTextView的使用方法与ListView类似,也是用setAdapter来设置数据。 MultiAutoCompleteTextView与AutoCompleteTextView的区别就是需要设置分隔符。 使用系统提供的分隔符,该分隔符是逗号: setTokenizer(new MultiAuto... 阅读全文
posted @ 2014-12-01 21:55 薛遗山 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 解决TextView文字显示不全的问题。 简单设置跑马灯的效果: 2、此方法存在一个问题,多个TextView的话,只有一个显示跑马灯的效果,解决办法是继承TextView类,重写isFocused方法,使之返回真 阅读全文
posted @ 2014-12-01 21:31 薛遗山 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 使用ListAdapter是ListView的适配器。 使用ListView.setAdapter()方法来设置ListView的适配器。 简单的使用 adapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1); adapter.add("hello"); ... 阅读全文
posted @ 2014-12-01 21:24 薛遗山 阅读(547) 评论(0) 推荐(0) 编辑