类微信的门户页面框架设计

本文档详述了一个类微信门户页面的设计目标与实现,包括4个tab页面,使用fragment和activity构建,不采用UNIAPP技术。功能说明中提到,页面由顶部、主页面和底部组成,通过底部导航栏切换不同主页面。文章提供了代码解析,涉及bottom.xml、top.xml、activity_main.xml的构造,MainActivity的编写,以及四个Fragment的调用。并附有运行展示截图和源码仓库链接。
摘要由CSDN通过智能技术生成

目录

1.设计目标

2.功能说明

3.代码解析

3.1.bottom.xml的构造

3.2.top.xml的构造

3.3.activity_main.xml的构造

3.4.MainActivity的构造

3.5.调用的四个Fragment文件

4.运行展示截图

5.源码仓库地址


1.设计目标

  1. 根据课程教学内容完成类微信的门户页面框架设计;
  2. APP最少必须包含4个tab页面;
  3. 框架设计需要使用fragment,activity,不得使用UNIAPP技术进行开发(H5或者小程序);

2.功能说明

                程序运行后进入门户页面,共包含4个tab页面,页面有顶部、主页面和底部三个部分。通过点击底部的微信、朋友、通讯录、设置四个按钮可以跳转到对应的主页面。进行页面跳转时,只改变门户主页面的元素,顶部和底部都不变。

3.代码解析

        3.1.bottom.xml的构造

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="100dp">
 
 
    <LinearLayout
 
 
        android:id="@+id/id_tab_weixin"
        android:layout_width="0dp"
        android:layout_height="100dp"
        android:layout_weight="1"
        android:background="@drawable/bottom_bar"
        android:orientation="vertical">
 
 
        <ImageButton
            android:id="@+id/id_tab_weixin_img"
            android:layout_width="match_parent"
            android:layout_height="80dp"
            android:layout_weight="1"
            android:background="#000000"
 
            android:clickable="false"
            app:srcCompat="@drawable/weixin2"
            tools:ignore="SpeakableTextPresentCheck" />
 
        <TextView
            android:id="@+id/textView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center_horizontal"
            android:saveEnabled="false"
            android:text="微信"
            android:textColor="#ffffff"
            android:textSize="15sp" />
 
    </LinearLayout>
 
    <LinearLayout
        android:id="@+id/id_tab_frd"
        android:layout_width="0dp"
        android:layout_height="100dp"
        android:layout_weight="1"
 
        android:background="@drawable/bottom_bar"
        android:orientation="vertical">
 
 
        <ImageButton
            android:id="@+id/id_tab_frd_img"
            android:layout_width="match_parent"
            android:layout_height="80dp"
            android:layout_weight="1"
            android:clickable="false"
 
            android:background="#000000"
            app:srcCompat="@drawable/friend2"
            tools:ignore="SpeakableTextPr
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值