更改底部栏图标大小android [英] Change Bottom Bar icon size android

查看:79
本文介绍了更改底部栏图标大小android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用

activity_main

<android.support.v7.widget.Toolbarandroid:layout_width="match_parent"android:layout_height="wrap_content"android:background="@color/colorPrimary"机器人:海拔=8dp"></android.support.v7.widget.Toolbar><com.roughike.bottombar.BottomBarandroid:id="@+id/bottom_bar"android:layout_width="match_parent"android:layout_height="60dp"机器人:layout_alignParentBottom =真"android:background="@color/colorPrimary"应用程序:bb_tabXmlResource="@xml/bottom_tabs"应用程序:bb_inActiveTabColor="@color/tabSelected"应用程序:bb_inActiveTabAlpha="0.2"应用程序:bb_behavior="iconsOnly"app:bb_activeTabColor="@color/tabSelected"></com.roughike.bottombar.BottomBar>

解决方案

最简单的方法是使用 Android Asset Studio 工具 根据您的尺寸转换图标
随着您在工具中减小资产大小,您的图标将减小并正确显示.

I am using https://github.com/roughike/BottomBar library to make my bottom bar for android but i can't change the size of the icons , any idea how to make them small ?

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> 

解决方案

The easiest way would be use Android Asset Studio tool to convert your icons according to your size
As you will reduce asset size in the tool your icon will be reduced in size and will be displayed correctly.

这篇关于更改底部栏图标大小android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆