-
Notifications
You must be signed in to change notification settings - Fork 32
/
App.java
31 lines (25 loc) · 793 Bytes
/
App.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.lhh.frescoimageview.demo;
import android.app.Application;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory;
import com.facebook.imagepipeline.core.ImagePipelineConfig;
import okhttp3.OkHttpClient;
/**
* Created by Linhh on 16/2/18.
*/
public class App extends Application{
@Override
public void onCreate() {
super.onCreate();
initOKFresco();
}
private void initFresco(){
Fresco.initialize(this);
}
private void initOKFresco(){
ImagePipelineConfig frescoConfig = OkHttpImagePipelineConfigFactory
.newBuilder(this, new OkHttpClient())
.build();
Fresco.initialize(this,frescoConfig);
}
}