android.support.design.widget.BottomNavigationView.setItemIconTintList()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中android.support.design.widget.BottomNavigationView.setItemIconTintList()方法的一些代码示例,展示了BottomNavigationView.setItemIconTintList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BottomNavigationView.setItemIconTintList()方法的具体详情如下:
包路径:android.support.design.widget.BottomNavigationView
类名称:BottomNavigationView
方法名:setItemIconTintList

BottomNavigationView.setItemIconTintList介绍

暂无

代码示例

代码示例来源:origin: flipkart-incubator/proteus

@Override
 public void setColor(V view, ColorStateList colors) {
  view.setItemIconTintList(colors);
 }
});

代码示例来源:origin: iAcn/BiliNeat

private void initData() {
  // 底栏颜色设置
  ColorStateList colorList = ThemeHelper.getCheckedColorList();
  mBottomBar.setItemIconTintList(colorList);
  mBottomBar.setItemTextColor(colorList);
  mSharePref = getSharedPreferences("setting", MODE_WORLD_READABLE);
  BottomNavigationMenuView mMenuView = ReflectUtils.getObjectField(mBottomBar,
      "mMenuView", BottomNavigationMenuView.class);
  mButtons = ReflectUtils.getObjectField(mMenuView,
      "mButtons", BottomNavigationItemView[].class);
  mOnClickListener = ReflectUtils.getObjectField(mMenuView,
      "mOnClickListener", View.OnClickListener.class);
  final List<BasePrefFragment> pageList = Arrays.asList(
      new NeatFragment(),
      new AboutFragment());
  mPager.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
    @Override
    public Fragment getItem(int position) {
      return pageList.get(position);
    }
    @Override
    public int getCount() {
      return pageList.size();
    }
  });
}

相关文章