android-bottom_navigation 菜单不显示问题

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

    binding = ActivityMainBinding.inflate(getLayoutInflater());
    setContentView(binding.getRoot());

    BottomNavigationView navView = findViewById(R.id.nav_view);
    // 设置标签可见性模式
    navView.setLabelVisibilityMode(1);
posted @ 2023-09-22 17:46  zhaogaojian  阅读(31)  评论(0编辑  收藏  举报