Home | History | Annotate | Download | only in layout
      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 <LinearLayout
     18     xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:id="@+id/search_bar"
     20     android:layout_width="match_parent"
     21     android:layout_height="64dip"
     22     android:orientation="vertical"
     23     android:focusable="true"
     24     android:descendantFocusability="afterDescendants"
     25     android:background="@drawable/bg_blk_search_contact">
     26 
     27     <!-- Outer layout defines the entire search bar at the top of the screen -->
     28     <LinearLayout
     29         android:id="@+id/search_plate"
     30         android:layout_width="match_parent"
     31         android:layout_height="wrap_content"
     32         android:orientation="vertical"
     33         android:paddingLeft="4dip"
     34         android:paddingRight="10dip"
     35         android:paddingTop="6dip"
     36         android:paddingBottom="0dip"        
     37         >
     38 
     39         <!-- Inner layout contains the app icon, button(s) and EditText -->
     40         <LinearLayout
     41             android:id="@+id/search_edit_frame"
     42             android:layout_width="match_parent"
     43             android:layout_height="wrap_content"
     44             android:orientation="horizontal">
     45 
     46             <ImageView 
     47                 android:layout_width="wrap_content"
     48                 android:layout_height="wrap_content" 
     49                 android:src="@mipmap/ic_launcher_contacts"
     50                 android:layout_marginRight="7dip"
     51                 android:layout_gravity="center_vertical"
     52                 android:scaleType="centerInside" />
     53               
     54             <view
     55                 class="com.android.contacts.widget.SearchEditText"
     56                 android:id="@+id/search_src_text"
     57                 android:layout_height="wrap_content"
     58                 android:layout_width="0dip"
     59                 android:layout_weight="1.0"
     60                 android:layout_marginLeft="4dip"
     61                 android:layout_marginBottom="0dip"
     62                 android:singleLine="true"
     63                 android:ellipsize="end"
     64                 android:inputType="textNoSuggestions"
     65                 android:imeOptions="flagNoExtractUi"
     66                 android:hint="@string/search_bar_hint"
     67                 android:drawableRight="@drawable/magnifying_glass"
     68                 android:freezesText="true"
     69             />
     70         </LinearLayout>
     71         
     72     </LinearLayout>
     73 
     74 </LinearLayout>
     75