本文整理汇总了Java中org.litepal.LitePal.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java LitePal.initialize方法的具体用法?Java LitePal.initialize怎么用?Java LitePal.initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.litepal.LitePal
的用法示例。
在下文中一共展示了LitePal.initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
x.Ext.init(this);
initCloudChannel(this);
x.Ext.setDebug(true);
context=getApplicationContext();
LitePal.initialize(context);
LoadingLayout.getConfig()
.setErrorText("出错啦~请稍后重试!")
.setEmptyText("抱歉,暂无数据")
.setNoNetworkText("无网络连接,请检查您的网络···")
.setErrorImage(R.mipmap.error)
.setEmptyImage(R.mipmap.empty)
.setNoNetworkImage(R.mipmap.no_network)
.setAllTipTextColor(R.color.black)
.setAllTipTextSize(14)
.setReloadButtonText("点我重试哦")
.setReloadButtonTextSize(14)
.setReloadButtonTextColor(R.color.black)
.setReloadButtonWidthAndHeight(150,40);
}
示例2: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@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;
}
});
}
示例3: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
app = this;
/* 初始化LitePal数据库 */
LitePal.initialize(this);
}
示例4: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@SuppressWarnings("unused")
@Override
public void onCreate() {
super.onCreate();
LitePal.initialize(this);
context = getApplicationContext();
discoverApplication = this;
HttpUtils.getInstance().init(this, DebugUtil.DEBUG);
}
示例5: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mContext = getApplicationContext();
LitePal.initialize(this);
if (!BuildConfig.DEBUG) {
AppExceptionHandler.getInstance().setCrashHanler(this);
}
}
示例6: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
initSophix();
context = getApplicationContext();
LitePal.initialize(context);
}
示例7: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mApplicationContext = this;
RetrofitHttpClient.init();
ToastUtil.init(mApplicationContext);
Logger.init("Lai");
LitePal.initialize(this);
DownloadUtil.init();
}
示例8: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
preferences = PreferenceManager.getDefaultSharedPreferences(context);
boolean isNightMode=preferences.getBoolean("pref_theme_dark",false);
if(isNightMode){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
}
LitePal.initialize(context);
}
示例9: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@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());
}
示例10: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_clock);
ButterKnife.bind(this);
LitePal.initialize(getApplicationContext());
enableBootReceiver(true);
setSupportActionBar(toolbar);
parentLayout = findViewById(R.id.clock_layout);
drawer = NavigationDrawer.getDrawerBuilder(this,this,toolbar).build();
drawer.setSelection(1,false);
mProgress = new ProgressDialog(this);
mProgress.setMessage(getString(R.string.sync_google_calendar_loader));
prepareAnalogClock();
preparePillsAdapter();
setPills();
if(getIntent().getBooleanExtra("pill",false)){
pillAddedSuccess();
}
if(getIntent().getBooleanExtra("modified",false)){
pillEditSuccess();
}
if(getIntent().getBooleanExtra("deleted",false)){
deleteSuccess();
}
// Initialize credentials and service object.
mCredential = GoogleAccountCredential.usingOAuth2(
getApplicationContext(), Arrays.asList(SCOPES))
.setBackOff(new ExponentialBackOff());
}
示例11: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mContext = getApplicationContext();
LitePal.initialize(this);
FileDownloader.setupOnApplicationOnCreate(this);
}
示例12: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this)
.writeDebugLogs()
.build();
ImageLoader.getInstance().init(configuration);
LitePal.initialize(this);
Fresco.initialize(this);
}
示例13: initializeSdk
import org.litepal.LitePal; //导入方法依赖的package包/类
/**
* 初始化一些集成的SDK
*/
private void initializeSdk() {
//初始化 Logger SDK
Logger.init(getString(R.string.app_name)).logLevel(BuildConfig.DEBUG ? LogLevel.FULL : LogLevel.NONE);
//初始化 LitePal SDK
LitePal.initialize(mContext);
//初始化 百度地图 SDK (如果在Activity中初始化,一定要在setContentView之前)
SDKInitializer.initialize(mContext);
}
示例14: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
context = getApplicationContext();
LitePal.initialize(context);
}
示例15: onCreate
import org.litepal.LitePal; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
LitePal.initialize(context);
}