我在
Android中使用最近由设计库25中的谷歌引入的底部布局导航样式.在我看到的所有教程和问题中,图标中的图像是正常大小,但是我的图像非常小,尽管事实上我保存到drawable文件夹的图像是72×72.这是一个截图:
图标应至少为2,甚至可能是该尺寸的3倍.我该怎么做?这是我在bottom_layout.xml中的代码:
xmlns:app="http://schemas.android.com/apk/res-auto">
android:id="@+id/menu_home"
android:title="test"
android:icon="@drawable/tabbarglossary"
app:showAsAction="always|withText"
/>
android:id="@+id/menu_search"
android:title="test2"
android:icon="@drawable/mediationtabbar"
app:showAsAction="always|withText"
/>
android:id="@+id/menu_notifications"
android:title="test3"
android:icon="@drawable/ic_action_name"
app:showAsAction="always|withText"
/>
在我的activity_main.xml中:
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" />
谢谢