android scrollview code example

Example 1: how to not have the scroll bar drawn in scroll view android studii

android:scrollbars="none"

Example 2: scrollview android

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true">

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:stretchColumns="1">

        <!-- everything you already have -->

    </TableLayout>
</ScrollView>

Example 3: scrollview scroll programmatically android

nestedScrollView.fullScroll(View.FOCUS_UP);
nestedScrollView.smoothScrollTo(0,0);

Example 4: scrollview scroll programmatically android

nestedScrollView.fullScroll(View.FOCUS_DOWN);
nestedScrollView.fullScroll(View.FOCUS_UP);

Example 5: scrollview scroll programmatically android

NestedScrollView.scrollTo(0, 0);

Tags:

Misc Example