ScrollView Example

ScrollView is an example for scroll the whole layout in android. The direction of scroll is vertical.

actvity_main.xml

This xml shows ten buttons with scrollview options.

 




    

        

            

MainActivity.java

This activity shows only layout file on main method.

package com.example.icowboysradio.myapplication;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}