本文整理了Java中android.widget.SimpleCursorAdapter.setDropDownViewResource()
方法的一些代码示例,展示了SimpleCursorAdapter.setDropDownViewResource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimpleCursorAdapter.setDropDownViewResource()
方法的具体详情如下:
包路径:android.widget.SimpleCursorAdapter
类名称:SimpleCursorAdapter
方法名:setDropDownViewResource
暂无
代码示例来源:origin: commonsguy/cw-omnibus
SpinnerAdapter buildPhonesAdapter(Activity a) {
String[] PROJECTION=new String[] { Contacts._ID,
Contacts.DISPLAY_NAME,
Phone.NUMBER
};
String[] ARGS={String.valueOf(Phone.TYPE_MOBILE)};
Cursor c=a.managedQuery(Phone.CONTENT_URI,
PROJECTION, Phone.TYPE+"=?",
ARGS, Contacts.DISPLAY_NAME);
SimpleCursorAdapter adapter=new SimpleCursorAdapter(a,
android.R.layout.simple_spinner_item,
c,
new String[] {
Contacts.DISPLAY_NAME
},
new int[] {
android.R.id.text1
});
adapter.setDropDownViewResource(
android.R.layout.simple_spinner_dropdown_item);
return(adapter);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
SpinnerAdapter buildPhonesAdapter(Activity a) {
String[] PROJECTION=new String[] { Contacts.Phones._ID,
Contacts.Phones.NAME,
Contacts.Phones.NUMBER
};
String[] ARGS={String.valueOf(Contacts.Phones.TYPE_MOBILE)};
Cursor c=a.managedQuery(Contacts.Phones.CONTENT_URI,
PROJECTION,
Contacts.Phones.TYPE+"=?", ARGS,
Contacts.Phones.NAME);
SimpleCursorAdapter adapter=new SimpleCursorAdapter(a,
android.R.layout.simple_spinner_item,
c,
new String[] {
Contacts.Phones.NAME
},
new int[] {
android.R.id.text1
});
adapter.setDropDownViewResource(
android.R.layout.simple_spinner_dropdown_item);
return(adapter);
}
}
代码示例来源:origin: dsolonenko/financisto
SimpleCursorAdapter currencyAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, currencyCursor,
new String[]{"e_name"}, new int[]{android.R.id.text1});
currencyAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
currencySpinner.setAdapter(currencyAdapter);
内容来源于网络,如有侵权,请联系作者删除!