码迷,mamicode.com
首页 > 其他好文 > 详细

listView后面加控件,防止被挤

时间:2016-09-23 18:15:42      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   
android:orientation="vertical"
   
android:layout_width="match_parent"
   
android:layout_height="match_parent"
   
android:background="@color/content_blackground"

   
>
    <RelativeLayout
       
android:id="@+id/search_bar_layout"
       
android:layout_width="match_parent"
       
android:layout_height="48dp"
        
android:layout_margin="10dp"
          
>
        <TextView
            
android:id="@+id/btn_search_around"
           
android:layout_width="wrap_content"
           
android:layout_height="match_parent"
           
android:layout_alignParentEnd="true"
           
android:layout_alignParentRight="true"
           
android:layout_centerVertical="true"
           
android:background="@drawable/map_search_btn"
            
android:gravity="center"
           
android:padding="12dp"
           
android:text="搜索"
            
android:textColor="@color/white"
           
android:textSize="12dp"/>
        <ImageView
           
android:id="@+id/img_back"
           
android:layout_width="20dp"
           
android:layout_height="20dp"
           
android:src="@drawable/back_gray"
           
android:layout_alignParentLeft="true"
           
android:layout_centerVertical="true"
           
android:layout_marginRight="10dp"
            
/>
        <LinearLayout
           
android:layout_width="match_parent"
           
android:layout_height="match_parent"
           
android:layout_centerVertical="true"
           
android:orientation="horizontal"
           
android:layout_toRightOf="@id/img_back"
           
android:layout_toLeftOf="@+id/btn_search_around"
           
android:background="@drawable/search_input_half"
            
android:gravity="center_vertical" >
            <AutoCompleteTextView
               
android:id="@+id/input_edittext"
               
android:layout_width="0dp"
               
android:layout_weight="2"
               
android:layout_height="match_parent"
               
android:drawableLeft="@drawable/search_input"
               
android:background="@color/transparent"
               
android:hint="请输入搜索关键字"
               
android:textColorHint="@color/check_gray"
               
android:singleLine="true"
               
android:textColor="@color/check_gray"
               
android:textSize="14sp" />
            <ImageView
               
android:id="@+id/img_clear"
               
android:layout_width="18dp"
               
android:layout_height="18dp"
               
android:src="@drawable/common_input_box_clear"
               
android:layout_marginRight="5dp"/>
        </LinearLayout>
    </RelativeLayout>

    <LinearLayout
       
android:layout_width="match_parent"
       
android:layout_height="wrap_content"
       
android:orientation="vertical">
        <ListView
           
android:id="@+id/lv_record"
           
android:layout_marginTop="20dp"
           
android:layout_width="match_parent"
           
android:layout_height="0dp"
           
android:layout_weight="1"
           
>
        </ListView>
        <LinearLayout
           
android:id="@+id/ll_clear"
           
android:layout_width="match_parent"
            
android:orientation="vertical"
           
android:layout_height="wrap_content"
           
android:layout_weight="0"
           
>
            <View
               
android:layout_width="match_parent"
               
android:layout_height="1px"
               
android:background="@color/main_view_split_line_color"
               
/>
            <TextView
               
android:id="@+id/tv_clear"
               
android:layout_width="match_parent"
               
android:layout_height="wrap_content"
               
android:text="清空历史记录"
               
android:textSize="@dimen/word_small"
               
android:textColor="@color/check_gray"
               
android:padding="10dp"
               
android:gravity="center"
               
android:layout_marginBottom="10dp"
               
android:background="@color/white"
               
/>
        </LinearLayout>

    </LinearLayout>


</LinearLayout>

listView后面加控件,防止被挤

标签:

原文地址:http://www.cnblogs.com/smile-sweet/p/5900769.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!