I have spent days to figure this out but no luck. Wish I could get answer from here. I tried to load data into spinner from my content provider using the cursorLoader method
The problem lies in your construction of the SimpleCursorAdapter, specifically the second and fifth parameters (layout and to). From the docs:
layout: resource identifier of a layout file that defines the views for this list item. The layout file should include at least those named views defined in "to"
to: The views that should display column in the "from" parameter. These should all be TextViews. The first N views in this list are given the values of the first N columns in the from parameter. Can be null if the cursor is not available yet.
So you are correct to use android.R.layout.simple_spinner_item for layout. However, the views passed for to need to be TextViews and contained within android.R.layout.simple_spinner_item: i.e. android.R.id.text1 instead of R.id.spinner1.
In short, use this construction instead:
sAdapter = new SimpleCursorAdapter(
this,
android.R.layout.simple_spinner_item,
null,
new String[] {ShopperProvider.TAG_COLUMN_TAG},
new int[] {android.R.id.text1},
0);