Include my own icons into my eclipse android project - android

Anybody know how to include and use own icons in an android eclipse project. I found out how to convert them from ico to png files but other than that, I cannot use them in my project, I am simply lost.
Please help :)

Drag and drop you png files to the mdpi folder.(For a medium density display)
You can access them simply by R.drawable.youiconname
Also refer to this article

Related

How to resize image in mdpi, ldpi, hdpi, xhdpi

I have simple png logo. I want to resize it in 24*24 mdpi,72*72 hdpi for android. can I do it with photoshop..? or please suggest the way to do it.
I had a similar problem. I wrote a Photoshop's plugin to create different copies of a source image.
You can get it and its source from GitHub, ic_launcher_exporter. If you like it, please remember to give it a star :). I hope this helps.
Not sure about photoshop but maybe this tool can help you: Android Asset Studio
Just search for "android app icon generator" or similar. You will find lots of websites allowing you to do it online.

where drawable-hdpi ,drawable-mdpi ,drawable-xhdpi and drawable-xxhdpi. go?

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

How to detect mistakes of saving images in android wrong density directory?

In my android projects, I have found my mistakes that some images in res/drawable-xhdpi are larger than images of same name in res/drawable-xxhdpi.
Detecting these mistakes with just eyes is very difficult.
How to detect efficiently these mistakes?
I don't think there is any automated tool to do this. If you are using android studio, you can switch to Android Project View which lists the images with same name in different density directories together. So it will be easy to compare the sizes.
And you can double click on each drawable to see it's size.
More info about Android Project View : https://developer.android.com/sdk/installing/studio-androidview.html
There is No direct method for it.
But with Android Studio you can do this easy steps :
Copy image from explorer or any other source with desired resolution
Right click on drawable folder in android studio.
Select Paste
It will popup you to select the desired folder
Select correct folder and click OK...

How to add a texture file to an Android Studio project

Many examples use the resources infrastructure to load textures. I'd like to debug a problem, so I want to use the most simple, complication-free solution.
When I try to add an image asset to my project (with New > Image Asset) I'm getting the usual GUI, which will generate HDPI, XHDPI etc. versions. This is clearly not intended for textures. - So what is the right way?
Most app stores texture and background images in asset folder. If you want to store it in the resources only then you can use drawable folder.
For layout problem you can choose Project from dropdown and choose the folder.

Drawable resources and NetBeans (Android Development)

I'm newer in android development. And after using eclipse about 1 month... i hate this. I've setup NetBeans IDE for android development. It's fast, it's looks like cool and i like it. But have one trouble. I cant find how to use drawable resources (just like R.drawable.icon) :( . Can anyone help me?
PS: sry 4 my english
Use the file browser on the left hand side in NetBeans to open
YourProjectName -> res -> drawable and you will find your drawable files here. Also, Android provides different drawable folders to support multiple screen sizes, i.e : drawable-hdpi, drawable-xhdpi, drawable-mdpi. These are great if you wish to support your app on multiple screen sizes and don't want to scale the images using code (it makes them look ugly). Then you can just place different sizes of the same drawable image in these folders and android will automatically figure out which one to use!
Your English is quite decent in comparison to some of the drivel people post here.
This is simpler with updated version of NBAndroid (including NBAndroid Extensions). See some comments at http://www.nbandroid.org/2013/04/tuning-hyperlink-navigation.html

Categories

Resources