0
我正在使用SimpleCursorAdapter从数据库中填充名称列的微调器。显示数据库中选择的项目的数据库详细信息
适配器:
spinnerAdapter = new SimpleCursorAdapter(
this,
android.R.layout.simple_spinner_item,
null,
new String[] {SupplierEntry.COLUMN_SUPPLIER_NAME},
new int[] {android.R.id.text1},
0);
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);
mSuppliersSpinner.setAdapter(spinnerAdapter);
getLoaderManager().initLoader(SUPPLIERS_LOADER, null, this);
光标装载机:
@Override
public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
// Define a projection that specifies the columns from the table we care about.
String[] projection = {
SupplierEntry._ID,
SupplierEntry.COLUMN_SUPPLIER_NAME};
// This loader will execute the ContentProvider's query method on a background thread
return new CursorLoader(this, // Parent activity context
SupplierEntry.CONTENT_URI, // Provider content URI to query
projection, // Columns to include in the resulting Cursor
null, // No selection clause
null, // No selection arguments
null); // Default sort order
}
我怎么可能,在离心器中选择一个项目(名称列),显示出一些textviews所有其他细节?