1. ListActivity有这条底部分割线。
2.在Activity中只有listview,没有别的控件的话也会有。
其实ListActivity也是一个Activity,只不过在其中使用了SetContentView(listView)方法设置了一个listView作为其显示的View而已。所以结论就是只要这个activity调用了SetContentView(listView)就会有这条底部分割线。
那么什么情况下才不会有这条分割线呢?在Activity中如果调用setContentView(View)而ListView只是内嵌入到这个View的话有可能会没有这条分割线
在一个Activity中只有一个ListView,把它的layout_height修改为fill_parent,最底下的线是可以显示出来的,但修改为wrap_content就显示不出来了,(一般情况我们把高度都是设置成fil_parent的)
在一个Activity中最上边和最下边都有个TextView,ListView夹在中间,把它的layout_height为fill_parent或者wrap_content,最底下的线是可以显示出来的。
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:text="HelloWorldTop"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="HelloWorldBottom"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/mTop"
android:layout_above="@id/mBottom"/>
android:divider="@drawable/line" 我这里的这个line是自己的一张直线的图片,你也可以用颜色什么的
你设置一下androidHight="1sp";再加上这一句android:divider="@drawable/line"就行了,你有图片,没高度是不会显示的
定义一个像素点在底部