1

I can scroll my ListView without any problem in portrait mode, but in landscape mode it doesn't scroll at all.

My ListView is inside a LinearLayout (vertical). I have 10 items in the ListView. I can scroll all of them in portrait mode. In landscape mode I see only 6 items, and the scroll doesn't work. Any solution for this? my xml

<LinearLayout
    android:layout_width="0dp"
    android:layout_height="480dp"
    android:layout_weight="0.07"
    android:orientation="vertical"
    app:layout_constraintHorizontal_bias="0.0"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/linearLayout">

    <ListView
        android:id="@+id/lstview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:fastScrollAlwaysVisible="false"
        android:isScrollContainer="true"
        android:keepScreenOn="false"
        android:nestedScrollingEnabled="true"
        android:overScrollMode="ifContentScrolls"
        android:scrollIndicators="end"
        android:scrollbars="horizontal|vertical"
        android:scrollingCache="false"
        android:smoothScrollbar="true"
        android:transcriptMode="alwaysScroll"
        android:verticalScrollbarPosition="defaultPosition" />

</LinearLayout>

thanks

khaleader
  • 183
  • 2
  • 15

0 Answers0