您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> Android >> 为什么Fragment中使用新主题后不生效?

为什么Fragment中使用新主题后不生效?

来源:网络整理     时间:2016/4/12 10:21:19     关键词:fragment,为什么

关于网友提出的“为什么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

相关图片

相关文章