visibility.xml revision 1d3165f10b12165f02b7015ac1a817c5f60e6399
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      <TextView android:id="@+id/victim"
41          android:background="@drawable/green"
42          android:layout_width="match_parent"
43          android:layout_height="wrap_content"
44          android:text="@string/visibility_1_view_2"/>
45
46      <TextView android:id="@+id/refDown"
47          android:background="@drawable/blue"
48          android:layout_width="match_parent"
49          android:layout_height="wrap_content"
50          android:text="@string/visibility_1_view_3"/>
51
52    </LinearLayout>
53
54    <LinearLayout
55        android:orientation="horizontal"
56        android:layout_width="wrap_content"
57        android:layout_height="wrap_content">
58
59        <Button android:id="@+id/vis"
60            android:layout_width="wrap_content"
61            android:layout_height="wrap_content"
62            android:text="@string/visibility_1_vis"/>
63
64        <Button android:id="@+id/invis"
65            android:layout_width="wrap_content"
66            android:layout_height="wrap_content"
67            android:text="@string/visibility_1_invis"/>
68
69        <Button android:id="@+id/gone"
70            android:layout_width="wrap_content"
71            android:layout_height="wrap_content"
72            android:text="@string/visibility_1_gone"/>
73
74    </LinearLayout>
75</LinearLayout>
76