Ho un'attività asincrona che scarica i dati dalla pagina Web utilizzando HTTPClient. Il problema è che mentre Picasso sta scaricando l'immagine, l'attività asincrona deve attendere il completamento del download dell'immagine.
Come è possibile eseguire l'attività asincrona prima del download dell'immagine?
Ho provato questo, ma non funziona:
protected Void doInBackground() {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
}
risposte:
0 per risposta № 1private Target target = new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
//Set the Bitmap into any views if you want.
// Start AsyncTask Here.
}
@Override
public void onBitmapFailed() {
}
}
private void someMethod() {
Picasso.with(this).load("url").into(target);
}