actionbar设置背景图片和文字颜色


    
    
    
从数据库获取数据斌保存到数组,
String sql="select english from t_words";
		Cursor cursor=database.rawQuery(sql, null);
		String[] arr=new String[cursor.getCount()];
		int position=0;
		cursor.moveToFirst();
		while (cursor.moveToNext()) {
			String str=cursor.getString(cursor.getColumnIndex("english"));
			arr[position++]=str;
		}
		System.out.println(arr.length);
		String[] as=Arrays.copyOfRange(arr, 0, 200);
		arrayAdapter=new ArrayAdapter(this, android.R.layout.simple_list_item_1,as);
		search_word.setAdapter(arrayAdapter);

你可能感兴趣的:(Android功能)