本文整理汇总了Java中uk.co.chrisjenx.calligraphy.CalligraphyConfig类的典型用法代码示例。如果您正苦于以下问题:Java CalligraphyConfig类的具体用法?Java CalligraphyConfig怎么用?Java CalligraphyConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CalligraphyConfig类属于uk.co.chrisjenx.calligraphy包,在下文中一共展示了CalligraphyConfig类的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();
//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());
}
示例4: onLayout
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入依赖的package包/类
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
adjustBounds();
if (!hasUpdated) {
try {
Typeface face = Typeface.createFromAsset(getEditText().getContext().getAssets(), CalligraphyConfig.get().getFontPath());
setTypeface(face);
getEditText().setTypeface(face);
} catch (Exception e) {
e.printStackTrace();
}
hasUpdated = true;
}
}
示例5: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
try {
ConcealPrefRepository.applicationInit(this);
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath(getString(R.string.font_regular))
.setFontAttrId(R.attr.fontPath)
.build()
);
setAppComponent(DaggerAppComponent
.builder()
.appModule(new AppModule(this))
.build());
errorHandler();
}
catch (Exception e) {
e.printStackTrace();
}
}
示例6: 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);
}
示例7: 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);
}
示例8: 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()
);
}
示例9: 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()
);
}
示例10: 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);
}
示例11: onCreate
import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入依赖的package包/类
public void onCreate() {
super.onCreate();
Iconify.with(new FontAwesomeModule());
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/bariol_regular-webfont.ttf")
.setFontAttrId(R.attr.fontPath)
.build());
Configuration dbConfiguration = new Configuration.Builder(this)
.setDatabaseName("storage.db")
.addModelClass(NewsModel.class)
.create();
ActiveAndroid.initialize(dbConfiguration);
}
示例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();
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()
);
}
示例15: 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");
}