Example #1
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   if (getActivity() instanceof ColorChange) {
     this.colorChange = (ColorChange) getActivity();
   }
   cuurentColor = ColorTool.getColor(R.color.default_color, getActivity());
   colorChange.onColorChange(cuurentColor, ColorTool.colorBurn(cuurentColor));
   EventBus.getDefault().register(this);
   mFragmentManager = getChildFragmentManager();
 }
Example #2
0
  private void updateData(int parentTypeId) {

    articleTypes.clear();
    articleTypes.addAll(CommonCache.get().getCacheArticleType(parentTypeId));
    cuurentColor = getColor(articleTypes.get(0).getColor());
    CommonCache.get().cacheColor(articleTypes.get(0).getId(), cuurentColor);
    // .notifyDataSetChanged();
    mainPagerAdapter = new MainPagerAdapter(this, articleTypes);
    viewPager.setAdapter(mainPagerAdapter);
    mPagerSlidingTabStrip.setViewPager(viewPager);
    colorChange.onColorChange(cuurentColor, ColorTool.colorBurn(cuurentColor));
    mPagerSlidingTabStrip.setIndicatorColor(cuurentColor);
  }
Example #3
0
 public int getColor(String color) {
   return ColorTool.getColor(color);
 }