OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / frameworks / base / core / tests / coretests / res / layout / visibility_callback.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 /*
4 **
5 ** Copyright 2007, The Android Open Source Project
6 **
7 ** Licensed under the Apache License, Version 2.0 (the "License"); 
8 ** you may not use this file except in compliance with the License. 
9 ** You may obtain a copy of the License at 
10 **
11 **     http://www.apache.org/licenses/LICENSE-2.0 
12 **
13 ** Unless required by applicable law or agreed to in writing, software 
14 ** distributed under the License is distributed on an "AS IS" BASIS, 
15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
16 ** See the License for the specific language governing permissions and 
17 ** limitations under the License.
18 */
19 -->
20
21 <!-- Demonstrates changing view visibility. See corresponding Java code. -->
22
23 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
24     android:orientation="vertical"
25     android:layout_width="match_parent"
26     android:layout_height="match_parent">
27
28     <LinearLayout
29       android:orientation="vertical"
30       android:background="@drawable/box"
31       android:layout_width="match_parent"
32       android:layout_height="wrap_content">
33
34       <TextView android:id="@+id/refUp"
35           android:background="@drawable/red"
36           android:layout_width="match_parent"
37           android:layout_height="wrap_content"
38           android:text="@string/visibility_1_view_1"/>
39
40       <FrameLayout android:id="@+id/parent"
41                    android:layout_width="match_parent"
42                    android:layout_height="wrap_content">
43           <view class="android.view.VisibilityCallback$MonitoredTextView"
44                 android:id="@+id/victim"
45                 android:background="@drawable/green"
46                 android:layout_width="match_parent"
47                 android:layout_height="wrap_content"
48                 android:text="@string/visibility_1_view_2"/>
49       </FrameLayout>
50
51       <TextView android:id="@+id/refDown"
52           android:background="@drawable/blue"
53           android:layout_width="match_parent"
54           android:layout_height="wrap_content"
55           android:text="@string/visibility_1_view_3"/>
56
57     </LinearLayout>
58
59     <LinearLayout
60         android:orientation="horizontal"
61         android:layout_width="wrap_content"
62         android:layout_height="wrap_content">
63
64         <Button android:id="@+id/vis"
65             android:layout_width="wrap_content"
66             android:layout_height="wrap_content"
67             android:text="@string/visibility_1_vis"/>
68
69         <Button android:id="@+id/invis"
70             android:layout_width="wrap_content"
71             android:layout_height="wrap_content"
72             android:text="@string/visibility_1_invis"/>
73
74         <Button android:id="@+id/gone"
75             android:layout_width="wrap_content"
76             android:layout_height="wrap_content"
77             android:text="@string/visibility_1_gone"/>
78
79     </LinearLayout>
80 </LinearLayout>