Tecnologia do Blogger.
RSS

[androidbrasil-dev] Problemas de Memória ao carregar animações com AnimationDrawable

Boa tarde amigos,

Alguém aqui poderia me dar uma força em um problema sério que tenho enfrentado..

Tenho algumas imagens e gostaria de carregá-las na inicialização do App, pois elas serão animadas e isso tem causado problemas de memória e queda de performance.. 


O erro java.lang.OutOfMemoryError ocorre sempre quando o setBackgroundResource é utilizado..

animation = (ImageView) findViewById(R.id.imgAnime);
animation.setBackgroundResource(R.drawable.anime);
frameAnimation = (AnimationDrawable) animation.getBackground();

Alguma sugestão ?

Obrigado

Atenciosamente

Gorio
(www.gorio.eng.br)

 

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