1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2007 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<!-- Demonstrates scrolling with a ScrollView. --> 18 19<LinearLayout 20 xmlns:android="http://schemas.android.com/apk/res/android" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" 23 android:orientation="vertical"> 24 25 <LinearLayout 26 android:layout_width="match_parent" 27 android:layout_height="wrap_content" 28 android:orientation="horizontal"> 29 30 <ScrollView 31 android:layout_width="100dip" 32 android:layout_height="120dip" 33 android:background="#FF0000"> 34 <LinearLayout 35 android:orientation="vertical" 36 android:layout_width="match_parent" 37 android:layout_height="match_parent"> 38 39 <TextView 40 android:layout_width="match_parent" 41 android:layout_height="wrap_content" 42 android:text="@string/scrollbar_2_text" /> 43 <TextView 44 android:layout_width="match_parent" 45 android:layout_height="wrap_content" 46 android:text="@string/scrollbar_2_text" /> 47 <TextView 48 android:layout_width="match_parent" 49 android:layout_height="wrap_content" 50 android:text="@string/scrollbar_2_text" /> 51 <TextView 52 android:layout_width="match_parent" 53 android:layout_height="wrap_content" 54 android:text="@string/scrollbar_2_text" /> 55 <TextView 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:text="@string/scrollbar_2_text" /> 59 <TextView 60 android:layout_width="match_parent" 61 android:layout_height="wrap_content" 62 android:text="@string/scrollbar_2_text" /> 63 <TextView 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" 66 android:text="@string/scrollbar_2_text" /> 67 <TextView 68 android:layout_width="match_parent" 69 android:layout_height="wrap_content" 70 android:text="@string/scrollbar_2_text" /> 71 <TextView 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" 74 android:text="@string/scrollbar_2_text" /> 75 <TextView 76 android:layout_width="match_parent" 77 android:layout_height="wrap_content" 78 android:text="@string/scrollbar_2_text" /> 79 </LinearLayout> 80 </ScrollView> 81 82 <ScrollView 83 android:layout_width="100dip" 84 android:layout_height="120dip" 85 android:background="#00FF00" 86 android:paddingRight="12dip"> 87 <TextView 88 android:layout_width="match_parent" 89 android:layout_height="wrap_content" 90 android:text="@string/scrollbar_3_text" 91 android:textColor="#000000" 92 android:background="#60AA60" /> 93 </ScrollView> 94 95 <ScrollView 96 android:id="@+id/view3" 97 android:layout_width="100dip" 98 android:layout_height="120dip" 99 android:background="@android:drawable/edit_text"> 100 <TextView 101 android:layout_width="match_parent" 102 android:layout_height="wrap_content" 103 android:textColor="#000000" 104 android:text="@string/scrollbar_3_text" /> 105 </ScrollView> 106 </LinearLayout> 107 108 <LinearLayout 109 android:layout_width="match_parent" 110 android:layout_height="wrap_content"> 111 <ScrollView 112 android:id="@+id/view4" 113 android:layout_width="100dip" 114 android:layout_height="120dip" 115 android:scrollbarStyle="outsideOverlay" 116 android:background="@android:drawable/edit_text"> 117 <TextView 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:textColor="#000000" 121 android:text="@string/scrollbar_3_text" /> 122 </ScrollView> 123 <ScrollView 124 android:id="@+id/view5" 125 android:layout_width="100dip" 126 android:layout_height="120dip" 127 android:scrollbarStyle="outsideInset" 128 android:background="@android:drawable/edit_text"> 129 <TextView 130 android:layout_width="match_parent" 131 android:layout_height="wrap_content" 132 android:textColor="#000000" 133 android:text="@string/scrollbar_3_text" /> 134 </ScrollView> 135 </LinearLayout> 136</LinearLayout> 137