Reputation: 124
In my app, I want to create a BottomNavigationBar having almost 10-15 items. Items should scroll in the horizontal orientation. For example;
like this, items should be scrolled horizontally.
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="110dp"
android:backgroundTint="@color/colorLight"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/navigationView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:itemIconTint="@drawable/selector"
android:visibility="visible"
app:labelVisibilityMode="unlabeled"
app:itemBackground="@color/colorPrimary"
app:itemTextColor="@color/whiteTextColor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation"/>
</FrameLayout>
Upvotes: 2
Views: 2632
Reputation: 897
try one with this ,
https://github.com/huang3eng/CustomLayoutManager
it may helps you
Upvotes: 0