Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Re: Por que ao rotacionar, o fragment é recriado antes da activity?

Matheus, um chute aqui de qm tb ficou com uma certa preguiça de ler o código todo, acho que o problema é que vc esta adicionando novamente o fragment no caso de rotação de tela. Ele já existe, vc vai lá e adiciona de novo. Vc em que dar um findFragmentByTag ou algo do tipo (ou pelo nome do layout no qual vc o coloca mesmo), pra ver se ele existe, e só se ele não existir, aí vc o cria. Nessas linhas aqui:

// ADICIONAR O USERSFRAGMENT NO DRAWER DO CHAT
       
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        ft
.add(R.id.drawer_container, new UserListFragment(),
                TAG_USERS_FRAGMENT
).commit();




2014-08-25 17:26 GMT-03:00 Matheus Silva <informatheus02@gmail.com>:
Pode me dar um exemplo de como eu faria para setar o adapter no listview com o Content Provider?

--
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.



--
Jade Moreira da Costa

--
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