本文整理汇总了Java中com.orm.SugarContext.init方法的典型用法代码示例。如果您正苦于以下问题:Java SugarContext.init方法的具体用法?Java SugarContext.init怎么用?Java SugarContext.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.orm.SugarContext
的用法示例。
在下文中一共展示了SugarContext.init方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SugarContext.init(this);
activity = this;
context = this.getApplicationContext();
isGPSPermissionOn();
setViewPagerAndTabs();
checkSecurity();
createTransportModes();
googleApiClientBuild();
// new ProfileBackup().handleBackup("import");
// mGoogleApiClient.connect();
}
示例2: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mPrefs = new PreferenceManager(this);
Fresco.initialize(this);
SugarContext.init(this);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
if (mPrefs.getRemoteAccessActive())
startServer();
}
示例3: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SugarContext.init(this);
}
示例4: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
LeakCanary.install(this);
//Load Default settings
PreferenceManager.setDefaultValues(this, R.xml.pref_data_sync, false);
PreferenceManager.setDefaultValues(this, R.xml.pref_general, false);
new Notification(0, this).loadDefault();
}
示例5: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
SugarContext.init(this);
Alarming.getInstance().init(this);
}
示例6: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override public void onCreate() {
super.onCreate();
instance = this;
SugarContext.init(this.getApplicationContext());
FileHelper.initFolderName(getString(R.string.app_name));
TypeFaceHelper.generateTypeface(this.getApplicationContext());
PreferenceManager.setDefaultValues(this, R.xml.fa_settings, false);
FirebaseDatabase.getInstance().setPersistenceEnabled(false);
}
示例7: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Initialize Sugar ORM
SugarContext.init(this);
// Start services
sendBroadcast(new Intent(this, RegisterReceivers.class));
}
示例8: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
File dbPath = getDatabasePath("superheroesDb.db");
int b = 5;
}
示例9: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
}
示例10: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
}
示例11: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
APPLICATION_CONTEXT = this;
}
示例12: open
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void open(Context context) {
SugarContext.init(context);
}
示例13: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
//Bad static initializers.
SugarContext.init(this);
Once.initialise(this);
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.NO_ENCRYPTION)
.setStorage(HawkBuilder.newSqliteStorage(this))
.setLogLevel(LogLevel.FULL)
.build();
vaporAppComponent = VaporAppComponent.Initializer.init(this);
uiComponent = DaggerUiComponent.builder()
.vaporAppComponent(vaporAppComponent)
.build();
vaporAppComponent.inject(this);
registerBus();
initStetho();
if (BuildConfig.DEBUG) {
//When debugging logs will go through the Android logger
Timber.plant(new Timber.DebugTree());
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectCustomSlowCalls()
.detectDiskReads()
.detectDiskWrites()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectActivityLeaks()
.penaltyLog()
.build());
}
Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this));
}
示例14: onCreate
import com.orm.SugarContext; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Log.i(TAG, "Init Database");
Log.d("Sugar", "DB init");
SugarContext.init(this);
Log.d("Sugar", "DB inited");
Log.i(TAG, "DB inited");
}