1,首先是配置文件:
message_send_list.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/mms_send_list"
android:divider="@android:color/transparent"
android:dividerHeight="10dp"
>
</ListView>
</LinearLayout>说明:不要此文件中配置gravity属性
message_send_list_view.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"

本文介绍了在Android中如何实现ListView的气泡显示效果。重点在于布局配置,包括在message_send_list.xml中设置多层gravity属性,以及在MessageActivity.java中进行相应配置。虽然实现了基本效果,但作者指出背景效果仍有提升空间,期待进一步讨论。
最低0.47元/天 解锁文章
731

被折叠的 条评论
为什么被折叠?



