1 <?xml version="1.0" encoding="utf-8"?>
5 ** Copyright 2007, The Android Open Source Project
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
11 ** http://www.apache.org/licenses/LICENSE-2.0
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.
21 <!-- Demonstrates changing view visibility. See corresponding Java code. -->
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">
29 android:orientation="vertical"
30 android:background="@drawable/box"
31 android:layout_width="match_parent"
32 android:layout_height="wrap_content">
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"/>
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"/>
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"/>
60 android:orientation="horizontal"
61 android:layout_width="wrap_content"
62 android:layout_height="wrap_content">
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"/>
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"/>
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"/>