gpt4 book ai didi

android - Google Material Design 图标 - 从相应的可绘制文件夹中使用哪个文件(18dp、24、36 和 48)

转载 作者:行者123 更新时间:2023-11-30 00:51:54 25 4
gpt4 key购买 nike

Google Material Design 图标 https://github.com/google/material-design-icons ,注意在每个文件夹下,即(drawable-hdpi、drawable-mdpi 等)至少有 4 组文件.. 如下所示..

我想知道在布局中将它们用作 ImageButton 时,应该在 android:src 属性中引用哪个文件,以及它背后的逻辑是什么。假设应用程序必须支持 4 英寸、5 英寸和 10 英寸屏幕尺寸。可能有人解释了这 4 种文件的用途。

-rw-r--r-- 1 girishkhatri 197121 111 Jul 26 22:27 ./navigation/drawable-hdpi/ic_menu_black_18dp.png
-rw-r--r-- 1 girishkhatri 197121 94 Jul 26 22:27 ./navigation/drawable-hdpi/ic_menu_black_24dp.png
-rw-r--r-- 1 girishkhatri 197121 105 Jul 26 22:27 ./navigation/drawable-hdpi/ic_menu_black_36dp.png
-rw-r--r-- 1 girishkhatri 197121 111 Jul 26 22:27 ./navigation/drawable-hdpi/ic_menu_black_48dp.png

-rw-r--r-- 1 girishkhatri 197121 81 Jul 26 22:27 ./navigation/drawable-mdpi/ic_menu_black_18dp.png
-rw-r--r-- 1 girishkhatri 197121 82 Jul 26 22:27 ./navigation/drawable-mdpi/ic_menu_black_24dp.png
-rw-r--r-- 1 girishkhatri 197121 94 Jul 26 22:27 ./navigation/drawable-mdpi/ic_menu_black_36dp.png
-rw-r--r-- 1 girishkhatri 197121 99 Jul 26 22:27 ./navigation/drawable-mdpi/ic_menu_black_48dp.png

-rw-r--r-- 1 girishkhatri 197121 94 Jul 26 22:27 ./navigation/drawable-xhdpi/ic_menu_black_18dp.png
-rw-r--r-- 1 girishkhatri 197121 99 Jul 26 22:27 ./navigation/drawable-xhdpi/ic_menu_black_24dp.png
-rw-r--r-- 1 girishkhatri 197121 111 Jul 26 22:27 ./navigation/drawable-xhdpi/ic_menu_black_36dp.png
-rw-r--r-- 1 girishkhatri 197121 116 Jul 26 22:27 ./navigation/drawable-xhdpi/ic_menu_black_48dp.png

-rw-r--r-- 1 girishkhatri 197121 105 Jul 26 22:27 ./navigation/drawable-xxhdpi/ic_menu_black_18dp.png
-rw-r--r-- 1 girishkhatri 197121 111 Jul 26 22:27 ./navigation/drawable-xxhdpi/ic_menu_black_24dp.png
-rw-r--r-- 1 girishkhatri 197121 117 Jul 26 22:27 ./navigation/drawable-xxhdpi/ic_menu_black_36dp.png
-rw-r--r-- 1 girishkhatri 197121 127 Jul 26 22:27 ./navigation/drawable-xxhdpi/ic_menu_black_48dp.png

-rw-r--r-- 1 girishkhatri 197121 111 Jul 26 22:27 ./navigation/drawable-xxxhdpi/ic_menu_black_18dp.png
-rw-r--r-- 1 girishkhatri 197121 116 Jul 26 22:27 ./navigation/drawable-xxxhdpi/ic_menu_black_24dp.png
-rw-r--r-- 1 girishkhatri 197121 127 Jul 26 22:27 ./navigation/drawable-xxxhdpi/ic_menu_black_36dp.png
-rw-r--r-- 1 girishkhatri 197121 129 Jul 26 22:27 ./navigation/drawable-xxxhdpi/ic_menu_black_48dp.png

最佳答案

https://google.github.io/material-design-icons 获得了图标的详细信息和用途和 https://developer.android.com/guide/practices/screens_support.html默认为24

Sizing

Although the icons in the font can be scaled to any size, in accordance with >material design icons guidelines, we recommend them to be shown in either 18, 24, 36 or 48px. The default being 24px

关于android - Google Material Design 图标 - 从相应的可绘制文件夹中使用哪个文件(18dp、24、36 和 48),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40889301/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com