How to change icon shape in Android 12 Splash screen? - android

I want splash screen icon in Rectangle shape instead of rounded shape in android 12

I don't believe you can. If you look at point 3 here: https://developer.android.com/about/versions/12/features/splash-screen#elements
It describes the image "As with adaptive icons, ⅓ of the foreground is masked"
The shape of the icon shown is just whatever shape is being used by the system for adaptive icons.
The splash screen changes in android 12 are specifically to reduce the amount of customisation you can do on splash screens, to keep the UX more consistent between apps. The customisation options that do exist are detailed on that page too.

Make your logo's canvas around 35% bigger, with the square logo in the middle, keeping the logo the same size. Then Android 12 will round a 1/3rd of the image, but your logo will be untouched.

Related

Get rid of the margin on Image Asset for launcher icons on Android Studio

I am trying hard to get rid of the extra margin around the ic launcher icons generated by Android Studio without luck. I know this is one of Google's material design trends. Though, the icons are so small on devices which is ugly.
I have Googled for around three hours and the only workaround I could find is to generate the clipart with a transparent background and photoshop the background with rounded corners which is pretty slow.
Is there a better solution than this?
Thank you.
Per the Designing adaptive icons blog post, the adaptive icon images created in the drawable directory for use on API 26+ devices follow the adaptive icon size and shape:
You'll note that while the entire image must be 108dp by 108dp, the actual visual area is only the center 72dp - the outer edge is only seen when dragging the icons around (where parallax effects may cause it be visible).
The Pixel Launcher, as well as many third party launchers, enforce the use of adaptive icons on API 26+ devices, so you should always design with that requirement in mind - the alternative, in the Pixel Launcher's case for instance, is to place your non-adaptive icon within a white circle.
Therefore you should always design your icon such that the background layer takes up the full size, but any foreground image you put on top of that background layer should be contained within that center area.
You can't just remove that margin without the foreground image being messed up, but as per the Implementing Adaptive Icons follow up blog post, you can remove any white excess around the foreground by putting your trimmed image within a transparent drawable of 108dp x 108dp by using an InsetDrawable.
<!-- Center a 54x54dp image in the 108x108dp size of adaptive icons -->
<inset
android:drawable="#mipmap/ic_fg_trimmed"
android:insetLeft="25%"
android:insetTop="25%"
android:insetRight="25%"
android:insetBottom="25%" />
Although this would have to be something you'd need to do to the ic_launcher_foreground image yourself after the fact.
A better solution, in most cases, is to use vector drawable images as the input to the Android Studio Image Asset wizard - this will ensure they are always the right size and don't take up any additional space in your APK.
I think i had the same problem as you. I solved this with a nasty hack, in the AndroidManifest.xml I just changed the roundIcon to point to the standard icon.
<application
…
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher"
See more from the docs.

Guidelines for "rounded" icon in Android 7.1

Android 7.1 now supports Round Icon Resources.
Are there any "hard" specifications/requirements for the rounded icon?
So far, I have only seen round icons with a white background, is that mandatory?
It would be great to have some information on the padding of the circle, for example.

Android Launcher Icon Rounded Corner Edge Radii

Are there any official guidelines for how many pixels the edge radii should be when giving Android launcher icons rounded corners?
I've found guidelines for launcher icon pixel sizes (but rounded corners aren't mentioned), a tool called Android Asset Studio which rounds the corners for you (but the tool provides undesirable and non-configurable padding around the edges of each icon), and another tool called Icon Slayer (but the tool creates corners that I feel are way too round, and feel very iOS).
I've also noticed that of all the apps that I personally use that have rounded corners on their launcher icons, the edge radii almost always seem to vary from icon to icon. When I place the various icons next to each other, some look pretty close, but they mostly feel just a little bit off from each other.
Any help?
Check out Google's official Material Design guidelines for Icons about two thirds of the way down the page under the sub-heading Corners.
It indicates you should use a 2px radius on the corners. If go up a few sections, under the heading Content Area you'll see this is for a 24x24 px icon. You can scale up for other resolutions from there.
The radius of the corners should be 8.33% of the size of the icon according to Materiel guidelines.
So if the size of the icon in your project is:
1000px by 1000px, then the corner radius should be 83.3px.
However, you should probably make your document bigger than that.
Maybe 2000px by 2000px, and the radius:
2000px * 0.0833 = 166.6px
This is just in case you need to export a version of your icon that is bigger than 1k px.
Squares and rectangles on 192x192 px grid, when used as background shapes for android product icon, should always have 12px radius corners.
Read details

Android icon dimensions

I am using a .png image for the icon of my Android app. The problem is the image dimensions (aspect ratio) is not preserved when displaying the icon. For example the circle image is distorted to an oval shape when set as the app icon.
You're probably referring to the launcher icon, right?
According to Making Beautiful Android App Icons, the launcher icon should be square. I had a launcher icon that was not square, and it got stretched (distorted) into a square in the launcher on some devices. The solution I found was to add more (transparent) area on the sides to make it square.

Phonegap - Android Splash Screen - Centre Logo

Can anybody advise me on how to setup a splash screen to work cross resolution?
I have tried re-sizing a png file to different dimensions and placing the image in the ldpi,mdpi,hdpi folders, but the image still looks stretched/squashed depending on the device.
Is there a way to place a logo centre of the screen with a white background, i'm happy to use one size of logo even as long as it sits in the middle and looks ok¬?
Does anyone have any advice?
Cheers
Paul
Have you heard of/considered using a 9 patch version of the logo? A nine patch image allows you to define areas of an image which can be stretched. If you create your logo png file with a white background and then set the white area as stretchable it will then fill your container nicely but the logo part of the image will not distort at all.
In your android-sdk directory, under the tools subdirectory, execute a tool called draw9patch
./draw9patch
Drag your image in there. Use the left view for drawing pixels on the top and left sides. Use the right view for inspecting how your image will stretch on different devices.
OK, the answer has EVERYTHING to do with the stretchy areas of your 9patch image. I found the answer by pinging the github question. A user sent me to another discussion where someone had cracked it.
The main issue is that most 9patch tutorials explain how to stretch buttons, but none detail how to center an image.
Look for the green/blue/red image a little more than half way through the discussion.
http://community.phonegap.com/nitobi/topics/stretched_9_patch_splash_screens_android
The key for me was to look at the edges. It's really hard to see (for me at least), but you can barely make out the black marks along the edge that define the stretchy areas. top has 2 small areas (on the green), left has 2 small (on the green), bottom has one long (on the blue), right has one long (on the blue).
Consequently, I find this one image (as hard as it is to see the lines) a better instruction on how 9patch works than all of the tutorials I've watched.

Categories

Resources