ScrollView & SlidingDrawer

ScrollView
java.lang.Object
    android.view.View
        android.widget.ViewGroup
            android.widget.FrameLayout
                android.widget.ScrollView
ScrollView는 수직(위아래)로 스크롤하는 기능(세로로 화면을 넘어가는 위젯을 넣을 수 있음)
HorizontalScrollView는 좌우로 스크롤하는 기능(가로로 화면을 넘어가는 위젯을 넣을 수 있음)
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 1" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 2" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 3" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 4" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 5" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 6" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 7" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="Button 8" />
</LinearLayout>
</ScrollView>
SlidingDrawer
java.lang.Object
    android.view.View
        android.widget.ViewGroup
            android.widget.FrameLayout
                android.widget.ScrollView
서랍장처럼 SlidingDrawer에 정의된 공간과 외부의 LinearLayout 공간을 독립적으로 사용할 수 있음
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Drawer Outside"
android:textSize="20dp" />
<SlidingDrawer
android:id="@+id/sd1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:content="@+id/content"
android:handle="@+id/handle" >
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Drawer Handler" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroud="#00ff00"
android:gravity="center" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Drawer Inside"
android:textSize="20dp"/>
</LinearLayout>
</SlidingDrawer>
</LinearLayout>