Home | History | Annotate | Download | only in layout
      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 changing view visibility. See corresponding Java code. -->
     18 
     19 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:orientation="vertical"
     21     android:layout_width="match_parent"
     22     android:layout_height="match_parent">
     23 
     24     <LinearLayout
     25       android:orientation="vertical"
     26       android:background="@drawable/box"
     27       android:layout_width="match_parent"
     28       android:layout_height="wrap_content">
     29 
     30       <TextView
     31           android:background="@drawable/red"
     32           android:layout_width="match_parent"
     33           android:layout_height="wrap_content"
     34           android:text="@string/visibility_1_view_1"/>
     35 
     36       <TextView android:id="@+id/victim"
     37           android:background="@drawable/green"
     38           android:layout_width="match_parent"
     39           android:layout_height="wrap_content"
     40           android:text="@string/visibility_1_view_2"/>
     41 
     42       <TextView
     43           android:background="@drawable/blue"
     44           android:layout_width="match_parent"
     45           android:layout_height="wrap_content"
     46           android:text="@string/visibility_1_view_3"/>
     47 
     48     </LinearLayout>
     49 
     50     <LinearLayout
     51         android:orientation="horizontal"
     52         android:layout_width="wrap_content"
     53         android:layout_height="wrap_content">
     54 
     55         <Button android:id="@+id/vis"
     56             android:layout_width="wrap_content"
     57             android:layout_height="wrap_content"
     58             android:text="@string/visibility_1_vis"/>
     59 
     60         <Button android:id="@+id/invis"
     61             android:layout_width="wrap_content"
     62             android:layout_height="wrap_content"
     63             android:text="@string/visibility_1_invis"/>
     64 
     65         <Button android:id="@+id/gone"
     66             android:layout_width="wrap_content"
     67             android:layout_height="wrap_content"
     68             android:text="@string/visibility_1_gone"/>
     69 
     70     </LinearLayout>
     71 </LinearLayout>
     72