Home | History | Annotate | Download | only in layout-sw600dp
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 /*
      4  * Copyright (C) 2011, The Android Open Source Project
      5  *
      6  * Licensed under the Apache License, Version 2.0 (the "License");
      7  * you may not use this file except in compliance with the License.
      8  * You may obtain a copy of the License at
      9  *
     10  *     http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  * Unless required by applicable law or agreed to in writing, software
     13  * distributed under the License is distributed on an "AS IS" BASIS,
     14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  * See the License for the specific language governing permissions and
     16  * limitations under the License.
     17  */
     18 -->
     19 
     20 <LinearLayout
     21     xmlns:android="http://schemas.android.com/apk/res/android"
     22     android:orientation="vertical"
     23     android:layout_width="match_parent"
     24     android:layout_height="match_parent"
     25     android:background="#ff000000"
     26     android:paddingLeft="@dimen/left_right_padding"
     27     android:paddingRight="@dimen/left_right_padding"
     28     android:paddingTop="@dimen/top_bottom_padding"
     29     android:paddingBottom="@dimen/top_bottom_padding">
     30     <LinearLayout
     31         android:layout_width="match_parent"
     32         android:layout_height="wrap_content"
     33         android:layout_marginBottom="@dimen/group_padding"
     34         android:background="@drawable/calculator_input_field">
     35 
     36         <com.android.calculator2.CalculatorDisplay
     37             android:id="@+id/display"
     38             android:layout_width="0dp"
     39             android:layout_weight="1"
     40             android:layout_height="wrap_content"
     41             maxDigits="@integer/max_digits"
     42             android:layout_gravity="bottom"
     43             >
     44 
     45             <com.android.calculator2.CalculatorEditText
     46                 style="@style/display_style" />
     47             <com.android.calculator2.CalculatorEditText
     48                 style="@style/display_style" />
     49 
     50         </com.android.calculator2.CalculatorDisplay>
     51 
     52         <FrameLayout
     53             android:layout_width="wrap_content"
     54             android:layout_height="match_parent">
     55             <Button
     56                 android:id="@+id/clear"
     57                 android:text="@string/clear"
     58                 style="@style/btn_clear"
     59                 android:minWidth="100dp"
     60                 android:layout_width="match_parent"
     61                 android:layout_height="match_parent"
     62                 android:paddingLeft="5dip"
     63                 android:paddingRight="5dip"
     64                 android:contentDescription="@string/clearDesc" />
     65             <ImageButton
     66                 android:id="@+id/del"
     67                 android:src="@drawable/calc_clear_symbol"
     68                 style="@style/btn_clear"
     69                 android:layout_width="match_parent"
     70                 android:layout_height="match_parent"
     71                 android:paddingLeft="5dip"
     72                 android:paddingRight="5dip"
     73                 android:contentDescription="@string/delDesc" />
     74         </FrameLayout>
     75     </LinearLayout>
     76 
     77     <LinearLayout
     78         android:layout_width="match_parent"
     79         android:layout_height="0dip"
     80         android:layout_weight="2"
     81         android:orientation="vertical"
     82         android:layout_marginBottom="@dimen/group_padding">
     83 
     84         <LinearLayout
     85             style="@style/btn_row_style">
     86             <Button
     87                 android:id="@+id/sin"
     88                 android:text="@string/sin"
     89                 style="@style/btn_function_cell_style"
     90                 android:contentDescription="@string/sinDesc" />
     91             <Button
     92                 android:id="@+id/cos"
     93                 android:text="@string/cos"
     94                 style="@style/btn_function_cell_style"
     95                 android:contentDescription="@string/cosDesc" />
     96             <Button
     97                 android:id="@+id/tan"
     98                 android:text="@string/tan"
     99                 style="@style/btn_function_cell_style"
    100                 android:contentDescription="@string/tanDesc" />
    101             <Button
    102                 android:id="@+id/pi"
    103                 android:text="@string/pi"
    104                 style="@style/btn_function_cell_style"
    105                 android:contentDescription="@string/piDesc" />
    106             <Button
    107                 android:id="@+id/factorial"
    108                 android:text="@string/factorial"
    109                 style="@style/btn_function_cell_style"
    110                 android:contentDescription="@string/factorialDesc" />
    111         </LinearLayout>
    112         <LinearLayout
    113             style="@style/btn_row_style">
    114             <Button
    115                 android:id="@+id/ln"
    116                 android:text="@string/ln"
    117                 style="@style/btn_function_cell_style"
    118                 android:contentDescription="@string/lnDesc" />
    119             <Button
    120                 android:id="@+id/lg"
    121                 android:text="@string/lg"
    122                 style="@style/btn_function_cell_style"
    123                 android:contentDescription="@string/lgDesc" />
    124             <Button
    125                 android:id="@+id/e"
    126                 android:text="@string/e"
    127                 style="@style/btn_function_cell_style"
    128                 android:contentDescription="@string/eDesc" />
    129             <Button
    130                 android:id="@+id/power"
    131                 android:text="@string/power"
    132                 style="@style/btn_function_cell_style"
    133                 android:contentDescription="@string/powerDesc" />
    134             <Button
    135                 android:id="@+id/sqrt"
    136                 android:text="@string/sqrt"
    137                 style="@style/btn_function_cell_style"
    138                 android:contentDescription="@string/sqrtDesc" />
    139         </LinearLayout>
    140 
    141     </LinearLayout>
    142 
    143     <LinearLayout
    144         android:layout_width="match_parent"
    145         android:layout_height="0dip"
    146         android:layout_weight="5"
    147         android:orientation="vertical">
    148         <LinearLayout
    149             style="@style/btn_row_style">
    150             <Button
    151                 android:id="@+id/digit7"
    152                 android:text="@string/digit7"
    153                 style="@style/btn_digit_cell_style" />
    154             <Button
    155                 android:id="@+id/digit8"
    156                 android:text="@string/digit8"
    157                 style="@style/btn_digit_cell_style" />
    158             <Button
    159                 android:id="@+id/digit9"
    160                 android:text="@string/digit9"
    161                 style="@style/btn_digit_cell_style" />
    162             <Button
    163                 android:id="@+id/div"
    164                 android:text="@string/div"
    165                 style="@style/btn_operation_cell_style"
    166                 android:contentDescription="@string/divDesc" />
    167             <Button
    168                 android:id="@+id/leftParen"
    169                 android:text="@string/leftParen"
    170                 style="@style/btn_operation_cell_style"
    171                 android:contentDescription="@string/leftParenDesc" />
    172         </LinearLayout>
    173         <LinearLayout
    174             style="@style/btn_row_style">
    175             <Button
    176                 android:id="@+id/digit4"
    177                 android:text="@string/digit4"
    178                 style="@style/btn_digit_cell_style" />
    179             <Button
    180                 android:id="@+id/digit5"
    181                 android:text="@string/digit5"
    182                 style="@style/btn_digit_cell_style" />
    183             <Button
    184                 android:id="@+id/digit6"
    185                 android:text="@string/digit6"
    186                 style="@style/btn_digit_cell_style" />
    187             <Button
    188                 android:id="@+id/mul"
    189                 android:text="@string/mul"
    190                 style="@style/btn_operation_cell_style"
    191                 android:contentDescription="@string/mulDesc" />
    192             <Button
    193                 android:id="@+id/rightParen"
    194                 android:text="@string/rightParen"
    195                 style="@style/btn_operation_cell_style"
    196                 android:contentDescription="@string/rightParenDesc" />
    197         </LinearLayout>
    198         <LinearLayout
    199             android:layout_width="match_parent"
    200             android:layout_height="0dip"
    201             android:layout_weight="2"
    202             android:orientation="horizontal">
    203             <LinearLayout
    204                 android:layout_width="0dip"
    205                 android:layout_height="match_parent"
    206                 android:layout_weight="4"
    207                 android:orientation="vertical">
    208                 <LinearLayout
    209                     style="@style/btn_row_style">
    210                     <Button
    211                         android:id="@+id/digit1"
    212                         android:text="@string/digit1"
    213                         style="@style/btn_digit_cell_style" />
    214                     <Button
    215                         android:id="@+id/digit2"
    216                         android:text="@string/digit2"
    217                         style="@style/btn_digit_cell_style" />
    218                     <Button
    219                         android:id="@+id/digit3"
    220                         android:text="@string/digit3"
    221                         style="@style/btn_digit_cell_style" />
    222                     <Button
    223                         android:id="@+id/minus"
    224                         android:text="@string/minus"
    225                         style="@style/btn_operation_cell_style"
    226                         android:contentDescription="@string/minusDesc" />
    227                 </LinearLayout>
    228                 <LinearLayout
    229                     style="@style/btn_row_style">
    230                     <Button
    231                         android:id="@+id/digit0"
    232                         android:text="@string/digit0"
    233                         style="@style/btn_digit_cell_style"
    234                         android:layout_weight="2" />
    235                     <Button
    236                         android:id="@+id/dot"
    237                         android:text="@string/dot"
    238                         style="@style/btn_digit_cell_style"
    239                         android:contentDescription="@string/dotDesc" />
    240                     <Button
    241                         android:id="@+id/plus"
    242                         android:text="@string/plus"
    243                         style="@style/btn_operation_cell_style"
    244                         android:contentDescription="@string/plusDesc" />
    245                 </LinearLayout>
    246             </LinearLayout>
    247             <Button
    248                 android:id="@+id/equal"
    249                 android:text="@string/equal"
    250                 style="@style/btn_operation_cell_style"
    251                 android:contentDescription="@string/equalDesc" />
    252         </LinearLayout>
    253     </LinearLayout>
    254 </LinearLayout>
    255