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所有其他細節?