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 <!-- Here is where we put the SurfaceView, in a frame so that we can 25 stack other views on top of it. --> 26 <FrameLayout 27 android:layout_width="match_parent" 28 android:layout_height="0px" 29 android:layout_weight="1"> 30 31 <android.opengl.GLSurfaceView android:id="@+id/glsurfaceview" 32 android:layout_width="match_parent" 33 android:layout_height="match_parent" /> 34 35 <LinearLayout android:id="@+id/hidecontainer" 36 android:orientation="vertical" 37 android:visibility="gone" 38 android:background="@drawable/translucent_background" 39 android:gravity="center" 40 android:layout_width="match_parent" 41 android:layout_height="match_parent"> 42 43 <Button android:id="@+id/hideme1" 44 android:layout_width="wrap_content" 45 android:layout_height="wrap_content" 46 android:layout_gravity="center" 47 android:visibility="gone" 48 android:text="@string/hide_me"/> 49 50 <Button android:id="@+id/hideme2" 51 android:layout_width="wrap_content" 52 android:layout_height="wrap_content" 53 android:layout_gravity="center" 54 android:visibility="gone" 55 android:text="@string/hide_me"/> 56 57 </LinearLayout> 58 59 </FrameLayout> 60 61 <LinearLayout 62 android:orientation="horizontal" 63 android:layout_width="wrap_content" 64 android:layout_height="wrap_content" 65 android:layout_gravity="center"> 66 67 <Button android:id="@+id/vis" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:text="@string/visibility_1_vis"/> 71 72 <Button android:id="@+id/invis" 73 android:layout_width="wrap_content" 74 android:layout_height="wrap_content" 75 android:text="@string/visibility_1_invis"/> 76 77 <Button android:id="@+id/gone" 78 android:layout_width="wrap_content" 79 android:layout_height="wrap_content" 80 android:text="@string/visibility_1_gone"/> 81 82 </LinearLayout> 83 84</LinearLayout> 85