问题标签 [android-mipmap]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
214 浏览

android - 使用 mipmap 时通知不显示图标

我正在处理 FCM 并添加这些元数据来定义通知的图标和颜色,当我使用 mipmap 图标时它不起作用并在我使用它正在显示的可绘制图像时显示填充矩形

带 mipmap 带 mipmap

可绘制

可绘制

0 投票
2 回答
250 浏览

android - 应用程序图标仅在 API21 中显示,但在其他 api 中失败

我的清单文件中有此代码。我面临的问题是该图标仅显示在 Android Lollipop (Api21,Asus Nexus Tab)中。我已经在 Oreo (Oppo A3S) 和 Android P (Samsung Galaxy S10+) 中进行了测试,但没有显示图标。mipmap 中的图像看起来不错。

仅显示纯色(图标的背景)。这与mipmap中的图像有关吗?因为它们看起来不错。即使清单中行号附近的图标预览看起来也不错。

我还观察到我只有一个 webp 文件,mipmap-anydpi-v26但其他应用程序有 2 个 XML 文件,一个用于圆形文件,一个用于普通文件。

0 投票
0 回答
198 浏览

android-studio - Not have drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi

WorkSpace:Android Studio

I have 35 images. I have realized that I have drawable (but not have "drawable-mdpi, drawable-xhdpi..") folder and also there are "mipmap-mdpi.." folders.

  1. I put my images to the simple drawable folder. --> It gives me error: "Canvas trying to draw too large bitmap" I search little bit and I found "Canvas: trying to draw too large bitmap" when Android N Display Size set larger than Small that someone in the link said that I should move images to the "drawable-xhdpi" folder. I tried to move my images to the "mipmap-xhdpi" as you might be know I don't have any type of drawable folders. Only drawable I have.
  2. I wanted to use "mipmap" folders for "Images." It works now but maybe it is not best practice
  3. After that I have search it little bit and I found Mipmaps vs. drawable folders and someone answered (878 up vote) that mipmap folders is for icons.

What Should I do?

  1. Resize the images and put it back to the drawable
  2. Do not move your images to the drawable again, it can stay in the mipmap folder no problem. The person in the link said wrong.

Thank you for your attention.

And very very important and last question is should i resize one image into 4 , and put one of them into mdpi, one of them hdpi, one of them xhdpi and one of them xxhdpi? if yes , it means if i have 30 images, i should resize and make it 120 images?

0 投票
1 回答
62 浏览

android - minSdkVersion 26 或更高版本,仅使用包含 ic_launcher 图标的 mipmap-anydpi

我想知道,当我的新项目是minSdkVersion 26(或以后)时,我可以安全地删除这些mipmap-*dpi文件夹及其内容ic_launcher图标,然后只需使用mipmap-anydpi(重命名为mipmap-anydpi-v26)包含矢量图标(ic_launcher.xmlic_launcher_round.xml)的文件夹。

Android Studio 屏幕截图

建立一个这样的项目似乎没有问题。有什么我不知道的潜在问题吗?

0 投票
1 回答
11 浏览

html - 我可以将存储在 res/mipap 中的 .png 图像链接到存储在 android_asset 中的 html 文件,以便 WebView 在 html 文件中同时显示文本和图像吗?

我有一个使用 WebView 功能的 Android 应用程序,它会在出现提示时从本地主机打开我的应用程序内的 html 文件,这些文件已存储在 android_asset 文件夹中。但是,WebView 函数只显示 html 文件中的文本,它不显示我链接到 html 文档代码中的图像,这些图像存储在 res/mipmap 中。当我使用 WebView 打开 html 文件时,我的应用程序可以同时显示文本和图像,这对我来说很重要。将 html 文件和图像存储在一个位置也很重要,这意味着它们将被添加到可安装程序中(这样用户就不必连接到互联网来使用应用程序或在他们周围移动任何文件) . 是否可以将存储在本地主机上的图像链接到 android_asset 或 res/mipmap 中,以便在 WebView 中打开 html 文件时可以同时看到文本和图像?不起作用的图像的链接在 res/mipmap 中,它是:img src = "file:///mipmap-hdpi/car.png" alt = "Test Image"

0 投票
0 回答
9 浏览

android-studio - [Android][Android Studio] 我们可以在mipmap 文件夹中除了PNG/ JPG 或XML 添加另一个扩展吗?

我们可以在 mipmap android 文件夹中添加任何文件扩展名吗 例如:.qmg、.psd 等知道这个文件是否安全,或者换句话说是“我们可以让编译器忽略这个错误吗?”。非常感谢你们!