首页 > 其他分享 >09

09

时间:2024-06-16 18:54:59浏览次数:7  
标签:xml layout drawer 09 list item

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>

 

标签:xml,layout,drawer,09,list,item
From: https://www.cnblogs.com/aixin52129211/p/18251048

相关文章

  • C++U7-09-并查集
    并查集(DisjointSetUnion)是一种树型的数据结构,主要用于处理一些不相交集合(DisjointSets)的合并及查询问题。并查集能解决什么问题?在线游戏公会管理:应用场景:在一个大型多人在线游戏中,玩家可以创建或加入公会(公会相当于一个团队或群体)。随着时间的推移,公会可能会合并或解散。......
  • 209. Minimum Size Subarray Sum
    Givenanarrayofpositiveintegersnumsandapositiveintegertarget,returntheminimallengthofasubarraywhosesumisgreaterthanorequaltotarget.Ifthereisnosuchsubarray,return0instead.Example1:Input:target=7,nums=[2,3,1,2,......
  • [lnsyoj509/AcWing99]约数之和
    题意原题链接求\(A^B\)的约数之和\(\bmod9901\)sol\(x\)的约数之和\(f(x)\)可以通过以下公式计算根据算数基本定理,将\(x\)分解为$$\prod_{i=1}^ka_i^{p_i}$$则$$f(x)=\prod_{i=1}^k\sum_{j=0}^{p_i}a_i^j=\prod_{i=1}^k\frac{a_i^{p_i+1}-1}{a_i-1}$$证明根据......
  • 第09章_子查询
    1.需求分析与问题解决1.1实际问题#查询工资大于Able的工资#方式1:内连接SELECTe1.last_name,e1.salaryFROMemployeese1,employeese2WHEREe1.`salary`>e2.`salary`ANDe2.`last_name`='Abel';#方式2:子查询SELECTlast_name,salaryFROMemployeesWHEREsa......
  • 基于Python+OpenCV的车牌识别停车场管理系统(PyQt界面)【含Python源码 MX_009期】
    简介:        基于Python和OpenCV的车牌识别停车场管理系统是一种利用计算机视觉技术来自动识别停车场进出车辆的系统。该系统通过摄像头捕获车辆图像,并使用OpenCV库中的图像处理和模式识别技术来识别图像中的车牌号码。一旦车牌被成功识别,系统就会将车辆的进出时间和......
  • 代码随想录算法训练营第38天 | 509. 斐波那契数 、70. 爬楼梯 、746. 使用最小花费爬
    理论基础无论大家之前对动态规划学到什么程度,一定要先看我讲的动态规划理论基础。如果没做过动态规划的题目,看我讲的理论基础,会有感觉是不是简单题想复杂了?其实并没有,我讲的理论基础内容,在动规章节所有题目都有运用,所以很重要!如果做过动态规划题目的录友,看我的理论基础就......
  • 2022年09月三级
    青少年软件编程(图形化)等级考试试卷(三级)分数:100  题数:38一、单选题(共25题,共50分)1.运行下列程序后,结果为120的是?()A. B. C. D. 试题编号:20220426-jj-011试题类型:单选题标准......
  • P1095 [NOIP2007 普及组] 守望者的逃离
    [NOIP2007普及组]守望者的逃离题目背景NOIP2007普及组T3题目描述恶魔猎手尤迪安野心勃勃,他背叛了暗夜精灵,率领深藏在海底的娜迦族企图叛变。守望者在与尤迪安的交锋中遭遇了围杀,被困在一个荒芜的大岛上。为了杀死守望者,尤迪安开始对这个荒岛施咒,这座岛很快就会沉......
  • m2_day09 [IO流]
    课程内容:流的概述和分类InputStream和OutputStreamFileInputStream和FileOutputStream处理IO异常的两种方式BufferedInputStream和BufferedOutputStreamDataInputStream和DataOutputStreamObjectInputStream和ObjectOutputStream流的概述和分类IO流I=......
  • 5.09
    <?xmlversion="1.0"encoding="utf-8"?><ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.androi......