每个item内的控件布局要有padding,不能完全和边贴上。
解决方案 »
- 求助,从网络下载多图片到本地,怎么用handlerthread实现
- 官方市场更新应用出现:服务器无法处理您的apk, 请重试
- ios与安卓的发展前景
- 怎么读取android项目文件夹里的文件?
- 想做html5的手机网站,求比较好的html5的手机网站参考~
- htc android开发待遇如何?
- 【求助大神】android 聊天工具怎么存取本地聊天记录
- 搭建收集数据平台后,如何收集手机数据信息
- 如何通过WiFi模块向手机发送数据??
- eclipse sdk版本过高导致问题
- 我想继承BroadcastReceiver在onReceive做一些处理为什么不行?
- ERROR/AndroidRuntime
我试过了,没有用唉。 能否请阁下明示:我的代码:
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="50dp"
android:gravity="center_vertical"
android:background="@drawable/white"
android:padding="1dp"
>
<TextView
style="@style/textView3"
android:id="@+id/listItemText"
android:layout_marginLeft="6dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:textColor="@drawable/black"
android:layout_width="280dp"
android:singleLine="true"
android:textSize="20sp"
/>
<CheckBox
android:id="@+id/listItemCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
>
</CheckBox>
</RelativeLayout>
android:layout_height="wrap_content"TextView:怎么没有定义高度
添加android:layout_height="wrap_content"这两个改完试试
listview的分隔线有些显示不出来,这与你的手机有关,我的程序放在htc G7上面,listview中的每一条分隔线都可以显示出来,只是还是会有一种,相邻的item之间的分隔有大有小,并不均匀好看。(这一点,无法与iphone相比)。
期待有更好的解决方法(使用一些布局技巧,能够达到iphone那种效果)