您的位置:首页 > 其它

安卓开发_浅谈ListView(自定义适配器)

2014-09-11 20:31 323 查看
ListView作为一个实际开发中使用率非常高的视图,一般的系统自带的适配器都无法满足开发中的需求,这时候就需要开发人员来自定义适配器使得ListView能够有一个不错的显示效果

有这样一个Demo ,实现图片文字混合列表

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

<ImageView android:layout_width="50dp"
android:layout_height="50dp"
android:id="@+id/id_image"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/id_textview"
android:gravity="center_vertical"
android:textStyle="bold|italic"
/>
</LinearLayout>


layout_item
效果图:



安卓开发_浅谈ListView(ArrayAdapter数组适配器)

安卓开发_浅谈ListView(SimpleAdapter数组适配器)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐