
window_Title.xml
<?xml version="1.0" enCoding="utf-8"?><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:orIEntation="horizontal" androID:layout_wIDth="fill_parent" androID:layout_height="35dp" androID:gravity="center_vertical" androID:paddingleft="5dp" androID:background="#323331"> <ImageVIEw androID:ID="@+ID/header" androID:src="@drawable/ic_launcher" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" /> <linearLayout androID:layout_wIDth="wrap_content" androID:layout_height="fill_parent" androID:layout_weight="1" androID:gravity="right|center_vertical" androID:paddingRight="5dp" > <TextVIEw androID:ID="@+ID/Title" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textSize="11dp" androID:paddingRight="5dp" /> <ImageVIEw androID:ID="@+ID/icon" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content"/> </linearLayout></linearLayout>
我的main.xml
<?xml version="1.0" enCoding="utf-8"?><relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:orIEntation="vertical" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:paddingtop="4dp"> <ListVIEw androID:ID="@androID:ID/List" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:drawSelectorOntop="false" androID:background="#CFECEC" androID:cachecolorHint="#00000000"/></relativeLayout>
List_item.xml
<?xml version="1.0" enCoding="utf-8"?><relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:orIEntation="horizontal" androID:padding="8dp" > <ImageVIEw androID:ID="@+ID/icon" androID:layout_wIDth="22dp" androID:layout_height="22dp" androID:layout_marginleft="4dp" androID:layout_marginRight="10dp" androID:layout_margintop="4dp" androID:src="@drawable/List_icon" > </ImageVIEw> <TextVIEw androID:ID="@+ID/firstname" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textcolor="#4AA02C" androID:textSize="20dp" androID:layout_marginleft="38dp" androID:textStyle="bold" /> <TextVIEw androID:ID="@+ID/lastname" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_marginleft="2dp" androID:layout_toRightOf="@ID/firstname" androID:textcolor="#4AA02C" androID:textSize="20dp" androID:textStyle="bold" /> <TextVIEw androID:ID="@+ID/Title" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_below="@ID/firstname" androID:textcolor="#254117" androID:textSize="12dp" androID:layout_marginleft="38dp"/></relativeLayout>
这是活动的屏幕截图.
在这里你可以看到标题栏下面的黑色空格.怎么能删除?
@R_502_6120@ 我认为你的Mymain.xml的相对布局中的androID:paddingtop =“4dp”是个问题.删除它后尝试. 总结以上是内存溢出为你收集整理的android – 使用listview自定义背景的标题栏下面的黑色空格全部内容,希望文章能够帮你解决android – 使用listview自定义背景的标题栏下面的黑色空格所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)