相关疑难解决方法(0)

如何在android底部导航布局中增加图标大小?

我在Android中使用最近由设计库25中的谷歌引入的底部布局导航样式.在我看到的所有教程和问题中,图标中的图像是正常大小,但是我的图像是非常小的,尽管事实是我保存到drawable文件夹的图像是72x72.这是一个截图:

在此输入图像描述

图标应至少为2,甚至可能是该尺寸的3倍.我该怎么做?这是我在bottom_layout.xml中的代码:

  <?xml version="1.0" encoding="utf-8"?>

 <menu xmlns:android="http://schemas.android.com/apk/res/android"

   xmlns:app="http://schemas.android.com/apk/res-auto">
  <item
    android:id="@+id/menu_home"
    android:title="test"
    android:icon="@drawable/tabbarglossary"
    app:showAsAction="always|withText"
    />
  <item
    android:id="@+id/menu_search"
    android:title="test2"
    android:icon="@drawable/mediationtabbar"
    app:showAsAction="always|withText"
    />

  <item
    android:id="@+id/menu_notifications"
    android:title="test3"
    android:icon="@drawable/ic_action_name"
    app:showAsAction="always|withText"
    />

</menu>
Run Code Online (Sandbox Code Playgroud)

在我的activity_main.xml中:

 <android.support.design.widget.BottomNavigationView
    android:id="@+id/navigation"
    android:layout_width="match_parent"
    android:layout_height="80dp"
    android:layout_alignParentBottom="true"
    android:layout_gravity="bottom"
    android:layout_marginBottom="0dp"
    android:layout_marginLeft="0dp"
    android:layout_marginRight="0dp"
    android:focusable="false"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    design:menu="@menu/bottom_layout" />
Run Code Online (Sandbox Code Playgroud)

谢谢

android bottomnavigationview

14
推荐指数
4
解决办法
2万
查看次数

Google的新底部布局

首先,很抱歉提出这样的问题,但是在下载最新的Google IO应用程序之后,

我只是喜欢底部的布局,如以下屏幕截图所示

在此处输入图片说明

作为android开发的新手,我不知道从哪里开始,有什么想法如何用XML中的圆圈星号实现此底部布局?有人知道这种设计叫什么吗?

layout android material-design floating-action-button material-components-android

5
推荐指数
1
解决办法
2743
查看次数