-3

I work with the Scroll Choise and try to place them horizontally for more convenience.

enter image description here

<android.support.design.widget.BottomNavigationView
    android:id="@+id/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" />

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:weightSum="5"
    android:layout_marginTop="200dp"
    app:layout_constraintTop_toTopOf="parent">


    <com.webianks.library.scroll_choice.ScrollChoice
        android:id="@+id/scroll_choice1"
        android:layout_width="50dp"
        android:layout_height="300dp"
        android:layout_marginHorizontal="20dp"
        android:layout_weight="1" />



</LinearLayout>

but I don't want to use ScrollView, because I have to add 100 TextViews

1 Answers1

0

It's well simple to implement this. HorizontalScrollView is literally a replicate of ScrollView...

<HorizontalScrollView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="50dp" >

//Place only one element within the layout as it will behave like a ScrollView

</HoHorizontalScrollView>

Might be worth reading into HorizontalScrollView
Any questions, feel free to ask...

Nero
  • 1,058
  • 1
  • 9
  • 25