Bom dia Pessoal
 
Gostaria de saber como eu faço para pegar dados do banco e mostrar no 
componente Spinner. Fiz desta maneira porém nada está trazendo:
 
String items;
 
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.lancamento);
 
  items = getResources().getString(R.layout.categoria);
  Spinner spnCategoria = (Spinner) findViewById(R.id.spnCategoria);

  ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
    this, R.layout.categoria,
    android.R.layout.simple_selectable_list_item);

  
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  spnCategoria.setAdapter(adapter);
 
Desde já agradeço pela atenção.
 
att,
Andreia

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to