关于网友提出的“为什么Fragment中使用新主题后不生效?”问题疑问,本网通过在网上对“为什么Fragment中使用新主题后不生效?”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题:为什么Fragment中使用新主题后不生效?
描述: @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), R.style.PagerTheme_PageIndicatorDefaults);
// clone the inflater using the ContextThemeWrapper
LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
View v = localInflater.inflate(R.layout.fragment_doctor, container, false);
v.setOnTouchListener(mOnTouchListener);
initViews(v);
return v;
}
为什么Fragment中使用新主题后不生效?
以上介绍了“为什么Fragment中使用新主题后不生效?”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/670078.html