本文整理了Java中android.support.v7.app.AppCompatDelegate.createView()
方法的一些代码示例,展示了AppCompatDelegate.createView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppCompatDelegate.createView()
方法的具体详情如下:
包路径:android.support.v7.app.AppCompatDelegate
类名称:AppCompatDelegate
方法名:createView
暂无
代码示例来源:origin: JavaNoober/BackgroundLibrary
@Override
public View onCreateView(String name, Context context, AttributeSet attrs) {
return delegate.createView(null, name, context, attrs);
}
});
代码示例来源:origin: OCNYang/FontTest
@Override
public View onCreateView(View parent, String name, Context context,
AttributeSet attrs) {
View view = mAppCompatDelegate.createView(parent, name, context, attrs);
if (view instanceof TextView) {
((TextView) view).setTypeface(sTypeface);
}
return view;
}
}
代码示例来源:origin: kongpengcheng/SmartRetrofit
@Override
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
AppCompatDelegate delegate = getDelegate();
View view = delegate.createView(parent, name, context, attrs);
if (view != null && view instanceof EditText) {
EditText et = (EditText) view;
et.setImeOptions(et.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
return et;
}
return view;
}
});
代码示例来源:origin: jasonliyihang/speed_tools
private View handleView(View parent, String name, Context context, AttributeSet attrs) {
View view = null;
info = new SPFontInfo();
List<SPThemeAttr> themeAttrs = getThemeAttrs(name, attrs, context);
if (info.isExist) {
view = delegate.createView(parent, name, context, attrs);
if (view == null) {
view = createViewFromTag(context, name, attrs);
}
info.viewWeakReference = new WeakReference<>(view);
infos.add(info);
info.use();
}
if (!themeAttrs.isEmpty()) {
if (!info.isExist) {
view = delegate.createView(parent, name, context, attrs);
if (view == null) {
view = createViewFromTag(context, name, attrs);
}
}
if (view != null) {
SPThemeView cxThemeView = new SPThemeView(view, themeAttrs);
views.add(cxThemeView);
cxThemeView.use();
}
}
return view;
}
代码示例来源:origin: Jerey-Jobs/KeepGank
/**
* 入口方法,在Activcity创建view的时候会走该方法获取view
* @param parent
* @param name
* @param context
* @param attrs
* @return
*/
@Override
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
boolean isSkinEnable = attrs.getAttributeBooleanValue(SkinConfig.NAMESPACE, SkinConfig.ATTR_SKIN_ENABLE, false);
AppCompatDelegate delegate = mAppCompatActivity.getDelegate();
View view = delegate.createView(parent, name, context, attrs);
// 此处供改变字体使用,建立对出现的TextView的引用
if (view instanceof TextView && SkinConfig.isCanChangeFont()) {
TextViewRepository.add((TextView) view);
}
// 此处判断是否可以切换view, 可以则解析皮肤属性
if (isSkinEnable || SkinConfig.isGlobalSkinApply()) {
if (view == null) {
// 根据名字来创建View
view = ViewProducer.createViewFromTag(context, name, attrs);
}
if (view == null) {
return null;
}
parseSkinAttr(context, attrs, view);
}
return view;
}
代码示例来源:origin: garretyoder/app-theme-engine
view = mDelegate.createView(parent, name, context, attrs);
if (view == null && mKeyContext != null)
view = mKeyContext.onCreateView(parent, name, context, attrs);
内容来源于网络,如有侵权,请联系作者删除!