question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BottomNavigationView] Component not rendered in preview

See original GitHub issue

Description: BottomNavigationView not rendering properly in XML Design

Expected behavior: BottomNavigationView renders correctly

Source code:


<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:menu="@menu/bottom_navigation_menu" />

</androidx.constraintlayout.widget.ConstraintLayout>

Android API version: API 30

Material Library version: 1.5.0-alpha05 (tried also alpha04)

Device: Pixel 3 XL API 29 & Pixel 5 API 30

bug

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
Freesebeecommented, Jan 24, 2022

Still having the same problem in 1.5.0 - I’m getting: The following classes could not be instantiated: - com.google.android.material.bottomnavigation.BottomNavigationView

Exception Details: java.lang.IllegalArgumentException: Motion easing theme attribute must be a string at com.google.android.material.motion.MotionUtils.resolveThemeInterpolator

Only going back to 1.4.0 seems to work.

2reactions
themronioncommented, Jan 22, 2022

+1 here, 1.5.0 stable

Read more comments on GitHub >

github_iconTop Results From Across the Web

BottomNavigationView is not show though layout preview shows
I intended to show BottomBar with three menus (dedicated fragments for each). The BottomBar doesn't show up in the UI, though the same...
Read more >
Using the Bottom Navigation View in Android | PSPDFKit
To get the BottomNavigationView component, first we need to include the design support library ... unlabeled — Label is not shown on any...
Read more >
BottomNavigationView - Android Developers
Represents a standard bottom navigation bar for application. It is an implementation of material design bottom navigation.
Read more >
Bottom navigation - Material Design
Bottom navigation bars allow movement between primary destinations in an app.
Read more >
BottomNavigationView with navigation in Android
Run the app in your android device and you will be able to navigate between different fragments. If it's not working as expected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found