Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   ~ Copyright (C) 2014 The Android Open Source Project
      4   ~
      5   ~ Licensed under the Apache License, Version 2.0 (the "License");
      6   ~ you may not use this file except in compliance with the License.
      7   ~ You may obtain a copy of the License at
      8   ~
      9   ~   http://www.apache.org/licenses/LICENSE-2.0
     10   ~
     11   ~ Unless required by applicable law or agreed to in writing, software
     12   ~ distributed under the License is distributed on an "AS IS" BASIS,
     13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14   ~ See the License for the specific language governing permissions and
     15   ~ limitations under the License.
     16   -->
     17 
     18 <!--
     19   XML for screen providing ability to enter text, send some intents,
     20   switch to gesture activity and test scroll down action.
     21 -->
     22 
     23 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     24     android:layout_width="fill_parent"
     25     android:layout_height="fill_parent"
     26     android:fillViewport="true"
     27     android:orientation="vertical" >
     28 
     29     <LinearLayout
     30         android:layout_width="wrap_content"
     31         android:layout_height="wrap_content"
     32         android:orientation="vertical" >
     33 
     34         <TextView
     35             android:id="@+id/send_title"
     36             android:layout_width="wrap_content"
     37             android:layout_height="wrap_content"
     38             android:layout_marginTop="10dp"
     39             android:clickable="true"
     40             android:onClick="sendData"
     41             android:text="@string/send_title"
     42             android:textAppearance="?android:attr/textAppearanceLarge" />
     43 
     44         <EditText
     45             android:id="@+id/send_data_edit_text"
     46             android:layout_width="wrap_content"
     47             android:layout_height="wrap_content"
     48             android:layout_marginTop="10dp"
     49             android:ems="10"
     50             android:hint="@string/send_hint" />
     51 
     52         <Button
     53             android:id="@+id/send_button"
     54             android:layout_width="wrap_content"
     55             android:layout_height="wrap_content"
     56             android:layout_marginTop="10dp"
     57             android:onClick="sendData"
     58             android:text="@string/button_send" />
     59 
     60         <EditText
     61             android:id="@+id/enter_data_edit_text"
     62             android:layout_width="wrap_content"
     63             android:layout_height="wrap_content"
     64             android:layout_marginTop="10dp"
     65             android:ems="10"
     66             android:hint="@string/enter_hint" />
     67 
     68         <TextView
     69             android:id="@+id/enter_data_response_text"
     70             android:layout_width="wrap_content"
     71             android:layout_height="wrap_content"
     72             android:layout_marginTop="10dp"
     73             android:text=""
     74             android:textAppearance="?android:attr/textAppearanceLarge" />
     75 
     76         <TextView
     77             android:id="@+id/call"
     78             android:layout_width="wrap_content"
     79             android:layout_height="wrap_content"
     80             android:layout_marginTop="10dp"
     81             android:text="@string/send_intent_to_call"
     82             android:textAppearance="?android:attr/textAppearanceLarge" />
     83 
     84         <EditText
     85             android:id="@+id/send_data_to_call_edit_text"
     86             android:layout_width="229dp"
     87             android:layout_height="wrap_content"
     88             android:layout_marginTop="10dp"
     89             android:ems="10"
     90             android:hint="@string/send_hint_for_call" />
     91 
     92         <Button
     93             android:id="@+id/send_to_call_button"
     94             android:layout_width="wrap_content"
     95             android:layout_height="wrap_content"
     96             android:layout_marginTop="10dp"
     97             android:onClick="sendDataToCall"
     98             android:text="@string/button_call" />
     99 
    100         <TextView
    101             android:id="@+id/send_data_message"
    102             android:layout_width="wrap_content"
    103             android:layout_height="wrap_content"
    104             android:layout_marginTop="10dp"
    105             android:text="@string/send_message"
    106             android:textAppearance="?android:attr/textAppearanceLarge" />
    107 
    108         <EditText
    109             android:id="@+id/send_data_to_message_edit_text"
    110             android:layout_width="290dp"
    111             android:layout_height="wrap_content"
    112             android:layout_marginTop="10dp"
    113             android:ems="10"
    114             android:hint="@string/send_hint"
    115             android:text="@string/send_data_to_message_edit_text" />
    116 
    117         <Button
    118             android:id="@+id/send_message_button"
    119             android:layout_width="wrap_content"
    120             android:layout_height="wrap_content"
    121             android:layout_marginTop="10dp"
    122             android:onClick="sendMessage"
    123             android:text="@string/button_to_message" />
    124 
    125         <TextView
    126             android:id="@+id/goto_browser"
    127             android:layout_width="wrap_content"
    128             android:layout_height="wrap_content"
    129             android:layout_marginTop="10dp"
    130             android:text="@string/send_intent_to_browser"
    131             android:textAppearance="?android:attr/textAppearanceLarge" />
    132 
    133         <EditText
    134             android:id="@+id/send_data_to_browser_edit_text"
    135             android:layout_width="290dp"
    136             android:layout_height="wrap_content"
    137             android:layout_marginTop="10dp"
    138             android:ems="10"
    139             android:hint="@string/send_hint" />
    140 
    141         <Button
    142             android:id="@+id/send_to_browser_button"
    143             android:layout_width="wrap_content"
    144             android:layout_height="wrap_content"
    145             android:layout_marginTop="10dp"
    146             android:onClick="sendDataToBrowser"
    147             android:text="@string/button_to_browser" />
    148 
    149         <TextView
    150             android:id="@+id/pick_contact_title"
    151             android:layout_width="wrap_content"
    152             android:layout_height="wrap_content"
    153             android:layout_marginTop="10dp"
    154             android:text="@string/pick_title"
    155             android:textAppearance="?android:attr/textAppearanceLarge" />
    156 
    157         <Button
    158             android:id="@+id/pick_button"
    159             android:layout_width="wrap_content"
    160             android:layout_height="wrap_content"
    161             android:layout_marginTop="10dp"
    162             android:onClick="pickContact"
    163             android:text="@string/button_pick" />
    164 
    165         <TextView
    166             android:id="@+id/phone_number"
    167             android:layout_width="wrap_content"
    168             android:layout_height="wrap_content"
    169             android:layout_marginTop="10dp" />
    170 
    171         <TextView
    172             android:id="@+id/market"
    173             android:layout_width="wrap_content"
    174             android:layout_height="wrap_content"
    175             android:layout_marginTop="10dp"
    176             android:text="@string/send_intent_to_market"
    177             android:textAppearance="?android:attr/textAppearanceLarge" />
    178 
    179         <EditText
    180             android:id="@+id/send_to_market_data"
    181             android:layout_width="229dp"
    182             android:layout_height="wrap_content"
    183             android:layout_marginTop="10dp"
    184             android:ems="10"
    185             android:hint="@string/send_hint_to_market" />
    186 
    187         <Button
    188             android:id="@+id/send_to_market_button"
    189             android:layout_width="wrap_content"
    190             android:layout_height="wrap_content"
    191             android:layout_marginTop="10dp"
    192             android:onClick="clickToMarket"
    193             android:text="@string/button_market" />
    194 
    195         <EditText
    196             android:id="@+id/search_box"
    197             android:layout_width="fill_parent"
    198             android:layout_height="wrap_content"
    199             android:layout_marginTop="10dp"
    200             android:ems="10"
    201             android:hint="search box"
    202             android:imeOptions="actionSearch"
    203             android:inputType="text" />
    204 
    205         <TextView
    206             android:id="@+id/search_result"
    207             android:layout_width="fill_parent"
    208             android:layout_height="wrap_content"
    209             android:layout_marginTop="10dp"
    210             android:visibility="invisible" />
    211 
    212         <TextView
    213             android:id="@+id/weird_text_title"
    214             android:layout_width="fill_parent"
    215             android:layout_height="wrap_content"
    216             android:layout_marginTop="10dp"
    217             android:text="Delegating Edit Text"
    218             android:textAppearance="?android:attr/textAppearanceLarge" />
    219 
    220         <com.google.android.apps.common.testing.ui.testapp.DelegatingEditText
    221             android:id="@+id/delegating_edit_text"
    222             android:layout_width="fill_parent"
    223             android:layout_height="wrap_content"
    224             android:layout_marginTop="10dp" />
    225 
    226         <TextView
    227             android:id="@+id/gesture_title"
    228             android:layout_width="wrap_content"
    229             android:layout_height="wrap_content"
    230             android:layout_marginTop="10dp"
    231             android:text="@string/gesture_title"
    232             android:textAppearance="?android:attr/textAppearanceLarge" />
    233 
    234         <Button
    235             android:id="@+id/go_to_gesture_activity"
    236             android:layout_width="wrap_content"
    237             android:layout_height="wrap_content"
    238             android:layout_marginTop="10dp"
    239             android:onClick="clickToGesture"
    240             android:text="@string/button_gesture" />
    241 
    242         <Button
    243             android:id="@+id/scroll_button"
    244             android:layout_width="wrap_content"
    245             android:layout_height="wrap_content"
    246             android:layout_marginTop="10dp"
    247             android:onClick="clickToScroll"
    248             android:text="@string/launch_scroll_activity" />
    249 
    250         <Button
    251             android:id="@+id/list_button"
    252             android:layout_width="wrap_content"
    253             android:layout_height="wrap_content"
    254             android:layout_marginTop="10dp"
    255             android:onClick="clickToList"
    256             android:text="@string/launch_list_activity" />
    257 
    258         <Button
    259             android:id="@+id/make_alert_dialog"
    260             android:layout_width="wrap_content"
    261             android:layout_height="wrap_content"
    262             android:layout_marginTop="10dp"
    263             android:onClick="showDialog"
    264             android:text="@string/make_alert_dialog_button" />
    265 
    266         <Button
    267             android:id="@+id/make_popup_menu_button"
    268             android:layout_width="wrap_content"
    269             android:layout_height="wrap_content"
    270             android:layout_marginTop="10dp"
    271             android:onClick="showPopupMenu"
    272             android:text="@string/make_popup_menu_button" />
    273 
    274         <Button
    275             android:id="@+id/make_popup_view_button"
    276             android:layout_width="wrap_content"
    277             android:layout_height="wrap_content"
    278             android:layout_marginTop="10dp"
    279             android:onClick="showPopupView"
    280             android:text="@string/make_popup_view_button" />
    281 
    282         <AutoCompleteTextView
    283             android:id="@+id/auto_complete_text_view"
    284             android:layout_width="wrap_content"
    285             android:layout_height="wrap_content"
    286             android:layout_marginTop="10dp"
    287             android:completionThreshold="1"
    288             android:hint="@string/pick_water"
    289             android:textAppearance="?android:attr/textAppearanceLarge" />
    290 
    291 
    292         <!-- Keep this on bottom to test scrolling to views that are not showing. -->
    293         <!-- Huge top margin to guarantee this being out of view on large screen layout. -->
    294 
    295         <Button
    296             android:id="@+id/bottom_send_button"
    297             android:layout_width="wrap_content"
    298             android:layout_height="wrap_content"
    299             android:layout_marginTop="1000dp"
    300             android:onClick="sendData"
    301             android:text="@string/button_send_bottom" />
    302 
    303         <TextView
    304             android:id="@+id/bottom_send_text_view"
    305             android:layout_width="wrap_content"
    306             android:layout_height="wrap_content"
    307             android:layout_marginTop="1000dp"
    308             android:clickable="true"
    309             android:onClick="sendData"
    310             android:text="@string/send_title" />
    311     </LinearLayout>
    312 
    313 </ScrollView>
    314