本文整理汇总了Java中com.orm.SugarContext类的典型用法代码示例。如果您正苦于以下问题:Java SugarContext类的具体用法?Java SugarContext怎么用?Java SugarContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SugarContext类属于com.orm包,在下文中一共展示了SugarContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: onTerminate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onTerminate() {
super.onTerminate();
// Terminate Sugar ORM
SugarContext.terminate();
}
示例9: onCreate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
File dbPath = getDatabasePath("superheroesDb.db");
int b = 5;
}
示例10: onTerminate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onTerminate() {
super.onTerminate();
SugarContext.terminate();
bus.unregister(this);
for (Integer notificationId : refCountManager.getNotificationIds()) {
notificationManager.cancel(notificationId);
Timber.i("CLEAN UP from onTerminate with id=%s", notificationId);
}
}
示例11: onCreate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
}
示例12: onTerminate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onTerminate() {
super.onTerminate();
SugarContext.terminate();
}
示例13: onCreate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
}
示例14: onTerminate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onTerminate() {
SugarContext.terminate();
super.onTerminate();
}
示例15: onCreate
import com.orm.SugarContext; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(this);
APPLICATION_CONTEXT = this;
}