xref: /aosp_15_r20/cts/tests/tests/widget/res/layout/scrollview_layout.xml (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2008 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<LinearLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:paddingTop="@dimen/scrollview_layout_padding_top"
20    android:fitsSystemWindows="true"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    android:orientation="vertical">
24
25    <view
26        class="android.widget.cts.ScrollViewTest$MyScrollView"
27        android:id="@+id/scroll_view_custom"
28        android:layout_width="100dip"
29        android:layout_height="100dip">
30
31        <LinearLayout
32            android:orientation="vertical"
33            android:layout_width="250dip"
34            android:layout_height="wrap_content">
35
36            <Button
37                android:id="@+id/first_child"
38                android:layout_width="250dip"
39                android:layout_height="100dip"
40                android:text="@string/vertical_text_1"/>
41
42            <Button
43                android:layout_width="250dip"
44                android:layout_height="100dip"
45                android:text="@string/vertical_text_2"/>
46
47            <Button
48                android:layout_width="250dip"
49                android:layout_height="100dip"
50                android:text="@string/vertical_text_3"/>
51
52            <Button
53                android:layout_width="250dip"
54                android:layout_height="100dip"
55                android:text="@string/vertical_text_1"/>
56
57            <Button
58                android:layout_width="250dip"
59                android:layout_height="100dip"
60                android:text="@string/vertical_text_2"/>
61
62            <Button
63                android:layout_width="250dip"
64                android:layout_height="100dip"
65                android:text="@string/vertical_text_3"/>
66
67            <Button
68                android:layout_width="250dip"
69                android:layout_height="100dip"
70                android:text="@string/vertical_text_1"/>
71
72            <Button
73                android:layout_width="250dip"
74                android:layout_height="100dip"
75                android:text="@string/vertical_text_2"/>
76
77            <Button
78                android:layout_width="250dip"
79                android:layout_height="100dip"
80                android:text="@string/vertical_text_3"/>
81
82            <Button
83                android:layout_width="250dip"
84                android:layout_height="100dip"
85                android:text="@string/vertical_text_1"/>
86
87            <Button
88                android:layout_width="250dip"
89                android:layout_height="100dip"
90                android:text="@string/vertical_text_2"/>
91
92            <Button
93                android:layout_width="250dip"
94                android:layout_height="100dip"
95                android:text="@string/vertical_text_3"/>
96
97            <Button
98                android:layout_width="250dip"
99                android:layout_height="100dip"
100                android:text="@string/vertical_text_1"/>
101
102            <Button
103                android:layout_width="250dip"
104                android:layout_height="100dip"
105                android:text="@string/vertical_text_2"/>
106
107            <Button
108                android:id="@+id/last_child"
109                android:layout_width="250dip"
110                android:layout_height="100dip"
111                android:text="@string/vertical_text_3"/>
112        </LinearLayout>
113
114    </view>
115
116    <ScrollView
117        android:id="@+id/scroll_view_regular"
118        android:layout_width="match_parent"
119        android:layout_height="wrap_content" />
120
121    <view
122        class="android.widget.cts.ScrollViewTest$MyScrollView"
123        android:id="@+id/scroll_view_custom_empty"
124        android:layout_width="100dip"
125        android:layout_height="100dip"/>
126
127    <view
128        class="android.widget.cts.ScrollViewTest$InterceptView"
129        android:id="@+id/wrapped_stretch"
130        android:layout_width="wrap_content"
131        android:layout_height="wrap_content">
132        <view
133            class="android.widget.cts.ScrollViewTest$MyScrollView"
134            android:id="@+id/scroll_view_stretch"
135            android:layout_width="90px"
136            android:layout_height="90px"
137            android:background="#FFF"
138            android:defaultFocusHighlightEnabled="false">
139            <LinearLayout
140                android:layout_width="match_parent"
141                android:layout_height="wrap_content"
142                android:orientation="vertical">
143                <View
144                    android:background="#00F"
145                    android:layout_width="90px"
146                    android:layout_height="50px"/>
147                <View
148                    android:background="#0FF"
149                    android:layout_width="90px"
150                    android:layout_height="50px"/>
151                <View
152                    android:background="#0F0"
153                    android:layout_width="90px"
154                    android:layout_height="50px"/>
155                <View
156                    android:background="#FF0"
157                    android:layout_width="90px"
158                    android:layout_height="50px"/>
159                <View
160                    android:background="#F00"
161                    android:layout_width="90px"
162                    android:layout_height="50px"/>
163                <View
164                    android:background="#F0F"
165                    android:layout_width="90px"
166                    android:layout_height="50px"/>
167
168                <SurfaceView
169                    android:id="@+id/surfaceview_stretch_target"
170                    android:visibility="gone"
171                    android:layout_weight="1"
172                    android:layout_width="90px"
173                    android:layout_height="45px"/>
174            </LinearLayout>
175        </view>
176    </view>
177</LinearLayout>
178
179