1- Armazena a imagem original. Usa até 15% da memória RAM disponível da aplicação. Chega a armazenar no máximo 50MB de imagens.
OkHttpClient okHttpClient = new OkHttpClient();
File cacheDir = new File(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString());
new Picasso.Builder(getContext())
.downloader(new OkHttpDownloader(cacheDir))
.build();
2- Sim.
3- Não.
4- Você precisaria especificar isso em seu próprio cliente http tipo abaixo e passar este cliente para o Picasso. Por default, não sei como funciona.
OkHttpClient okHttpClient = new OkHttpClient();
File cacheDir = new File(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString());
new Picasso.Builder(getContext())
.downloader(new OkHttpDownloader(cacheDir))
.build();
Em 19 de maio de 2015 12:03, dms <dms021@gmail.com> escreveu:
Rodrigo, muito bom o seu post, mas tenho algumas dúvidas: (Postei a mesma pergunta no seu blog para contribuir com os questionamentos)1 - Como o Picasso trabalha o cache das imagens?2 - As imagens ficam no cache mesmo após o encerramento do aplicativo, ou mesmo desligando o celular?3 - Se carrego a imagem de uma URL e a imagem muda, o Picasso consegue perceber e carrega-la novamente?E incluo uma outra.4 - Como acesso a imagem carregada anteriormente? Ex... Preciso passar o caminho da imagem para outra biblioteca , como a cardlibs, por exemplo ?ObrigadoDaniel
On Tuesday, May 12, 2015 at 4:38:02 PM UTC-3, Rodrigo Amora wrote:Confiram o meu post no meu blog sobre a biblioteca Picasso: http://rodrigoamora.com.br/blog/?p=524 --
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.
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.






0 comentários:
Postar um comentário