I am planning to develop a new android application. I like to know what are the options available to create the resources (images).
As per my understanding, these are the only options i am aware of
Create nine-patch image using the draw nine-patch tool.
Use paint to create images of various size
Also, since android supports multiple density, i am planning to create resources specific to ldpi, mdpi, hdpi and xhdpi. Please suggest if this approach is good and what is the best way to create images of various densities (example - any tool to create those images or any website, etc.)
Thanks in advance.
This Android Asset Studio will give you a hand with Images, Icons, Colors and Styles.
It doesn't solve all the problems, like nine-patch creation, but it is definitely a useful tool. For that you can use the Nine-Patch tool: http://developer.android.com/tools/help/draw9patch.html
Related
I'm working on creating an Android application based on an already created iPhone app. I have a bunch of app icons from the iPhone application that end in '#xx.png' (x being a number).
I know this has something to do with the resolution of the image, but do I have to do anything regarding converting them into vectors/renaming them to a certain standard in Android?
This is not the pretty good practice, but in the end, if you don't have separated dimensions for Android too, then, somehow you can considerate the ratio like this:
#1x -> mdpi (the baseline)
#2x -> xhdpi
#3x -> xxhdpi
You need to use a tool that does what you need, just take the best image with the best resolution from iOS images, and use this link to generate the ic_launcher for android.
To answer your question, when you are inserting images or icons into the drawables folder of Android, you need to ensure the following:
The names of the images/icons cannot contain capital letters.
The file type of the image/icon is either .png or .jpg. .svg is not allowed.
You also can't have symbols like -, _, or #.
You can also refer to this article about naming Android Assets. And this website allows you to make your own app icons.
I hope this answers your question.
I've just finished creating a bunch of icons in Adobe Illustrator for my Android phone. My problem is now, how can I make an icon pack like those you can download from the Play Store? You might think that there must a lot tutorials for this purpose, but I don't seem to find them useful, and it confuses me more than it benefits.
Any help will be appreciated.
Thanks in advance.
Try this instrument (Icon generators allow you to quickly and easily generate icons from existing source images, clipart, or text.): https://romannurik.github.io/AndroidAssetStudio/
Firstly, whichever icon you go with you will need different resolutions of it such as ldpi, mdpi, hdpi, etc.. and that can be done in two ways,
Manually by making each image the correct size
Using a asset generator like Android Asset Studio https://romannurik.github.io/AndroidAssetStudio/index.html
In terms of creating the actual icon, you dont need any specific "Android Icon Tutorial". You can use any generic logo or icon tutorial and just create it in the correct size. Read this link for icon sizes:
https://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
Then you can simply watch and "logo" or "icon" tutorial and follow along. Then I would use Android Asset Studio to create all DPI's
And this one for other icons:
https://developer.android.com/guide/practices/ui_guidelines/icon_design.html
before when I was creating a new project I was found this folders drawable-hdpi,drawable-mdpi, drawable-xhdpi, and drawable-xxhdpi. but now they are all gone!
is there any explanation of what happens?
and where we should put our images?
This is perhaps because they will add an Gradle plugin that converts SVGs to PNGs during build (as mentioned in this IO talk). The idea is that you will only need to have a single SVG instead of multiple PNGs for various densities (an thus, only one drawable folder). You can still create the folders and use PNGs.
The Gradle plugins for SVG conversion by Google has not been released yet, but you can use Victor or a similar plugin if you already want to use SVGs for your drawables.
You should read Android Blog
you can just create drawable-xhdpi.
I just give answer here
read and if any problem ask.
I wasn't aware that Android Studio ever provided these dpi dependent drawable folders for the built-in default project scaffolding, and indeed, why should they?
Are they supposed to guess that you're going to support each and every one of these resolutions? Perhaps all your graphics will be vector graphics? Perhaps you only target low or high resolutions?
Also, the DPI modifier is only 1 of the possible modifiers you can attach to a resource folder. You can also add locale, screen width / height, mobile country code and many more. Should Android Studio create a folder with each of these options, along with every possible variation? You'd end up with thousands of folders which you'd likely never use.
In addition, creating a folder with no assets inside it is a big problem when you start synchronising your code using Github or something similar, and creating every possible folder with default assets inside seems like a huge waste.
I think the best approach here is to create any resource folder you need when you need it. Google leaves this decision to you.
Also, important: There is no XDPI or XXDPI folder - it's XHDPI, and XXHDPI
Check in your project section, Not in android section, If they gone just simply create them
I am using the Android 9-patch tool to generate my 9-patch images. I have to support a number of different resolutions and button states. This means that for a single 9-patch button I need to generate 16 separate assets. Currently I am generating each of these separately using the Android 9-patch tool interface which is taking a lot of my time. If I was able to specify the 9-patch dot for a range of buttons which have the same properties this would save me a lot of time. Is there the equivalent of a command line tool or other approach which would help.
Thanks
Here is a nifty looking tool I just found. I cannot verify its accuracy or stability, but it claims to do what you want.
You can try to use the Android Asset Studio at http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html.
Well, there's is no tool as you like afair, but you could easily craft small script (PHP, Perl whatever) that would combine two images (main image + 9-patch dots) together. Or you can save dots separately and then load it into GIMP or Photoshop as layers and export as single final 9patch PNG.
I am investing some time doing drawables for an Android project and I am looking for alternatives.
Currently I do them on Adobe Illustrator and with some drawables I can use Android Asset Studio (e.g. drawables for the action menu). The problem with Android Asset Studio is the lack of possibilities to use my own color (we can only use white/black colors).
I wanted something like Android Asset Studio where I can give him a HD image and he creates all drawable sizes. Is that possible?
Another option could be a program/script that could allow me to say "I want to scale to these resolutions" and he does it for all images.
What you're looking for is called a batch resizer, but without knowing what you're working with, it's hard to give a recommendation. For instance, you can use both Photoshop and Gimp for it. I believe Gimp will require a plugin, while Photoshop has the script built-in.