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

x33g5p2x  于2022-01-24 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(178)

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

暂无

代码示例

代码示例来源:origin: yoyiyi/bilisoleil

/**
 * 去掉滚动条
 *
 * @param navigationView navigationView
 */
private void disableNavigationViewScrollbars(NavigationView navigationView) {
  if (navigationView != null) {
    NavigationMenuView navigationMenuView = (NavigationMenuView) navigationView.getChildAt(0);
    if (navigationMenuView != null) {
      navigationMenuView.setVerticalScrollBarEnabled(false);
    }
  }
}

代码示例来源:origin: hjw541988478/ZfsoftCampusAssit

/**
 * 隐藏 NavigationView 垂直滑动条
 */
private void hideVerticalScrollBar() {
  NavigationMenuView navigationMenuView = (NavigationMenuView) mNavigationView.getChildAt(0);
  if (navigationMenuView != null) {
    navigationMenuView.setVerticalScrollBarEnabled(false);
  }
}

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

private void initNavigationView(View rootView) {
  NavigationView navigationView = rootView.findViewById(R.id.nav_view);
  navigationView.setNavigationItemSelectedListener(this::onOptionsItemSelected);
  MenuItem menuItem = navigationView.getMenu().findItem(R.id.menu_gun);
  NavigationMenuView menuView = (NavigationMenuView) navigationView.getChildAt(0);
  menuView.setVerticalScrollBarEnabled(false);
  View actionView = getLayoutInflater().inflate(R.layout.nav_menu_action_view_gun, null);
  menuItem.setActionView(actionView);
  menuItem.expandActionView();
  mReplyCountView = actionView.findViewById(R.id.reply_count);
  mHeaderView = navigationView.getHeaderView(0).findViewById(R.id.viewFlipper);
  updateHeaderView();
}

代码示例来源:origin: jorgegil96/All-NBA

private void setUpNavigationView() {
  if (toolbar != null) {
    drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    navigationView = (NavigationView) findViewById(R.id.navigation);
    if (navigationView != null) {
      NavigationMenuView navMenuView = (NavigationMenuView) navigationView.getChildAt(0);
      if (navMenuView != null) {
        navMenuView.setVerticalScrollBarEnabled(false);
      }
      updateNavViewFavoriteTeam();
      setGoPremiumVisibility(premiumService.isPremium());
    }
  }
}

相关文章