BottomNavigationView Does not exists

前端 未结 2 1216
-上瘾入骨i
-上瘾入骨i 2021-01-20 06:49

I am trying to use navigationeditor with bottom navigation view, but it seems that bottomnavigationview is only causing the issue.

This is my xml :



        
相关标签:
2条回答
  • 2021-01-20 07:21

    ON MAC CMD+SHIFT+R

    Then replace all occurance of

    android.support.design.widget.BottomNavigationView

    With

    com.google.android.material.bottomnavigation.BottomNavigationView

    0 讨论(0)
  • 2021-01-20 07:26

    Because you have migrated to AndroidX...try using com.google.android.material.bottomnavigation.BottomNavigationView instead

    <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottom_navigation"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="0dp"
            android:layout_marginEnd="0dp"
            android:background="?android:attr/windowBackground"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:menu="@menu/navigation" />
    
    0 讨论(0)
提交回复
热议问题