what did I do wrong? My spinner was filled in, but I see only amount of lines, which corresponds the amount of data? But I didn't see the name of data.
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, cursor, new String[] { Manufacturer.colMarke }, new int[] { android.R.id.text1 });
Spinner marke = (Spinner) findViewById(R.id.spinner2);
marke.setAdapter(adapter);
And xml
<Spinner
android:id="@+id/spinn开发者_StackOverflower2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
you forgot ad _id column in your cursor or forgot to call:
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
before
marke.setAdapter(adapter);
精彩评论