安卓移动开发初步——微信页面制作

进行APP门户制作时选择在Android studio中建立简单的微信页面,内容包括:

            ①页面布局与微信页面基本相似;

            ②点击图标能实现页面的切换;

            ③点击图标时有选中效果(图标亮起);

目录

效果图

底部布局实现

顶部布局实现  

四个分段代码代码

四个分段页面布局代码

分段初始化Oncreate()实现

页面切换实现

选中效果实现

附代码仓库


效果图

简易微信整体包括四个页面:聊天、发现、通讯录、设置页面。

下面是实现的四个效果图:

页面1:聊天界面,进入时软件默认进入聊天页面,聊天图标亮起,切换至聊天页面。

 页面2:发现界面,点击发现图标时,发现图标亮起,切换至发现页面。

页面3: 通讯界面,点击通讯录图标时,通讯图标亮起,切换至通讯录页面。

 页面4: 设置界面,点击设置图标时,设置图标亮起,切换至设置页面。

底部布局实现

        编写bottom.xml实现底部四个按钮,下面只展示其中一个控件的实现,剩下三个类似。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="65dp"
    android:background="#272424"
    android:baselineAligned="false">

    <LinearLayout
        android:id="@+id/id_tab_weixin"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_weight="1"
        android:orientation="vertical">

        <ImageButton
            android:id="@+id/id_tab_weixin_img"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#272424"
            android:clickable="false"
            android:contentDescription="@string/app_name"
            and
  • 4
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值