Home | History | Annotate | Download | only in layout-xlarge
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2010 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 
     17 <com.android.quicksearchbox.ui.SearchActivityViewTwoPane
     18     xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:id="@+id/search_activity_view"
     20     android:layout_width="match_parent"
     21     android:layout_height="match_parent"
     22 >
     23 
     24     <!-- A background area that when touched dismisses the activity if the search box is empty.
     25          The top and bottom margins are here to avoid accidental dismissal when
     26          using the keyboard or the widgets along the top of the screen. -->
     27     <FrameLayout
     28             android:id="@+id/dismiss_bg"
     29             android:layout_width="match_parent"
     30             android:layout_height="match_parent"
     31             android:layout_alignParentLeft="true"
     32             android:layout_alignParentTop="true"
     33             android:layout_marginTop="80dip"
     34             android:layout_marginBottom="30dip"
     35             />
     36 
     37     <LinearLayout
     38             android:id="@+id/panes"
     39             android:layout_width="match_parent"
     40             android:layout_height="match_parent"
     41             android:layout_alignParentLeft="true"
     42             android:layout_alignParentTop="true"
     43             android:orientation="horizontal"
     44             android:splitMotionEvents="true">
     45 
     46         <!-- Begin left_pane for suggestions -->
     47         <RelativeLayout
     48                 android:id="@+id/left_pane"
     49                 android:layout_width="@dimen/suggestions_width"
     50                 android:layout_height="match_parent"
     51                 android:layout_marginLeft="5dp"
     52                 android:layout_marginBottom="12dip"
     53                 >
     54 
     55             <FrameLayout
     56                 android:id="@+id/suggestions_container"
     57                 android:layout_width="match_parent"
     58                 android:layout_height="match_parent"
     59                 android:layout_alignParentLeft="true"
     60                 android:layout_alignParentRight="true"
     61                 android:layout_below="@+id/search_plate"
     62                 >
     63 
     64                 <view
     65                     class="com.android.quicksearchbox.ui.SuggestionsView"
     66                     android:id="@+id/suggestions"
     67                     android:layout_width="match_parent"
     68                     android:layout_height="wrap_content"
     69                     android:paddingBottom="12dip"
     70                     android:cacheColorHint="@android:color/transparent"
     71                     android:scrollbars="none"
     72                     android:divider="@android:color/transparent"
     73                     android:dividerHeight="0px"
     74                     >
     75                 </view>
     76 
     77             </FrameLayout>
     78 
     79             <!-- The search plate is after the suggestions, to give it a higher
     80                  z-index. -->
     81             <LinearLayout
     82                 android:id="@+id/search_plate"
     83                 android:layout_width="match_parent"
     84                 android:layout_height="wrap_content"
     85                 android:paddingTop="11dp"
     86                 android:layout_alignParentLeft="true"
     87                 android:layout_alignParentTop="true"
     88                 android:layout_alignParentRight="true"
     89                 android:gravity="top|left"
     90                 android:orientation="horizontal"
     91                 android:clickable="true"
     92                 >
     93 
     94                 <LinearLayout
     95                     android:id="@+id/search_edit_frame"
     96                     android:layout_width="0dip"
     97                     android:layout_height="36dp"
     98                     android:layout_weight="1.0"
     99                     android:orientation="horizontal"
    100                     android:gravity="center_vertical"
    101                     android:background="@drawable/textfield_start"
    102                     >
    103 
    104                     <ImageView
    105                         android:id="@+id/search_app_icon"
    106                         android:layout_height="wrap_content"
    107                         android:layout_width="wrap_content"
    108                         android:paddingLeft="8dp"
    109                         android:layout_gravity="center"
    110                         android:src="@drawable/ic_search"
    111                     />
    112 
    113                     <com.android.quicksearchbox.ui.QueryTextView
    114                         android:id="@+id/search_src_text"
    115                         android:layout_width="0dip"
    116                         android:layout_height="match_parent"
    117                         android:layout_weight="1.0"
    118                         android:layout_marginBottom="1dip"
    119                         android:layout_marginLeft="5dip"
    120                         android:layout_marginRight="8dip"
    121                         android:gravity="center_vertical|left"
    122                         android:singleLine="true"
    123                         android:ellipsize="end"
    124                         android:inputType="text|textAutoComplete"
    125                         android:background="@drawable/textfield_search_empty_google"
    126                         android:textSize="18sp"
    127                         android:textStyle="normal"
    128                         android:textColor="@android:color/primary_text_dark"
    129                         android:textColorHint="@color/search_hint"
    130                         android:imeOptions="actionGo"
    131                     />
    132 
    133                     <ImageButton
    134                         android:id="@+id/search_close_btn"
    135                         android:layout_width="wrap_content"
    136                         android:layout_height="wrap_content"
    137                         android:paddingLeft="12dp"
    138                         android:paddingRight="12dp"
    139                         android:layout_gravity="center"
    140                         android:background="@drawable/button_bg"
    141                         android:src="@drawable/ic_clear_disabled"
    142                         />
    143 
    144                 </LinearLayout>
    145 
    146                 <LinearLayout
    147                     android:layout_width="78dip"
    148                     android:layout_height="36dp"
    149                     android:orientation="horizontal"
    150                     android:gravity="center"
    151                     android:background="@drawable/textfield_end" >
    152                     <!-- One of these two will be visible at a time -->
    153                     <ImageButton
    154                         android:id="@+id/search_go_btn"
    155                         android:background="@drawable/button_bg"
    156                         android:src="@drawable/ic_go"
    157                         android:layout_width="match_parent"
    158                         android:layout_height="match_parent"
    159                         android:layout_gravity="center"
    160                         android:scaleType="centerInside"
    161                         />
    162                     <ImageButton
    163                         android:id="@+id/search_voice_btn"
    164                         android:background="@drawable/button_bg"
    165                         android:src="@drawable/ic_btn_speak_now"
    166                         android:layout_width="match_parent"
    167                         android:layout_height="match_parent"
    168                         android:layout_gravity="center"
    169                         android:visibility="gone"
    170                         android:scaleType="centerInside"
    171                     />
    172                 </LinearLayout>
    173 
    174             </LinearLayout>
    175 
    176         </RelativeLayout>
    177         <!-- End left_pane -->
    178 
    179         <!-- Begin right_pane -->
    180         <RelativeLayout
    181                 android:id="@+id/right_pane"
    182                 android:layout_width="0dp"
    183                 android:layout_height="match_parent"
    184                 android:layout_weight="1"
    185                 android:layout_marginLeft="16dp"
    186                 android:layout_marginBottom="12dip"
    187                 >
    188 
    189             <view
    190                 class="com.android.quicksearchbox.ui.ClusteredSuggestionsView"
    191                 android:id="@+id/shortcuts"
    192                 android:layout_width="@dimen/shortcuts_width"
    193                 android:layout_height="wrap_content"
    194                 android:layout_alignParentLeft="true"
    195                 android:layout_alignWithParentIfMissing="true"
    196                 android:layout_below="@+id/shortcut_title"
    197                 android:cacheColorHint="@android:color/transparent"
    198                 android:scrollbars="none"
    199                 android:groupIndicator="@null"
    200                 android:listSelector="@drawable/suggestion_highlight"
    201                 android:divider="@android:color/transparent"
    202                 android:dividerHeight="0px"
    203                 android:childDivider="@android:color/transparent"
    204                 android:fadingEdge="vertical"
    205                 android:fadingEdgeLength="20dip"
    206                 android:focusable="true"
    207                 >
    208 
    209              </view>
    210 
    211             <!-- The search plate is after the suggestions, to give it a higher
    212                  z-index. -->
    213             <RelativeLayout
    214                 android:id="@+id/shortcut_title"
    215                 android:layout_width="@dimen/shortcuts_width"
    216                 android:layout_height="48dp"
    217                 android:layout_alignParentLeft="true"
    218                 android:layout_alignParentTop="true"
    219                 android:background="@drawable/section_header"
    220                 android:clickable="true"
    221                 android:visibility="invisible"
    222                 >
    223 
    224             </RelativeLayout>
    225 
    226         </RelativeLayout>
    227 
    228         <ImageButton
    229             android:id="@+id/menu_button"
    230             android:layout_width="wrap_content"
    231             android:layout_height="wrap_content"
    232             android:layout_gravity="right|top"
    233             android:paddingTop="5dip"
    234             android:paddingRight="10dip"
    235             android:paddingLeft="10dip"
    236             android:paddingBottom="10dip"
    237             android:singleLine="true"
    238             android:clickable="true"
    239             android:focusable="true"
    240             android:background="@drawable/button_bg"
    241             android:src="@drawable/ic_menu_moreoverflow_normal_holo_dark"
    242         />
    243 
    244     </LinearLayout>
    245 </com.android.quicksearchbox.ui.SearchActivityViewTwoPane>
    246