本文整理汇总了Java中uk.co.chrisjenx.calligraphy.CalligraphyConfig.initDefault方法的典型用法代码示例。如果您正苦于以下问题:Java CalligraphyConfig.initDefault方法的具体用法?Java CalligraphyConfig.initDefault怎么用?Java CalligraphyConfig.initDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uk.co.chrisjenx.calligraphy.CalligraphyConfig
的用法示例。
在下文中一共展示了CalligraphyConfig.initDefault方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mApplicationComponent = DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this)).build();
mApplicationComponent.inject(this);
AppLogger.init();
AndroidNetworking.initialize(getApplicationContext());
if (BuildConfig.DEBUG) {
AndroidNetworking.enableLogging(Level.BODY);
}
CalligraphyConfig.initDefault(mCalligraphyConfig);
}
示例2: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
Log.d("DEBUG", "Creating TypeMaps");
typeMaps = new TypeMaps();
super.onCreate();
CalligraphyConfig.initDefault
("Gotham-Light.ttf", R.attr.fontPath);
LineNumberReader lnr = new LineNumberReader
(new InputStreamReader
(getResources().openRawResource(R.raw.keys)));
registerClasses();
String parseClientKey;
try {
parseAppId = lnr.readLine();
parseClientKey = lnr.readLine();
Parse.initialize(this, parseAppId, parseClientKey);
Log.d("DEBUG", "Successfully initialized");
}
catch (IOException ioe) {
Log.e("DEBUG", "Failed to read keys", ioe);
}
}
示例3: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
createAppComponent();
DaggerAndroidInjector.initialize(this);
AppLogger.init();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
Stetho.initializeWithDefaults(this);
}
if (!LeakCanary.isInAnalyzerProcess(this)) {
LeakCanary.install(this);
}
CalligraphyConfig.initDefault(mCalligraphyConfig);
}
示例4: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
//Fabric initialization for Crashlytics
Fabric.with(this, new Crashlytics());
//create component
mAppComponent = DaggerAppComponent.builder()
.utilsModule(new UtilsModule(this)).build();
//configure timber for logging
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
}
//calligraphy for fonts
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Roboto-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build());
}
示例5: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
DaggerAppComponent.builder()
.application(this)
.build()
.inject(this);
AppLogger.init();
AndroidNetworking.initialize(getApplicationContext());
if (BuildConfig.DEBUG) {
AndroidNetworking.enableLogging(HttpLoggingInterceptor.Level.BODY);
}
CalligraphyConfig.initDefault(mCalligraphyConfig);
}
示例6: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
MultiDex.install(this);
Logger.addLogAdapter(new AndroidLogAdapter() {
@Override
public boolean isLoggable(int priority, String tag) {
return BuildConfig.DEBUG;
}
});
Hawk.init(getBaseContext()).build();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/lato_regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
}
示例7: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Fresco.initialize(this);//Init Fresco
applicationComponent = DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
.contextModule(new ContextModule(this))
.databaseModule(new DatabaseModule())
.networkModule(new NetworkModule())
.build();
applicationComponent.inject(this);
CalligraphyConfig.initDefault(calligraphyConfig);
Timber.plant(new Timber.DebugTree());
LeakCanary.install(this);
}
示例8: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
instance = this;
applicationComponent = DaggerApplicationComponent.builder()
.networkModule(new NetworkModule())
.presentersModule(new PresentersModule())
.sourceModule(new SourceModule(this))
.gatewaysModule(new GatewaysModule())
.managerModule(new ManagerModule(this))
.utilsModule(new UtilsModule(this))
.build();
JodaTimeAndroid.init(this);
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath(getString(R.string.font_ubuntu))
.setFontAttrId(R.attr.fontPath)
.build()
);
}
示例9: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Roboto-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
}
else{
Timber.plant(new CrashReportingTree());
}
applicationGraph = ObjectGraph.create(getModules().toArray());
applicationGraph.inject(this);
}
示例10: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
LeakCanary.install(this);
AndroidThreeTen.init(this);
Stetho.initializeWithDefaults(this);
installTimber();
this.registerApplicationComponent();
this.registerApiKeyComponent();
this.registerNetworkComponent();
this.registerDashboardComponent();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Lato-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
}
示例11: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/JosefinSans-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
setContentView(R.layout.developers);
toolbar = (Toolbar) findViewById(R.id.app_bar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
activityName = (TextView) findViewById(R.id.activity_name);
setSupportActionBar(toolbar);
//getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//Typeface tf2 = Typeface.createFromAsset(getAssets(),
// "Arsenal-Bold.otf");
//activityName.setTypeface(tf2);
activityName.setText("Developers");
}
示例12: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
pluggedComponents = new HashMap<>();
crashReporters = new HashMap<>();
registerCrashReporter(FirebaseCrashReporter.class.getCanonicalName(),
new FirebaseCrashReporter());
initDB();
analyticsSender = startAnalyticsTrackers();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setFontAttrId(R.attr.fontPath)
.build()
);
}
示例13: show
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
public ExtraWebViewCreator show() {
viewOption.setBookMarkIcon(_bookMarkIcon);
viewOption.setVoteIcon(_voteIcon);
viewOption.setColor(_color);
viewOption.setDefaultFontPath(_defaultFontPath);
viewOption.setThemeName(_themeName);
if (_defaultFontPath != null) {
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath(viewOption.getDefaultFontPath())
.setFontAttrId(R.attr.fontPath)
.build()
);
}
Intent intent = new Intent(context, ItemActivity.class);
intent.putExtra(ItemActivity.EXTRA_ITEM, dataModel);
intent.putExtra(ItemActivity.EXTRA_VIEW_OPTION, viewOption);
context.startActivity(intent);
return this;
}
示例14: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if(instance == null) {
instance = this;
}
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/FZLanTingHeiS-L-GB-Regular.TTF")
.setFontAttrId(R.attr.fontPath)
.build()
);
//存储application刚启动状态
ProjectSettingInfoPreUtil psip = ProjectSettingInfoPreUtil.getInstance();
psip.addSpApplicationIsFirstStart(true);
mLocalStorageUtil = new LocalStorageUtil();
mLocalStorageUtil.initLocalDir(this);
initImageLoader(getApplicationContext());
startXiaoMiPush();
}
示例15: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//change the font
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Roboto-Light.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
setContentView(R.layout.main);
mCameraView = (VariableJavaCameraView) findViewById(R.id.camera_view);
handler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
Toast.makeText(context, (String) msg.obj, Toast.LENGTH_LONG).show();
}
};
objectDetectionClient = new ObjectDetectionClient(handler);
}