2021-10-25使用RecyclerView实现聊天列表并实现Activity跳转

本文介绍如何在Android应用中使用RecyclerView实现聊天列表的界面,并详细讲解了从列表项点击到详情页的Activity跳转实现过程。通过创建RecyclerView布局和配置Activity,实现了从新闻列表到详情页面的流畅过渡。
摘要由CSDN通过智能技术生成

功能效果展示:在这里插入图片描述

目标分析:

上述界面分为两个部分,前面是新闻列表页,后面是新闻详情页,新闻列表页中可以使用recyclerView实现,详情页则用一个简单的布局文件实现即可。

详情页:

bottom部分:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="100dp"
    android:layout_gravity="bottom"
    android:baselineAligned="false"
    android:orientation="horizontal">


    <ImageButton
        android:id="@+id/yuyin"
        android:layout_width="84dp"
        android:layout_height="match_parent"
        android:background="#EAFAEB"
        android:src="@drawable/yuyin"
        tools:ignore="SpeakableTextPresentCheck"
        tools:src="@drawable/yuyin" />


    <ImageButton
        android:id="@+id/duihua"
        android:layout_width="145dp"
        android:layout_height="match_parent"
        android:background="#36F4C8"
        android:src="@drawable/duihyakuang"
        tools:ignore="SpeakableTextPresentCheck"
        tools:src="@drawable/duihyakuang" />

    <ImageButton
        android:id="@+id/biaoqin"
        android:layout_width="82dp"
        android:layout_height="match_parent"
        android:background=<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值