Tecnologia do Blogger.
RSS

[androidbrasil-dev] Problema com Fragment.

Opa pessoal,

Estou com o seguinte problema. dentro do meu fragment eu inicio uma intent para abrir a galeria dessa forma:


@Override
@SuppressLint("InlinedApi")
public void onClick(View v) {

Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.setFlags(Intent.FILL_IN_ACTION);

if (android.os.Build.VERSION.SDK_INT > 11)
intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
startActivityForResult(intent, RESULT_IMAGE_LOADED);

}


Depois que seleciono a imagem e volto ao meu fragment no onActivityResult os componentes do meu fragment vem todos null, alguém sabe o por que isto está acontecendo. Como que eu faço para salvar a instância do meu fragment para que ele não venha nulo?

--







Atenciosamente,
Douglas Alípio Mesquita

--
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/groups/opt_out.
 
 

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

0 comentários:

Postar um comentário