• 1000 *
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tablayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
app:tabSelectedTextColor="@android:color/white"
app:tabTextColor="@color/colorHalfTransparent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.tabs.TabItem
android:id="@+id/tabRecent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Recent Videos"
app:tabIndicatorHeight="8dp"/>
<com.google.android.material.tabs.TabItem
android:id="@+id/tabTrending"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Trending Videos"
app:tabIndicatorHeight="8dp"/>
</com.google.android.material.tabs.TabLayout>
<View
android:id="@+id/toolbar_shadow"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_alignParentStart="true"
android:background="@drawable/shape_shadow"
app:layout_constraintTop_toBottomOf="@+id/tablayout"/>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/tablayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/IDadsMainBottom"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/IDadsMainBottom"
android:layout_width="0dp"
android:layout_height="50dp"
android:background="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/naviView"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="start"
app:theme="@style/NavigationDrawerStyle"
app:headerLayout="@layout/header"
app:menu="@menu/drawermenu"/>
</androidx.drawerlayout.widget.DrawerLayout>
Это ошибка:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amoflirt.funnyvideosfeed/com.funnyvideosfeed.funnyvideos.MainActivity}: android.view.InflateException: Binary XML file line #78: Binary XML file line #78: Error inflating class com.google.android.material.navigation.NavigationView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: android.view.InflateException: Binary XML file line #78: Binary XML file line #78: Error inflating class com.google.android.material.navigation.NavigationView
Caused by: android.view.InflateException: Binary XML file line #78: Error inflating class com.google.android.material.navigation.NavigationView
Caused by: java.lang.reflect.InvocationTargetException
Думаю, что-то не так с NavigationView?
Есть идеи? Мне нужно добавить еще немного текста, blabla, хорошая погода, blabla, иначе вопрос не может быть опубликован