我在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)
谢谢
首先,很抱歉提出这样的问题,但是在下载最新的Google IO应用程序之后,
我只是喜欢底部的布局,如以下屏幕截图所示
作为android开发的新手,我不知道从哪里开始,有什么想法如何用XML中的圆圈星号实现此底部布局?有人知道这种设计叫什么吗?
layout android material-design floating-action-button material-components-android