09

history_drawer_layout.xml

复制代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#80FFFFFF"> <!-- 这里的 #80FFFFFF 表示半透明的白色,80 是透明度值,范围是00(完全透明)到FF(完全不透明) -->

    <ListView
        android:layout_height="match_parent"
        android:layout_width="wrap_content"
        android:fadingEdge="none"
        android:divider="#aaaaaa"
        android:dividerHeight="0px">
    </ListView>

</LinearLayout>
复制代码

list_item_chat.xml

复制代码
<?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="wrap_content"
    android:orientation="horizontal"
    android:padding="8dp">

    <ImageView
        android:id="@+id/chat_icon"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:src="@drawable/ic_launcher_foreground" /> <!-- Replace with actual drawable resource -->

    <TextView
        android:id="@+id/chat_text"
        android:layout_width="wrap_content"
        android:layout_height="80dp"
        android:layout_gravity="center"
        android:padding="10dp"
        android:layout_marginTop="10dp"
        android:layout_marginStart="16dp"
        android:background="@drawable/bubble"
        android:textSize="18sp" />
</LinearLayout>
复制代码

 list_item_role.xml

复制代码
<?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="wrap_content"
    android:orientation="horizontal"
    android:padding="8dp">

    <ImageView
        android:id="@+id/role_icon"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:src="@drawable/ic_launcher_foreground" /> <!-- Replace with actual drawable resource -->

    <TextView
        android:id="@+id/role_text"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_marginTop="10dp"
        android:layout_marginStart="16dp"
        android:textSize="18sp" />
</LinearLayout>
复制代码

 

posted @   艾鑫4646  阅读(68)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示
点击右上角即可分享
微信分享提示