Remove inside scrollbar of the ExpandableListView

Viewed 42

I'm using an ExpandableListView. I want to hide the scrollbar of the children list items, but want to show the scrollbar for the parent items.

If I use this android:scrollbars="none" then it is also hiding the parent scrollbar, but I just want to hide the children scrollbar (inside scrollbar).

Is it possible?

Here is my XML code:

  <FrameLayout
    android:id="@+id/fLContent"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:background="@color/activity_background"
    android:descendantFocusability="blocksDescendants"
    app:layout_constraintBottom_toTopOf="@id/llFooter"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent">

    <ExpandableListView
        android:id="@+id/expLvContent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:childDivider="#00000000"
        android:clipToPadding="false"
        android:divider="@null"
        android:dividerHeight="0dp"
        android:groupIndicator="@null"
        android:layoutDirection="ltr"
        android:orientation="vertical"
        android:paddingTop="58dp"
        android:paddingBottom="10dp"
        android:scrollbarStyle="insideOverlay" />

    <ExpandableListView
        android:id="@+id/expLvIndex"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:childDivider="#00000000"
        android:clipToPadding="false"
        android:divider="@null"
        android:dividerHeight="0dp"
        android:groupIndicator="@null"
        android:layoutDirection="ltr"
        android:listSelector="@android:color/transparent"
        android:orientation="vertical"
        android:paddingTop="58dp"
        android:paddingBottom="10dp"
        android:scrollbarStyle="insideOverlay" />

    <com.dailyrounds.fontlib.widgets.DRTextView
        android:id="@+id/tvExpand"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="top|right"
        android:layout_marginTop="65dp"
        android:layout_marginEnd="20dp"
        android:background="@drawable/shape_square_round_corner"
        android:backgroundTint="@color/expand_all_bg"
        android:paddingLeft="10dp"
        android:paddingTop="2dp"
        android:paddingRight="10dp"
        android:paddingBottom="2dp"
        android:text="@string/expand_all"
        android:textColor="@android:color/black"
        android:visibility="gone" />
</FrameLayout>
0 Answers
Related