Home | History | Annotate | Download | only in layout-port
      1 <?xml version="1.0" encoding="utf-8"?>
      2 
      3 <!--
      4 /*
      5  * Copyright (C) 2008, 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:orientation="vertical"
     23               android:layout_width="match_parent"
     24               android:layout_height="match_parent"
     25               android:background="#ff000000">
     26 
     27             <com.android.calculator2.CalculatorDisplay
     28                  android:id="@+id/display"
     29                  android:layout_width="match_parent"
     30                  android:layout_height="0dp"
     31                  android:layout_weight="1"
     32                  >
     33 
     34                 <EditText style="@style/display_style" />
     35                 <EditText style="@style/display_style" />
     36 
     37             </com.android.calculator2.CalculatorDisplay>
     38 
     39     <com.android.calculator2.PanelSwitcher
     40          android:id="@+id/panelswitch"
     41          android:layout_width="match_parent"
     42          android:layout_height="0dp"
     43          android:layout_weight="4"
     44          >
     45 
     46     <LinearLayout
     47          android:id="@+id/simplePad"
     48          android:layout_width="match_parent"
     49          android:layout_height="match_parent"
     50          android:orientation="vertical"
     51          android:layout_gravity="center"
     52          >
     53 
     54         <LinearLayout
     55              android:layout_width="match_parent"
     56              android:layout_height="0dp"
     57              android:layout_weight="2"
     58              >
     59 
     60             <View
     61                 android:background="@drawable/button"
     62                 android:layout_width="0dp"
     63                 android:layout_height="match_parent"
     64                 android:layout_weight="3"
     65                 />
     66                         
     67             <!-- marginRight has to be 0 to catch border-touch -->
     68             <com.android.calculator2.ColorButton
     69                  android:id="@+id/del"
     70                  android:text="@string/clear"
     71                  android:layout_width="0dp"
     72                  android:layout_weight="1"
     73                  android:layout_height="match_parent"
     74                  android:layout_marginRight="0dp"
     75                  android:textSize="15dp"
     76                  style="@style/button_style"
     77                  />
     78 	</LinearLayout>
     79 
     80         <LinearLayout
     81              android:layout_weight="3"
     82              android:layout_width="match_parent"
     83              android:layout_height="0dp">
     84             <com.android.calculator2.ColorButton
     85                 android:id="@+id/digit7"
     86                 android:text="@string/digit7"
     87                 style="@style/digit_button_style"
     88                 />
     89             <com.android.calculator2.ColorButton
     90                 android:id="@+id/digit8"
     91                 android:text="@string/digit8"
     92                 style="@style/digit_button_style"
     93                 />
     94             <com.android.calculator2.ColorButton
     95                 android:id="@+id/digit9"
     96                 android:text="@string/digit9"
     97                 style="@style/digit_button_style"
     98                 />
     99             <com.android.calculator2.ColorButton
    100                 android:id="@+id/div"
    101                 android:text="@string/div"
    102                 style="@style/button_style"
    103                 />
    104         </LinearLayout>
    105 
    106         <LinearLayout
    107              android:layout_weight="3"
    108              android:layout_width="match_parent"
    109              android:layout_height="0dp"
    110              >
    111             <com.android.calculator2.ColorButton
    112                 android:id="@+id/digit4"
    113                 android:text="@string/digit4"
    114                 style="@style/digit_button_style"
    115                 />
    116             <com.android.calculator2.ColorButton
    117                 android:id="@+id/digit5"
    118                 android:text="@string/digit5"
    119                 style="@style/digit_button_style"
    120                 />
    121             <com.android.calculator2.ColorButton
    122                 android:id="@+id/digit6"
    123                 android:text="@string/digit6"
    124                 style="@style/digit_button_style"
    125                 />
    126             <com.android.calculator2.ColorButton
    127                 android:id="@+id/mul"
    128                 android:text="@string/mul"
    129                 style="@style/button_style"
    130                 />
    131         </LinearLayout>
    132 
    133         <LinearLayout
    134              android:layout_weight="3"
    135              android:layout_width="match_parent"
    136              android:layout_height="0dp"
    137              >
    138             <com.android.calculator2.ColorButton
    139                 android:id="@+id/digit1"
    140                 android:text="@string/digit1"
    141                 style="@style/digit_button_style"
    142                 />
    143             <com.android.calculator2.ColorButton
    144                 android:id="@+id/digit2"
    145                 android:text="@string/digit2"
    146                 style="@style/digit_button_style"
    147                 />
    148             <com.android.calculator2.ColorButton
    149                 android:id="@+id/digit3"
    150                 android:text="@string/digit3"
    151                 style="@style/digit_button_style"
    152                 />
    153             <com.android.calculator2.ColorButton
    154                 android:id="@+id/minus"
    155                 android:text="@string/minus"
    156                 style="@style/button_style"
    157                 />
    158         </LinearLayout>
    159 
    160         <LinearLayout
    161              android:layout_weight="3"
    162              android:layout_width="match_parent"
    163              android:layout_height="0dp"
    164              >
    165             <com.android.calculator2.ColorButton
    166                 android:id="@+id/dot"
    167                 android:text="@string/dot"
    168                 style="@style/digit_button_style"
    169                 />
    170             <com.android.calculator2.ColorButton
    171                 android:id="@+id/digit0"
    172                 android:text="@string/digit0"
    173                 style="@style/digit_button_style"
    174                 />
    175             <com.android.calculator2.ColorButton
    176                 android:id="@+id/equal"
    177                 android:text="@string/equal"
    178                 style="@style/button_style"
    179                 />
    180             <com.android.calculator2.ColorButton
    181                 android:id="@+id/plus"
    182                 android:text="@string/plus"
    183                 style="@style/button_style"
    184                 />
    185         </LinearLayout>
    186     </LinearLayout>
    187 
    188     <LinearLayout android:id="@+id/advancedPad"
    189                   android:layout_width="match_parent"
    190                   android:layout_height="match_parent"
    191                   android:orientation="vertical"
    192                   android:layout_gravity="center"
    193                   >
    194 
    195         <LinearLayout
    196              android:layout_weight="1"
    197              android:layout_width="match_parent"
    198              android:layout_height="0dp"
    199              >
    200             <com.android.calculator2.ColorButton
    201                 android:id="@+id/sin"
    202                 android:text="@string/sin"
    203                 style="@style/button_small_style"
    204                 />
    205             <com.android.calculator2.ColorButton
    206                 android:id="@+id/cos"
    207                 android:text="@string/cos"
    208                 style="@style/button_small_style"
    209                 />
    210             <com.android.calculator2.ColorButton
    211                 android:id="@+id/tan"
    212                 android:text="@string/tan"
    213                 style="@style/button_small_style"
    214                 />
    215         </LinearLayout>
    216 
    217         <LinearLayout
    218              android:layout_weight="1"
    219              android:layout_width="match_parent"
    220              android:layout_height="0dp"
    221              >
    222             <com.android.calculator2.ColorButton
    223                 android:id="@+id/ln"
    224                 android:text="@string/ln"
    225                 style="@style/button_small_style"
    226                 />
    227             <com.android.calculator2.ColorButton
    228                 android:id="@+id/lg"
    229                 android:text="@string/lg"
    230                 style="@style/button_small_style"
    231                 />
    232             <com.android.calculator2.ColorButton
    233                 android:id="@+id/factorial"
    234                 android:text="@string/factorial"
    235                 style="@style/button_style"
    236                 />
    237         </LinearLayout>
    238 
    239         <LinearLayout
    240              android:layout_weight="1"
    241              android:layout_width="match_parent"
    242              android:layout_height="0dp"
    243              >
    244             <com.android.calculator2.ColorButton
    245                 android:id="@+id/pi"
    246                 android:text="@string/pi"
    247                 style="@style/button_style"
    248                 />
    249             <com.android.calculator2.ColorButton
    250                 android:id="@+id/e"
    251                 android:text="@string/e"
    252                 style="@style/button_style"
    253                 />
    254             <com.android.calculator2.ColorButton
    255                 android:id="@+id/power"
    256                 android:text="@string/power"
    257                 style="@style/button_style"
    258                 />
    259         </LinearLayout>
    260 
    261         <LinearLayout
    262              android:layout_weight="1"
    263              android:layout_width="match_parent"
    264              android:layout_height="0dp"
    265              >
    266             <com.android.calculator2.ColorButton
    267                 android:id="@+id/leftParen"
    268                 android:text="@string/leftParen"
    269                 style="@style/button_style"
    270                 />
    271             <com.android.calculator2.ColorButton
    272                 android:id="@+id/rightParen"
    273                 android:text="@string/rightParen"
    274                 style="@style/button_style"
    275                 />
    276             <com.android.calculator2.ColorButton
    277                 android:id="@+id/sqrt"
    278                 android:text="@string/sqrt"
    279                 style="@style/button_style"
    280                 />
    281         </LinearLayout>
    282     </LinearLayout>
    283     </com.android.calculator2.PanelSwitcher>
    284 </LinearLayout>
    285