com.blankj.utilcode.utils.Utils Java Examples

The following examples show how to use com.blankj.utilcode.utils.Utils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StoreApplication.java    From Bailan with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    Utils.init(getApplicationContext());
    LogUtils.init(true,false,'v',"TAG");

    mHandler=new Handler();
    initApplicationComponent();

    RxRetrofitApp.init(this, BuildConfig.DEBUG);

}
 
Example #2
Source File: StoreApplication.java    From Bailan with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    Utils.init(getApplicationContext());
    LogUtils.init(true,false,'v',"TAG");

    mHandler=new Handler();
    initApplicationComponent();

    RxRetrofitApp.init(this, BuildConfig.DEBUG);

}
 
Example #3
Source File: App.java    From FileManager with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    sContext = this;
    //初始化工具类
    Utils.init(this);
    //初始化category各个模块需要的单例
    CategoryManager.init(this);
    //初始化扫描、清理管理类
    ScanManager.init(this);
    CleanManager.init(this);
    //初始化文件初始路径和各种Preferences参数
    Settings.updatePreferences(this);
    //语言工具类初始化,用于语言切换
    LanguageUtil.init(this);
    //开启辅助杀功能
    MemoryAccessibilityManager.getInstance(this);
    //开启debug模式
    Loger.DEBUG = true;

    /*如果是第一次加载,那么数据库里没有数据,那么直接扫描获取数据,否则在主界面通过广播
            扫描完之后再进行数据更新*/
    if (SharedUtil.getBoolean(this, AppConstant.IS_FIRST, true)) {
        CategoryManager.getInstance().update();
        SharedUtil.putString(this, AppConstant.DEFAULT_SCAN_PATH,
                Settings.getDefaultDir());
        SharedUtil.putBoolean(this, AppConstant.IS_FIRST, false);
    }

    sWidth = ScreenUtils.getScreenWidth();
    sHeight = ScreenUtils.getScreenHeight();

}
 
Example #4
Source File: App.java    From C9MJ with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    instance = this;
    LeakCanary.install(this);
    Utils.init(getApplicationContext());
    ToastUtils.init(true);
    spUtils = new SPUtils(getString(R.string.app_name));
    RxPaparazzo.register(this);
}