ScrollView - (Android Essentials: XML & Java)

  1. android:layout_width and android:layout_height: Specifies the width and height of the ScrollView.

  2. android:id: Sets a unique identifier for the ScrollView.

  3. android:scrollbars: Determines whether the scrollbars are visible or hidden. Possible values are "vertical", "horizontal", "none", or "both".

  4. android:scrollbarStyle: Defines the style of the scrollbars. Possible values are "insideOverlay", "insideInset", or "outsideOverlay".

  5. android:fadeScrollbars: Specifies whether the scrollbars should fade out when not in use. Possible values are "none", "horizontal", "vertical", or "both".

  6. android:fillViewport: Determines whether the ScrollView should stretch its contents to fill the viewport. Possible values are "true" or "false".

  7. android:overScrollMode: Specifies the behavior when the content is scrolled beyond its boundaries. Possible values are "always", "never", or "ifContentScrolls".

  8. android:scrollbarSize: Sets the size of the scrollbars.

  9. android:scrollbarThumbVertical and android:scrollbarThumbHorizontal: Sets a custom drawable for the vertical and horizontal scrollbars respectively.

  10. android:scrollbarTrackVertical and android:scrollbarTrackHorizontal: Sets a custom drawable for the vertical and horizontal scrollbar tracks respectively.

  11. android:scrollbarDefaultDelayBeforeFade: Specifies the delay before the scrollbars fade out.

  12. android:scrollbarFadeDuration: Sets the duration of the scrollbar fade animation.

<ScrollView
    android:id="@+id/scrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbars="vertical"
    android:fadeScrollbars="true"
    android:fillViewport="true"
    android:overScrollMode="ifContentScrolls"
    android:scrollbarSize="8dp"
    android:scrollbarThumbVertical="@drawable/custom_scrollbar_thumb"
    android:scrollbarTrackVertical="@drawable/custom_scrollbar_track"
    android:scrollbarDefaultDelayBeforeFade="2000"
    android:scrollbarFadeDuration="500">

    <!-- Your content here -->

</ScrollView>