Tecnologia do Blogger.
RSS

[androidbrasil-dev] Re: ListActivity iniciar marcada

Pessoal, solved!!! ðŸ˜€

Caso queiram saber, deixei de herdar de ListActivity e criei o ListView dentro do OnCreate mesmo (listView = (ListView)findViewById(android.R.id.list);)

Assim, o objeto listView tem o método setItemChecked e com isto foi só descobrir a position e usá-lo.

listView.setItemChecked(pos,true);

2016-07-18 14:05 GMT-03:00 Arthur Ruppenthal <arthur.ruppenthal@gmail.com>:
Pessoal.

Tenho uma ListActivity que não consigo criá-la com configuração já salva no BD marcada. Já tentei várias coisas antes e depois do setSelection:

adapter.notifyDataSetChanged();
adapter.notifyDataSetInvalidated();
setSelection(pos);
adapter.notifyDataSetChanged();
adapter.notifyDataSetInvalidated();
onContentChanged();

Agradeço desde já!

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário