Code example for SimpleCursorAdapter

Methods: setDropDownViewResource

	 * @param c 
	 * @param from 
	 * @return a SpinnerAdapter based on Cursor parameter 
	protected SpinnerAdapter createSpinnerCursorAdapter(Cursor c, String from) {
		SimpleCursorAdapter adapter = new SimpleCursorAdapter(ctx, android.R.layout.simple_spinner_item,
				c, new String[]{from}, new int[]{});
		return adapter;
	public void setAdapter(Cursor c, String from) {
		// Close previous cursor 
		spinner.setAdapter(createSpinnerCursorAdapter(c, from));
		spinner.setEnabled(c != null && c.getCount() > 1);
	public void closeAdapterCursor() { 
Connect your IDE to all the code out there  Get Codota for Java