Coming from web development to Android development, I've found that there are many similarities and differences.
Being used to icon fonts, I have some questions about using fonts and icons in Android apps.
Are icon fonts a "thing" in Android app development?
I've seen people mentioned putting icon images under drawable, but others say to put them under mipmap. What are the differences?
Thanks.
Q1. Yes, Icon Fonts are a "thing" in Android. I suggest you do a Google Search on how to use them, or you could ask another question on StackOverflow.
Q2.
The mipmap folder should only be used for your app's Launcher Icon, all other images should be placed under the drawable folder. This is because the launcher icon's resolution is different from the device's current density. See this for more
Related
I have some questions regarding Icons in our Android App.
We currently have a lot of Icon Sets in the drawable folder (like 20-30 Sets) which we use depending on which user is logged in currently. Each of the Icons exists multiple times for different resolutions (HDPI, XHDPI...).
We don't like having all the Icons in the App because we need to release a new update every time when we need to add some new Icons (which happens a lot).
Question:
Is it possible to download Icons at runtime and use them to create a view? Then we wouldn't need to store all the Icons in the app.
If yes, how would it work with different resolutions? Would we need to download each Icon in different sizes?
Thanks in advance.
I want to place a google sign in button in my cross-platform xamarin app.
I downloaded the assets from google and am confused as to how I'm supposed to use them...
In the android folder, there are assets for the various DPIs. But the problem is they all seem to have some weird black lines around them...
What is the intended use of these lines? Am I supposed to crop them out?
Obviously I could just edit the files to my liking but I want to stay as true to google's usage policy as possible, and avoid altering another company's assets if possible.
I noticed that in the "web" folder there are complete buttons. So why would I use what's in the android folder?
How does google intend for developers to use these assets?
I too have similar questions when trying to customise my Google Sign In buttons, and finally figured it all out after digging through the Android Documentation.
What is the intended use of these lines?
The top and left lines define the area of the image that you are allowed to stretch, and the bottom and right lines define the area of the image that your text will occupy (see image below)
Am I supposed to crop them out?
No. Add this image into your drawable/res folder. Make sure you leave the .9.png extension as it is otherwise Android Studio won't adhere to the features mentioned previously!
Why would I use what's in the android folder?
Great question! Because using this will make customising your app for different devices easier. To explain further, it is worth clarifying that:
unlike any image assets, you will realise that this asset has a .9.png extension, suggesting that it is a Nine Patch Drawable Graphic
it allows your text to fit nicely within the predetermined area, so it helps you to adhere to Google's branding guidelines
For more information, read here.
Hope this helps! Cheers.
Just use the batch drawable in android and edit the picture in ANDROID cropping out the image black lines.
I am wondering what are the legal ramifications of using an icon from the internet in my app. I am not much of an artist but there are gazillions of icons on the web. I was going to use one and tweak it a bit and use it for my android app. Is this legal to do?
Thanks.
If you wish you can use your icons from drawable folder by creating vector icons giving it your own colors and styles
I am developing an app in which there are multiple tabs with icon without any title. The problem is that the icons are not looking as bright it should. I used white color(FFFFFF) in creating icon assets. Still it doesn't looks so good.
The pic above shows Facebook Messenger and my App. There is difference between color(although both are white).
Any suggestion will be appreciated.
Yeah I have experienced similar problem. I think it is fault of android asset studio when I create icon with white in reality they are no white as I expected.Then I found very good online studio which is same as Android asset studio even better than that. Solution for this I think you have create icon out from AS then import them to appropriate folders.Here online icon generate web site link
Note: The question is old, but I consider sharing this information could be useful for anyone who could stumble upon this issue in the future.
If you use the Asset Studio tool from the Android Studio your icons will contain
alpha channel with a value of 60% (value depends on selected colour). I provided an example below.
In case you can use vector graphics it should work for you because you can freely edit XML file describing the generated image. Just remove android:alpha=".." attribute.
If you cannot use vector graphics and want to avoid transparency use this official online tool from Google to generate material icons for your application.
This tool supports multiple sizes, black and white colours, and SVG as well as PNG format:
Issues example of 60% alpha channel in Android Studio:
I created my own icon for my app using Eclipse (Manifest->Application->Icon etc) and this created the same icon for all different phone screens. However, I now need that same icon for the Google Play market and it needs to be 512x512. Is it even possible to enlarge that icon using Eclipse?? Thanks.
Eclipse creates it in your project root, name: ic_launcher-web.png or something like it.
Not that I know of, but you can use Android Asset Studio
I used it to make plenty of action bar icons, notification icons and just general icons. I think it is a great tool all android developers should be aware of :)