So basically I have my own custom icon I have made for my application and I know how to set it via the android manifest but do I have to resize the images my self or will android studio do that for me or am I asking to much? thankyou
Android Studio doens't resize the images.
You have to create yourself the images for all densities.
It can be useful an external tool provided by ROman Nurik.
In AndroidManifest you don't have to specify the folder.
You have to use
<application
android:icon="#drawable/ic_launcher"
Android stuido will not resize your images you should have different images for different resolution and add them in drawable folder accordingly.
Yo can use Android Assets Studio for making some basic icons or you can also use different plugins for creating images.
Related
So, I'm developing an application in android studio, my company will give me designs created in sketch/illustrator, so how do I use them? Do I have to create the whole design in xml from scratch following the mock-up screens or can I get those mock-ups in .xml file and import them directly smh?
You need to create the XML file from scratch. When you get your designs the first thing you need to do is upload it to your Android Studio project. You do that by adding it to the 'drawable' folder. If you have more then one resolution (aka hdpi, xhdpi, xxhdpi and xxxhdpi) you have 'drawable-hdpi' folder (and so on).
After the designs are in your project, you need to implement them in your XML file.
You can do it for example with ImageView:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/YOUR-DESIGN"/>
So with the advent of Invision Studios, you can use your sketch app with a sketch app plugin called Craft which enables you to move your screens design to envision for prototyping and also to be able to view assets. Once you're on Invision, you can use the inspect tab to view some code snippets ranging from XML to Sass and even Css, which can be copied from clipboard. Description of how Invision studio looks
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
I recently made an app for android using android studio and set the icon and put it on my phone.
The problem is in the app list the icon appears as the android logos face, but when I manage the app, the icon is correct, and when on my phone I look at the apk its also correct.
Only on the app list is it incorrect.
What I've checked so far is:
Right Click the folder system, New > New > Item asset.
Set this as the application app and the image i want.
Also in the AndroidManifest.xml I've also set the
android:icon="#drawable/ic_launcher"
and on the left, the little image appears.
Any other idea's would be appreciated.
Thanks
If any other info is needed please let me know.
android:icon="#drawable/ic_launcher"
instead of ic_launcher put your drawable name in manifest
Check that you have created app icons for all different DPI's. If you check in your res folder there will be multiple drawable folders, suffixed with the different DPI's such as hdpi, xhdpi etc.
You will have to create versions of your icon for each of the different sizes as the OS will pull the most relevant size for what it needs to display at the time, small ones for the manage app's list, larger ones for your launcher.
There's a handy web tool to do this
http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
As a side note, the lastest android studio and the above web tool uses a mipmap folder rather than drawable for application icons, you can either just copy the images into their relevant drawable folders or change your manifest to use the #mipmap prefix.
Previously I made some apps with Adobe Flash Builder. That's works great but is not the best choice is some cases so I start with developing Android apps with use of ADT.
Like in Flash Builder you can set several icons for different screen resolutions. I can understand why but found it is not really necessary when creating one high resolution icon, this works fine (scaling down is better than scaling up). This also avoid the extra work that is needed to create these icons, just one icon.
Long story short, I want to create just one icon, 144x144 pixels at 96dpi and tell Android to use this icon.
Also I want to point the application icon to the asset directory instead of the res/drawable directory. The reason for this is that the icon can be reused by the (web-)application and for another reason, I have made a webApp tool to create a compressed version of a webApp and put the contents in the asset directory of a Android project.
Because the webApp can also run in the browser I have already created some icons (like favicon, apple-touch-icon and apple-touch-startup-image) and want to reuse these icons in the Android project automaticly.
The idea is also to create an application project template so it is quite easy to create a android app of a webApp.
Question
Andy idea how to change the location of for example the application icon? Using a path doesn't work (it generates an error, can't compile).
android:icon="#drawable/ic_launcher"
android:icon="assets/appicon.png" #<- doesn't work
Actually found the solution myself and is pretty simple. The only thing that is a bit tricky in ADT to validate the new declaration because at first 'it says' that the declaration is invalid. The workaround is to cut (ctrl+X) the declaration, do a project clean by Project|Clean and then put it back by paste it again (ctrl+V). Weird but true ;-)
You can declare a string resource like this (in XML file):
<resources>
<string name="app_icon">assets/appicon.png</string>
</resources>
android:icon="#string/app_icon" <- this works
Then you can use just one high-res icon image as icon for all devices! Looks great! See also picture below (between red rectangle ;-)):
can anyone tell me where I get the icons native android?
I think what you are asking for is the icons that are used by the Android OS. If that's the case you can view them in the android.jar file that is installed with the SDK.
<sdk-install-path>/platforms/<any-platform>/android.jar
If you extract that jar and have a look at the res/drawable* folders you will see the icons used throughout the OS. You can also access them from within your code using:
#android:drawable/<name of drawable>
It's not clear if you want to access the icons as files or through your application. If you want the actual icons you can grab them from the source code.
The source code for Android is available here at android.googlesource.com:
https://android.googlesource.com/platform/frameworks/base.git/
Specifically:
https://android.googlesource.com/platform/frameworks/base.git/+/master/core/res/res/drawable-hdpi/
Many of the Android icons / resources are available by resource ID. The resource IDs for those are in the android.R class.
http://developer.android.com/reference/android/R.drawable.html
Material Icons seems to be a good address for a standard Icon set for android these days.
Check out http://www.yay.se/resources/android-native-icons it contains all the standard icons converted to vector graphics.