haijiang
2018-06-25 586f13d3aa93fc3fdfed65021b1a17a17acf3321
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
32
33
34
35
36
package com.moral.screen;
 
import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.cookie.store.PersistentCookieStore;
import com.moral.andbrickslib.utils.ScreenUtils;
import com.moral.andbrickslib.utils.log.XLog;
 
 
/**
 * Created by haijiang on 2017/5/2.
 */
 
public class MainApp extends Application {
    public static MainApp theApp;
    //用户id
    public int userId = 0;
    public int width;
    @Override
    public void onCreate() {
        super.onCreate();
        this.theApp = this;
        XLog.init("haijiang");
        width = ScreenUtils.getScreenWidth(this);
        OkGo.init(this);
        OkGo.getInstance().setCookieStore(new PersistentCookieStore());
    }
 
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}