• android 在Fragment里添加Theme主题


     @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), com.viewpagerindicator.R.style.Theme_PageIndicatorDefaults);
            // clone the inflater using the ContextThemeWrapper
            LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
            View view = localInflater.inflate(R.layout.simple_tabs, container, false);
    
            FragmentPagerAdapter adapter = new GoogleMusicAdapter(fragmentManager);
    
            ViewPager pager = (ViewPager)view.findViewById(R.id.pager);
            pager.setAdapter(adapter);
    
            TabPageIndicator indicator = (TabPageIndicator)view.findViewById(R.id.indicator);
            indicator.setViewPager(pager);
            indicator.setFillViewport(true);
            return view;
        }
  • 相关阅读:
    8.24
    8.23
    今日拔牙牙疼暂时不评论了,明天展示的时候老师也会给出建议
    8.22
    8.21
    8.20
    8.19随笔
    助教培训第四次作业
    助教培训第三次作业-墨刀的练习
    同时安装多个jdk设置及切换
  • 原文地址:https://www.cnblogs.com/wuyou/p/3524692.html
Copyright © 2020-2023  润新知