本文整理了Java中android.support.v7.app.AppCompatActivity.attachBaseContext()
方法的一些代码示例,展示了AppCompatActivity.attachBaseContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppCompatActivity.attachBaseContext()
方法的具体详情如下:
包路径:android.support.v7.app.AppCompatActivity
类名称:AppCompatActivity
方法名:attachBaseContext
暂无
代码示例来源:origin: chrisjenx/Calligraphy
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
代码示例来源:origin: MindorksOpenSource/android-mvp-architecture
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
代码示例来源:origin: seven332/EhViewer
@Override
protected void attachBaseContext(Context newBase) {
Locale locale = null;
String language = Settings.getAppLanguage();
if (language != null && !language.equals("system")) {
String[] split = language.split("-");
if (split.length == 1) {
locale = new Locale(split[0]);
} else if (split.length == 2) {
locale = new Locale(split[0], split[1]);
} else if (split.length == 3) {
locale = new Locale(split[0], split[1], split[2]);
}
}
if (locale != null) {
newBase = ContextLocalWrapper.wrap(newBase, locale);
}
super.attachBaseContext(newBase);
}
}
代码示例来源:origin: ukanth/afwall
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
}
代码示例来源:origin: ukanth/afwall
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(Api.updateBaseContextLocale(base));
}
代码示例来源:origin: MichaelJokAr/MultiLanguages
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(LocalManageUtil.setLocal(newBase));
}
}
代码示例来源:origin: nekocode/Emojix
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(Emojix.wrap(newBase));
}
}
代码示例来源:origin: jamorham/xDrip-plus
@Override
protected void attachBaseContext(final Context baseContext) {
final Context context = xdrip.getLangContext(baseContext);
super.attachBaseContext(context);
}
代码示例来源:origin: queencodemonkey/loving-lean-layouts
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
}
代码示例来源:origin: NightscoutFoundation/xDrip
@Override
protected void attachBaseContext(final Context baseContext) {
final Context context = xdrip.getLangContext(baseContext);
super.attachBaseContext(context);
}
代码示例来源:origin: googlecreativelab/lipswap
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
}
代码示例来源:origin: hamidness/restring
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(Restring.wrapContext(newBase));
}
}
代码示例来源:origin: maksim88/PasswordEditText
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
}
代码示例来源:origin: finddreams/AndroidMultiLanguage
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(MultiLanguageUtil.attachBaseContext(newBase));
}
}
代码示例来源:origin: huxq17/SwipeCardsView
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
mBase = Base.getInstance(getApplicationContext());
}
代码示例来源:origin: iqiyi/Neptune
@Override
protected void attachBaseContext(Context newBase) {
mDelegate = new PluginActivityDelegate();
newBase = mDelegate.createActivityContext(this, newBase);
super.attachBaseContext(newBase);
}
代码示例来源:origin: mkulesh/microMathematics
@Override
protected void attachBaseContext(Context newBase)
{
final Locale prefLocale = AppLocale.ContextWrapper.getPreferredLocale(newBase);
ViewUtils.Debug(this, "Settings locale: " + prefLocale.toString());
super.attachBaseContext(AppLocale.ContextWrapper.wrap(newBase, prefLocale));
}
代码示例来源:origin: goeasyway/EasyPlug
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
try {
FrameworkHookHelper.hookActivityManagerNative();
FrameworkHookHelper.hookActivityThreadHandler();
FrameworkHookHelper.hookPackageManager();
} catch (Exception e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: prolificinteractive/ParallaxPager
@Override protected void attachBaseContext(Context newBase) {
//ParallaxPager and Calligraphy don't seem to play nicely together
//The solution was to add a listener for view creation events so that we can hook up
// Calligraphy to our view creation calls instead.
super.attachBaseContext(
new ParallaxContextWrapper(newBase, new OpenCalligraphyFactory())
);
}
代码示例来源:origin: VREMSoftwareDevelopment/WiFiAnalyzer
@Override
protected void attachBaseContext(Context newBase) {
Locale newLocale = new Settings(new Repository(newBase)).getLanguageLocale();
Context context = ConfigurationUtils.createContext(newBase, newLocale);
super.attachBaseContext(context);
}
内容来源于网络,如有侵权,请联系作者删除!