1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2013 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 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 android:layout_width="match_parent" 18 android:layout_height="match_parent" 19 android:id="@+id/container"> 20 21 <View 22 android:layout_width="100dip" 23 android:layout_height="50dip" 24 android:layout_alignParentTop="true" 25 android:layout_alignParentLeft="true" 26 android:background="#f00" 27 android:id="@+id/view1"/> 28 29 <View 30 android:layout_width="100dip" 31 android:layout_height="50dip" 32 android:layout_alignParentTop="true" 33 android:layout_alignParentRight="true" 34 android:background="#0f0" 35 android:id="@+id/view2"/> 36 37 <View 38 android:layout_width="100dip" 39 android:layout_height="50dip" 40 android:background="#00f" 41 android:layout_alignParentBottom="true" 42 android:layout_alignParentLeft="true" 43 android:id="@+id/view3"/> 44 45 <View 46 android:layout_width="100dip" 47 android:layout_height="50dip" 48 android:background="#0ff" 49 android:layout_alignParentBottom="true" 50 android:layout_alignParentRight="true" 51 android:id="@+id/view4"/> 52 53 <LinearLayout 54 android:layout_width="match_parent" 55 android:layout_height="wrap_content" 56 android:layout_centerVertical="true" 57 android:orientation="vertical" 58 android:id="@+id/grayscaleContainer"> 59 60 <View 61 android:layout_width="match_parent" 62 android:layout_height="10dip" 63 android:background="#000" 64 android:id="@+id/gray1"/> 65 <View 66 android:layout_width="match_parent" 67 android:layout_height="10dip" 68 android:background="#222" 69 android:id="@+id/gray2"/> 70 <View 71 android:layout_width="match_parent" 72 android:layout_height="10dip" 73 android:background="#444" 74 android:id="@+id/gray3"/> 75 <View 76 android:layout_width="match_parent" 77 android:layout_height="10dip" 78 android:background="#666" 79 android:id="@+id/gray4"/> 80 <View 81 android:layout_width="match_parent" 82 android:layout_height="10dip" 83 android:background="#888" 84 android:id="@+id/gray5"/> 85 <View 86 android:layout_width="match_parent" 87 android:layout_height="10dip" 88 android:background="#aaa" 89 android:id="@+id/gray6"/> 90 <View 91 android:layout_width="match_parent" 92 android:layout_height="10dip" 93 android:background="#ccc" 94 android:id="@+id/gray7"/> 95 <View 96 android:layout_width="match_parent" 97 android:layout_height="10dip" 98 android:background="#fff" 99 android:id="@+id/gray8"/> 100 101 </LinearLayout> 102 103 </RelativeLayout> 104