|
|
@ -20,14 +20,13 @@ import android.net.Uri; |
|
|
|
|
|
|
|
|
|
|
|
import com.squareup.picasso.Picasso; |
|
|
|
import com.squareup.picasso.Picasso; |
|
|
|
import com.jakewharton.picasso.OkHttp3Downloader; |
|
|
|
import com.jakewharton.picasso.OkHttp3Downloader; |
|
|
|
import okhttp3.OkHttpClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class TuskyApplication extends Application { |
|
|
|
public class TuskyApplication extends Application { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onCreate() { |
|
|
|
public void onCreate() { |
|
|
|
// Initialize Picasso configuration
|
|
|
|
// Initialize Picasso configuration
|
|
|
|
Picasso.Builder builder = new Picasso.Builder(this); |
|
|
|
Picasso.Builder builder = new Picasso.Builder(this); |
|
|
|
builder.downloader(new OkHttp3Downloader(new OkHttpClient())); |
|
|
|
builder.downloader(new OkHttp3Downloader(this)); |
|
|
|
if (BuildConfig.DEBUG) { |
|
|
|
if (BuildConfig.DEBUG) { |
|
|
|
builder.listener(new Picasso.Listener() { |
|
|
|
builder.listener(new Picasso.Listener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|