1,AutoCompleteTextView
2,初始化控件
3,设置适配器,ArrayAdapter(String) (this,android.R.layout.simple_list_item_1,res) ;
4,初始化数据源 String[] res={"","","","",};
5,将适配器和控件绑定 acTextView.setAdapter(adapter);
6,设置匹配门槛 completionThreshold=""
2,初始化控件
3,设置适配器,ArrayAdapter(String) (this,android.R.layout.simple_list_item_1,res) ;
4,初始化数据源 String[] res={"","","","",};
5,将适配器和控件绑定 acTextView.setAdapter(adapter);
6,设置匹配门槛 completionThreshold=""
2016-09-21
关键在于 singleLine="true" ellipsize="Marquee" 继承TextView 写上全部的构造方法 然后重写onFocus(),令返回值为true
2016-09-19
Android studio 中创建white_bg 右键drawable直接创建一个xml文件,内容更改既可
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
</shape>
2016-09-18