进行APP门户制作时选择在Android studio中建立简单的微信页面,内容包括:
①页面布局与微信页面基本相似;
②点击图标能实现页面的切换;
③点击图标时有选中效果(图标亮起);
目录
效果图
简易微信整体包括四个页面:聊天、发现、通讯录、设置页面。
下面是实现的四个效果图:
页面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