1 <?xml version="1.0" encoding="utf-8"?> 2 3 <!-- 4 /* 5 * Copyright (C) 2011, 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 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 22 android:id="@+id/simplePad" 23 android:layout_width="match_parent" 24 android:layout_height="match_parent" 25 android:orientation="vertical" 26 android:layout_gravity="center" 27 > 28 <LinearLayout 29 android:layout_weight="1" 30 android:layout_width="match_parent" 31 android:layout_height="0dp" 32 > 33 <com.android.calculator2.ColorButton 34 android:id="@+id/digit7" 35 android:text="@string/digit7" 36 style="@style/digit_button_style" 37 /> 38 <com.android.calculator2.ColorButton 39 android:id="@+id/digit8" 40 android:text="@string/digit8" 41 style="@style/digit_button_style" 42 /> 43 <com.android.calculator2.ColorButton 44 android:id="@+id/digit9" 45 android:text="@string/digit9" 46 style="@style/digit_button_style" 47 /> 48 <com.android.calculator2.ColorButton 49 android:id="@+id/leftParen" 50 android:text="@string/leftParen" 51 style="@style/button_style" 52 android:contentDescription="@string/leftParenDesc" 53 /> 54 <com.android.calculator2.ColorButton 55 android:id="@+id/rightParen" 56 android:text="@string/rightParen" 57 style="@style/button_style" 58 android:contentDescription="@string/rightParenDesc" 59 /> 60 <com.android.calculator2.ColorButton 61 android:id="@+id/mul" 62 android:text="@string/mul" 63 style="@style/button_style" 64 android:contentDescription="@string/mulDesc" 65 /> 66 </LinearLayout> 67 68 <LinearLayout 69 android:layout_weight="1" 70 android:layout_width="match_parent" 71 android:layout_height="0dp" 72 > 73 <com.android.calculator2.ColorButton 74 android:id="@+id/digit4" 75 android:text="@string/digit4" 76 style="@style/digit_button_style" 77 /> 78 <com.android.calculator2.ColorButton 79 android:id="@+id/digit5" 80 android:text="@string/digit5" 81 style="@style/digit_button_style" 82 /> 83 <com.android.calculator2.ColorButton 84 android:id="@+id/digit6" 85 android:text="@string/digit6" 86 style="@style/digit_button_style" 87 /> 88 <com.android.calculator2.ColorButton 89 android:id="@+id/dot" 90 android:text="@string/dot" 91 style="@style/digit_button_style" 92 android:contentDescription="@string/dotDesc" 93 /> 94 <com.android.calculator2.ColorButton 95 android:id="@+id/div" 96 android:text="@string/div" 97 style="@style/button_style" 98 android:contentDescription="@string/divDesc" 99 /> 100 <com.android.calculator2.ColorButton 101 android:id="@+id/minus" 102 android:text="@string/minus" 103 style="@style/button_style" 104 android:contentDescription="@string/minusDesc" 105 /> 106 </LinearLayout> 107 108 <LinearLayout 109 android:layout_weight="1" 110 android:layout_width="match_parent" 111 android:layout_height="0dp" 112 > 113 <com.android.calculator2.ColorButton 114 android:id="@+id/digit1" 115 android:text="@string/digit1" 116 style="@style/digit_button_style" 117 /> 118 <com.android.calculator2.ColorButton 119 android:id="@+id/digit2" 120 android:text="@string/digit2" 121 style="@style/digit_button_style" 122 /> 123 <com.android.calculator2.ColorButton 124 android:id="@+id/digit3" 125 android:text="@string/digit3" 126 style="@style/digit_button_style" 127 /> 128 <com.android.calculator2.ColorButton 129 android:id="@+id/digit0" 130 android:text="@string/digit0" 131 style="@style/digit_button_style" 132 /> 133 <com.android.calculator2.ColorButton 134 android:id="@+id/equal" 135 android:text="@string/equal" 136 style="@style/button_style" 137 android:contentDescription="@string/equalDesc" 138 /> 139 <com.android.calculator2.ColorButton 140 android:id="@+id/plus" 141 android:text="@string/plus" 142 style="@style/button_style" 143 android:contentDescription="@string/plusDesc" 144 /> 145 </LinearLayout> 146 </LinearLayout> 147