1.单元测试
然而可以直接建立单元测试
<uses-library android:name="android.test.runner"/> 放在application里 <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.pccw" android:label="aaa"/> 需要手动修改包名
2.AutoCompleteTextView
private static final String[] autoStr=new String[] {"a","abc","abcd","abcde"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ArrayAdapter adapter= new ArrayAdapter(this, android.R.layout.simple_dropdown_item_1line ,autoStr); AutoCompleteTextView autocompletetextview= (AutoCompleteTextView) this.findViewById(R.id.Auto); autocompletetextview.setAdapter(adapter); }