ScrollView - (Android Essentials: XML & Java)
android:layout_width and android:layout_height: Specifies the width and height of the ScrollView.
android:id: Sets a unique identifier for the ScrollView.
android:scrollbars: Determines whether the scrollbars are visible or hidden. Possible values are "vertical", "horizontal", "none", or "both".
android:scrollbarStyle: Defines the style of the scrollbars. Possible values are "insideOverlay", "insideInset", or "outsideOverlay".
android:fadeScrollbars: Specifies whether the scrollbars should fade out when not in use. Possible values are "none", "horizontal", "vertical", or "both".
android:fillViewport: Determines whether the ScrollView should stretch its contents to fill the viewport. Possible values are "true" or "false".
android:overScrollMode: Specifies the behavior when the content is scrolled beyond its boundaries. Possible values are "always", "never", or "ifContentScrolls".
android:scrollbarSize: Sets the size of the scrollbars.
android:scrollbarThumbVertical and android:scrollbarThumbHorizontal: Sets a custom drawable for the vertical and horizontal scrollbars respectively.
android:scrollbarTrackVertical and android:scrollbarTrackHorizontal: Sets a custom drawable for the vertical and horizontal scrollbar tracks respectively.
android:scrollbarDefaultDelayBeforeFade: Specifies the delay before the scrollbars fade out.
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>