华域联盟 Andriod Android BottomNavigationBar底部导航的使用方法

Android BottomNavigationBar底部导航的使用方法

简介:Google推出的BottomNavigationBar底部导航栏

1 、基本的使用(add和replace方式)
2、扩展添加消息和图形
3、修改图片大小与文字间距

版本更新:2019-5-13

补充布局文件activity_main

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/activity_main"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:background="#ffffff"
 android:orientation="vertical">

 <FrameLayout
 android:id="@+id/tb"
 android:layout_width="match_parent"
 android:layout_height="0dp"
 android:layout_weight="1" />

 <View
 android:layout_width="match_parent"
 android:layout_height="0.5dp"
 android:background="#eeeeee" />

 <com.ashokvarma.bottomnavigation.BottomNavigationBar
 android:id="@+id/bottom_navigation_bar"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:layout_gravity="bottom" />

</LinearLayout>

1、默认使用studio背景图,防止少图片资源(效果图虽不尽人意~)

implementation 'com.ashokvarma.android:bottom-navigation-bar:2.0.4'

本文由 华域联盟 原创撰写:华域联盟 » Android BottomNavigationBar底部导航的使用方法

转载请保留出处和原文链接:https://www.cnhackhy.com/107910.htm

本文来自网络,不代表华域联盟立场,转载请注明出处。

作者: sterben

android popupwindow用法详解

Android自定义View实现炫酷进度条

发表回复

联系我们

联系我们

2551209778

在线咨询: QQ交谈

邮箱: [email protected]

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部