adaptive-icon

Given a Drawable, how to mask it to a given shape?

余生颓废 提交于 2021-01-29 20:23:03
问题 Background I wanted (here) to see how to create an alternative to AdaptiveIconDrawable , but change its background drawable to be shaped in to a given Path . The problem Well, what I did worked for Bitmap, but I wanted to know if it's possible to convert a given Drawable directly to a Bitmap and even a Drawable that is shaped to the given Path , without creating extra Bitmap instances. What I've tried This is the current code : fun resizePath(path: Path, width: Float, height: Float): Path {

Given a Drawable, how to mask it to a given shape?

人盡茶涼 提交于 2021-01-29 16:20:54
问题 Background I wanted (here) to see how to create an alternative to AdaptiveIconDrawable , but change its background drawable to be shaped in to a given Path . The problem Well, what I did worked for Bitmap, but I wanted to know if it's possible to convert a given Drawable directly to a Bitmap and even a Drawable that is shaped to the given Path , without creating extra Bitmap instances. What I've tried This is the current code : fun resizePath(path: Path, width: Float, height: Float): Path {

Can I use Android 8.0 Adaptive Icons for a Flutter app?

寵の児 提交于 2020-08-22 08:28:20
问题 How can I use an Adaptive Icon for my Flutter app on Android 8.0 and up? The Create Image Asset dialog in Android Studio says "Project must be built with SDK 26 or later to use adaptive icons", even though my android build.gradle has CompileSDKVersion set to 27. If I define the icon in XML, it doesn't work, it seems to just use the regular legacy app icon. 回答1: They work perfectly fine. Solution To work with the dialog , you will need to open your Android module in Android Studio. Flutter.dev

Can I use Android 8.0 Adaptive Icons for a Flutter app?

China☆狼群 提交于 2020-08-22 08:27:03
问题 How can I use an Adaptive Icon for my Flutter app on Android 8.0 and up? The Create Image Asset dialog in Android Studio says "Project must be built with SDK 26 or later to use adaptive icons", even though my android build.gradle has CompileSDKVersion set to 27. If I define the icon in XML, it doesn't work, it seems to just use the regular legacy app icon. 回答1: They work perfectly fine. Solution To work with the dialog , you will need to open your Android module in Android Studio. Flutter.dev

How do launchers change the shape of an adaptive icon, including removal of background?

依然范特西╮ 提交于 2020-05-09 18:42:09
问题 Background Starting from Android O, apps can have adaptive icons, which are 2 layers of drawables: foreground and a background. The background is a mask that gets to be a shape of the launcher/user's choice, while the OS has a default shape for it too. Here's an example of what Nova Launcher allows to do: As you can see, it allows not only to choose which shape to use, but also avoid a shape at all (in "prefer legacy icons"). Here are some links about it: https://www.youtube.com/watch?v

Android oreo shows icon inside white round

孤街浪徒 提交于 2019-12-08 14:41:39
问题 My Android application shows launcher icon inside white circle on Android oreo version. I would like to show launcher icon as it is like square on oreo device by default. Gone through various blogs and found that : 1) Mobile user can change icon type from home screen settings screen (But that I don't want. I want to display only square by default) 2) Use application target sdk version below 26 (I want to have latest sdk version targeted and square launcher icon) I have tried : Adaptive icon