[英]Change alignment of icon and text in custom bottom navigation bar in android
[英]Change Bottom Bar icon size android
我正在使用https://github.com/roughike/BottomBar库来为Android创建底部栏,但我无法更改图标的大小,是否知道如何使其变小?
activity_main
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="ytstudios.wall.plus.MainActivity"
android:background="@color/colorAccent">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:elevation="8dp">
</android.support.v7.widget.Toolbar>
<com.roughike.bottombar.BottomBar
android:id="@+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimary"
app:bb_tabXmlResource="@xml/bottom_tabs"
app:bb_inActiveTabColor="@color/tabSelected"
app:bb_inActiveTabAlpha="0.2"
app:bb_behavior="iconsOnly"
app:bb_activeTabColor="@color/tabSelected">
</com.roughike.bottombar.BottomBar>
最简单的方法是使用Android Asset Studio工具根据您的尺寸转换图标
当您减小工具中的资产大小时 ,图标的大小将减小,并且将正确显示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.