[Android]用LinearLayout 实现类微信消息列表项
2013-10-21 14:06
387 查看
实现效果:
微信参照界面:
一个关键点: "早晚报"与"下午19:05"之间要用空白TextView隔开,来造成一个靠左,一个靠右的效果
LinearLayout Item 结构如下
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/imageview_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/green"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="早晚报"/>
<TextView
android:id="@+id/nickname22"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@+id/rightnickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下午19:05"/>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/rightnickname2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="晚报:北京10日出租车涨价"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
微信参照界面:
一个关键点: "早晚报"与"下午19:05"之间要用空白TextView隔开,来造成一个靠左,一个靠右的效果
LinearLayout Item 结构如下
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/imageview_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/green"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="早晚报"/>
<TextView
android:id="@+id/nickname22"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@+id/rightnickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下午19:05"/>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/rightnickname2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="晚报:北京10日出租车涨价"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
相关文章推荐
- Android使用RecyclerView实现仿微信联系人列表
- Android ListView侧滑显示操作项(仿微信消息列表)
- android(13)(sqlite的CRUD使用SQL和API两种方式实现以及Linearlayout的列表展示)
- android 融云 + 科大讯飞 实现仿微信语音消息转换为文字
- 仿微信、短信、QQ等消息数目右上角红色小圆球气泡显示(基于Android XML布局文件实现)
- Android仿微信下拉列表实现 推荐
- Android (ListActivity、Contextmenu)微信类消息置顶和删除和功能的实现
- 使用clipChildren实现仿微信的未读消息列表显式布局
- Android QQ、微信聊天消息界面设计原理与实现
- php实现微信模拟登陆、获取用户列表及群发消息功能示例
- Android仿微信实现通讯录字母列表索引
- Android仿微信下拉列表实现
- Android实现类似微信联系人中的分组列表
- Android QQ、微信聊天消息界面设计原理与实现
- android:listview实现qq,微信好友列表(头像,昵称,个性签名)
- PHP实现登陆并抓取微信列表中最新一组微信消息的方法
- Android仿微信下拉列表实现(附源码)
- 仿微信、短信、QQ等消息数目右上角红色小圆球气泡显示(基于Android XML布局文件实现)
- Android仿微信列表滑动删除 如何实现滑动列表SwipeListView
- 仿微信、短信、QQ等消息数目右上角红色小圆球气泡显示(基于Android XML布局文件实现)