Java Code Examples for org.litepal.LitePal#initialize()
The following examples show how to use
org.litepal.LitePal#initialize() .
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: MyApplication.java From PoetryWeather with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); context = getApplicationContext(); LitePal.initialize(context); LitePal.getDatabase(); //初始化随机获取诗词 JinrishiciClient.getInstance().init(this); QMUISwipeBackActivityManager.init(this); //注册Mob MobSDK.init(this); //注册和风天气 HeConfig.init("HE1808181021011344","c6a58c3230694b64b78facdebd7720fb"); HeConfig.switchToFreeServerNode(); QMUISwipeBackActivityManager.init(this); }
Example 2
Source File: AppContext.java From SmallGdufe-Android with GNU General Public License v3.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); ButterKnife.setDebug(BuildConfig.DEBUG); LogUtils.configAllowLog = BuildConfig.DEBUG; LitePal.initialize(this); //友盟 MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL); //自动更新 UpdateConfig.getConfig() .init(this) // 数据更新接口数据,此时默认为使用GET请求 .url(AppConfig.BASE_URL+AppConfig.Url.updateURL) // 必填:用于从数据更新接口获取的数据response中。解析出Update实例。以便框架内部处理 .jsonParser(new UpdateParser() { @Override public Update parse(String response) { // 此处根据上面url接口返回的数据response进行update类组装。框架内部会使用此 // 组装的update实例判断是否需要更新以做进一步工作 Update update = new Gson().fromJson(response,Update.class); return update; } }); }
Example 3
Source File: App.java From UGank with GNU General Public License v3.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); // 初始化 LeakCanary if (LeakCanary.isInAnalyzerProcess(this)) { // This process is dedicated to LeakCanary for heap analysis. // You should not init your app in this process. return; } LeakCanary.install(this); BGASwipeBackManager.getInstance().init(this); INSTANCE = this; // 初始化主题色 ThemeManage.INSTANCE.initColorPrimary(getResources().getColor(R.color.colorPrimary)); ConfigManage.INSTANCE.initConfig(this); LitePal.initialize(this); }
Example 4
Source File: MyApplication.java From Focus with GNU General Public License v3.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); LitePal.initialize(this); LitePal.getDatabase().disableWriteAheadLogging(); mContext = this; initALog(); initErrorHandle(); BlockDetectByPrinter.start(); ImageLoaderManager.init(this); Toasty.Config.getInstance() .allowQueue(true) // optional (prevents several Toastys from queuing) .apply(); // required SkinCompatManager.withoutActivity(this) // 基础控件换肤初始化 .addInflater(new SkinMaterialViewInflater()) // material design 控件换肤初始化[可选] // .addInflater(new SkinConstraintViewInflater()) // ConstraintLayout 控件换肤初始化[可选] .addInflater(new SkinCardViewInflater()) // CardView v7 控件换肤初始化[可选] .setSkinStatusBarColorEnable(true) // 关闭状态栏换肤,默认打开[可选] .setSkinWindowBackgroundEnable(true) // 关闭windowBackground换肤,默认打开[可选] .loadSkin(); UserPreference.initCacheMap(); }
Example 5
Source File: App.java From 12306XposedPlugin with GNU General Public License v3.0 | 5 votes |
/** * 数据库管理 */ private void registerDatabaseManager() { LitePal.initialize(this); LitePal.registerDatabaseListener(new DatabaseListener() { @Override public void onCreate() { } @Override public void onUpgrade(int oldVersion, int newVersion) { } }); }
Example 6
Source File: App.java From Yuan-WanAndroid with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); mApp = this; LitePal.initialize(this); initBugly(); initLeakCanary(); mAppComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build(); }
Example 7
Source File: MyApplication.java From Focus with GNU General Public License v3.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); LitePal.initialize(this); LitePal.getDatabase().disableWriteAheadLogging(); mContext = this; initALog(); initErrorHandle(); BlockDetectByPrinter.start(); ImageLoaderManager.init(this); Toasty.Config.getInstance() .allowQueue(true) // optional (prevents several Toastys from queuing) .apply(); // required SkinCompatManager.withoutActivity(this) // 基础控件换肤初始化 .addInflater(new SkinMaterialViewInflater()) // material design 控件换肤初始化[可选] // .addInflater(new SkinConstraintViewInflater()) // ConstraintLayout 控件换肤初始化[可选] .addInflater(new SkinCardViewInflater()) // CardView v7 控件换肤初始化[可选] .setSkinStatusBarColorEnable(true) // 关闭状态栏换肤,默认打开[可选] .setSkinWindowBackgroundEnable(true) // 关闭windowBackground换肤,默认打开[可选] .loadSkin(); UserPreference.initCacheMap(); }
Example 8
Source File: App.java From FakeWeather with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); mContext = getApplicationContext(); LitePal.initialize(this); if (!BuildConfig.DEBUG) { AppExceptionHandler.getInstance().setCrashHanler(this); } Bugly.init(getApplicationContext(), "914abea303", false); }
Example 9
Source File: MyApp.java From LQRWeChat with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); LitePal.initialize(this); //初始化融云 initRongCloud(); //初始化红包 initRedPacket(); //初始化仿微信控件ImagePicker initImagePicker(); //初始化表情控件 LQREmotionKit.init(this, (context, path, imageView) -> Glide.with(context).load(path).centerCrop().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(imageView)); //初始化ShareSDK ShareSDK.initSDK(getContext()); }
Example 10
Source File: App.java From pe-protector-moe with GNU General Public License v3.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); LitePal.initialize(this); mContext = getApplicationContext(); }
Example 11
Source File: App.java From Yuan-SxMusic with Apache License 2.0 | 4 votes |
@Override public void onCreate(){ super.onCreate(); context=getApplicationContext(); LitePal.initialize(this); }
Example 12
Source File: App.java From SQLiteToExcel with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); LitePal.initialize(this); }
Example 13
Source File: MyApplication.java From LitePal with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); LitePal.initialize(this); }