Description: got this error
Expected behavior: view is inflated
Source code: The code snippet which is causing this issue. Please consider attaching a minimal sample app that reproduces the issue.
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="50dp"
app:layout_constraintTop_toBottomOf="@id/header"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:tabIndicatorFullWidth="true"
app:tabIndicatorGravity="stretch"
app:tabMinWidth="0dp"
app:tabMode="auto"
app:tabPaddingEnd="4.5dp"
app:tabPaddingStart="4.5dp"
app:tabRippleColor="@android:color/transparent"
app:tabSelectedTextColor="@color/white"
app:tabTextAppearance="@style/courseTapStyle" />
Android API version: 29
Material Library version: 1.2.0
Device: Android Emulator Pixel2 XL
also appTheme is
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
You should use Theme.MaterialComponents.* as app theme.
thanks it works now @gabrielemariotti
Most helpful comment
You should use
Theme.MaterialComponents.*as app theme.