本文整理汇总了Java中uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper类的典型用法代码示例。如果您正苦于以下问题:Java CalligraphyContextWrapper类的具体用法?Java CalligraphyContextWrapper怎么用?Java CalligraphyContextWrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CalligraphyContextWrapper类属于uk.co.chrisjenx.calligraphy包,在下文中一共展示了CalligraphyContextWrapper类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@Override
protected void attachBaseContext(Context newBase) {
if (!customFontInitDone) {
// FIXME: make actually customizable via resources
// (see file extension string formatting nonsense)
CalligraphyConfig.initDefault(
new CalligraphyConfig.Builder()
.setDefaultFontPath(newBase.getString(R.string.normal_text_font_name))
.setFontAttrId(R.attr.fontPath)
.build());
customFontInitDone = true;
}
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
SDKGlobals.init(this);
}
示例2: getBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@NonNull
static Context getBaseContext(@NonNull View view) {
Context context = view.getContext();
if (context instanceof ContextThemeWrapper) {
context = ((ContextThemeWrapper) view.getContext()).getBaseContext();
} else if (context instanceof CalligraphyContextWrapper) {
context = ((CalligraphyContextWrapper) view.getContext()).getBaseContext();
}
return context;
}
示例3: attachBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
// setup self handling alarm receiver
MedtronicCnlAlarmManager.setContext(getBaseContext());
}
示例4: attachBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@Override
protected void attachBaseContext(Context newBase) {
if (HiApplication.isFontSet())
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
else
super.attachBaseContext(newBase);
}
示例5: attachBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
示例6: attachBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@Override protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
示例7: attachBaseContext
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; //导入依赖的package包/类
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(base));
}