[TUT] How to set Icon for your Android Apps - Android Software/Hacking General [Developers Only]

Hi guys, this is just a simple Tutorial to setup your own icon for your Android applications.
- So, first you have to create/find a 48 x 48 PNG image and place the image inside your Project folder under res/drawable. You can name the icon as of your choice, but remember to use same name in every folders like drawable-hdpi or drawable-mdpi etc..
- Open AndroidManifest.xml
- Inside the XML file, you should see an <application> tag, and the android:icon attribute. Add the below line to that attribute.
Code:
android:icon="@drawable/icon"
Note that, I named my icon as icon.png since the name icon. PNG extension is not needed in the XML file. Just only have to specify the icon name.
So, now you have successfully set your icon to your app.
But the thing is, Android Phones comes in variety of Screen resolutions. So your app icon must also support the different screen sizes/resolution. For this, inside your Project you will find many folders like drawable-hdpi, drawable-ldpi, drawable-mdpi and drawable-xhdpi under the /res folder. Add those images inside the respected folders by the resolution specified in the below table.
1. Low Density (~120dpi)
Folder Path: res/drawable-ldpi
Image resolution must be 36 x 36 PNG file.
2. Medium Density (~160dpi)
Folder Path: res/drawable-mdpi
Image resolution must be 48 x 48 PNG file.
3. High Density (~240dpi)
Folder Path: res/drawable-hdpi
Image resolution must be 72 x 72 PNG file.
4. Extra High Density (~320dpi)
Folder Path: res/drawable-xhdpi
Image resolution must be 96 x 96 PNG file.
Click to expand...
Click to collapse
Anyways as an example, I have set an icon for this Application, and the before/after setting the icon is showed in the below pics.
BEFORE :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
AFTER :
So, that's it. And its not that hard thing to set an icon for your Android apps. I have used XDA logo of various resolutions for the icon. You can download the one's I used from here, or you can design your own and set as mentioned in the Tutorial. Also, you may need to check the Icon Design Guidelines specified by Google for reference.

Reserved.

Related

need alittle help from the manilla experts

i was wondering if anyone could tell me what manilla files contain these icons
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i know the bottom 4 are gonna have 2 each a 64x64 and a 128x128
but im not sure about the 2 on the side
Thanks in Advance
If you mean the two on the side, as in the Call Mobile and Send SMS icons, I've attached the full set below [SMS, Mobile, Home, Work, etc..] Just extract the manila files in the ZIP to a dedicated folder. I've also attached a zip which includes the Tab Icons amongst the slider tray, as well as the Large Preview images.
All of the manila files have the System & Hidden Attributes, so you'll have to un-hide all hidden files, as well as show the system files, if you wish to simply get the manila names.
But if you want to edit, open CFC-GUI, and direct CFC-GUI to the folder with the extracted manila files.
INFO ::
'People Manila Files.zip' includes the icon set for the Left-Most icons in your picture (SMS, etc..)
'People Manila Tray & Slider.zip' includes ALL of the tray/slider icons, as well as the large Preview Icons that appear when sliding, from the People/Contacts area, .
Agent Zach said:
If you mean the two on the side, as in the Call Mobile and Send SMS icons, I've attached the full set below [SMS, Mobile, Home, Work, etc..] Just extract the manila files in the ZIP to a dedicated folder. I've also attached a zip which includes the Tab Icons amongst the slider tray, as well as the Large Preview images.
All of the manila files have the System & Hidden Attributes, so you'll have to un-hide all hidden files, as well as show the system files, if you wish to simply get the manila names.
But if you want to edit, open CFC-GUI, and direct CFC-GUI to the folder with the extracted manila files.
INFO ::
'People Manila Files.zip' includes the icon set for the Left-Most icons in your picture (SMS, etc..)
'People Manila Tray & Slider.zip' includes ALL of the tray/slider icons, as well as the large Preview Icons that appear when sliding, from the People/Contacts area, .
Click to expand...
Click to collapse
awesome thanks so much Zach
You're very welcome. Glad I could help.

[Q] Changing button background in android

Hi everyone,
i have a Samsung Galaxy Ace with Infinity ROM installed.
I'm trying to make darker backgrounds for buttons because often the button text is not legible because of the poor contrast between the text color and the button background.
So i extracted the framewrok-res.apk and edited btn_default_normal.9.png and btn_default_small_normal.9.png with GIMP, then i repacked the framework-res.apk and pushed it in the device with adb.
The problem is that now the buttons background is not being stretched correctly.
Here an example:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you can see, the button "Attiva archivio USB" isn't correctly stretched and it doesn't cover the entire lenght of the text. How can i fix this?
Thank you
(Hope this is the correct section)
You would have to edit some png images by using apk manager, the background bar you would have to stretch using Gimp or PhotoShop
Sent from my HTC_A510c using XDA App
crazyking_max said:
Hi everyone,
i have a Samsung Galaxy Ace with Infinity ROM installed.
I'm trying to make darker backgrounds for buttons because often the button text is not legible because of the poor contrast between the text color and the button background.
So i extracted the framewrok-res.apk and edited btn_default_normal.9.png and btn_default_small_normal.9.png with GIMP, then i repacked the framework-res.apk and pushed it in the device with adb.
The problem is that now the buttons background is not being stretched correctly.
Here an example:
As you can see, the button "Attiva archivio USB" isn't correctly stretched and it doesn't cover the entire lenght of the text. How can i fix this?
Thank you
(Hope this is the correct section)
Click to expand...
Click to collapse
Editing .9.pngs are not the same as editing a normal png. It has to be decompiled first, then edited, then recompiled. There are a few TUT on how to edit a .9 out there. It is very time consuming. Also look for the tool of .9 draw tool. once deompled you ill see the diff from a normal png.
Yeah now i'm using the draw9patch and xUltimate compiler, but i think that i'm not really understanding how to put patches in draw9patch...

Changing the icons and graphics applications

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Google's operating system, unlike implemented in other platforms, is strongly oriented to the user, making it easy to perform tasks in other systems are complicated or completely impossible.
Such is the case of modification of applications developed by other users, for which there are tools that allow both the treated and recompiling, but of course, to modify the resulting code must have some computer knowledge.
However, any user can change the visual appearance of your applications without having prior knowledge and without being root, resulting, in general, extremely simple to modify the background of your widgets, for example.
To do this you simply need to know how Google organizes the information in an application.
Android applications are recognized for having the extent apk, English Package System Android. Apk files (like jar files, java standard derived) contain all the information on the application, ie the same code, resources used, the list of permissions required to run, and digital signature associated with it, which prevents a change, and is checked every time we make an update.
Although initially it may seem complicated, it really is not, as a apk file is organized internally as a zip container, so that stored data can be obtained with almost all the pressure reducers on the market, although it is recommended WinRar program use, which makes the whole process.
The images and descriptions of the various screens of Android are in res directory, which is structured as follows:
Subdirectories layout and layout-*: The files are of type xml, although they are compiled, so are not directly modifiable and need to decompile the application to change them. These files contain the description of the elements of the different screens of the application,
Xml subdirectory: this subdirectory files are also compiled xml type, and include information on the configuration screens of the application,
Drawable drawable-subdirectories and *: Depending on the programmer, you'll find both compiled xml files as images (usually png files 9.png type).
The png files are files 9.png extensible, and find more information here, while the png files are a type of images you can edit with any editor.
Image
Once all the changes, you only have to insert the apk files modified in the application, for which, if you use WinRar, keep in mind that graphics files should be inserted disabling compression, while for the rest file must indicate the type of normal compression.
To finish, you need to download a utility to sign the new application you can install once signed, but first uninstall the original application.

Is possible to modify "website error" dialog?

Hi!
I'm not sure if this is the correct place where to ask this, but at least Subforum name rings a bell for me.
I've recently installed "AdAway" on my "Huawei U8350" (Android 2.2.2) in order to block ads on websites.
Since this application doesn't work as "AdBlock Plus" does for "Mozilla Firefox" (hiding blocked elements, etc), the places where ads were used to be displayed have been replaced with a "website error" dialog, telling me that these sites couldn't be loaded.
Here's an example (taken from "Dolphin Browser":
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In some cases, these dialogs are pretty long, and sometimes they change the visible area on websites, so, their layout is affected (height gets increased):
Since my phone's Display is quite small, I'd like to know if there's a way to change/customize these dialogs in order to gain working areas.
I'd like to know if were possible to modify these dialogs to something like these (being C my favorite):
I could see that inside "framework-res.apk" (assets folder) there's the "upside down Android" image under the name "android-weberror.png".
The problem is that I don't know where the dialog text could be located at (or if it is located inside Dolphin Browser apk files).
I've to add that I couldn't find any "SystemUI.apk" file; it has "framework-res.apk" only (as I've read, it seems to be usual, since it's still a Froyo, but I could've been searching on the wrong path).
I hope that someone could guide me to complete this little mission, by providing me of necessary info and help.
Thanks in advance!!
Framework-res.apk file
/res/raw(-locale) has the html file
/res/values/strings.xml has the texts depending on the error:
<string name="httpErrorUnsupportedAuthScheme">The site authentication scheme is not supported.</string> for example
This is the syntaxis (string name="httpErrorxxxxxxxxx")
Thank you so much!
I've been able to edit "loaderror" and "nodomain" files from "raw" folder.
This is what I did for "nodomain":
Code:
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
<title>Site Unavailable</title>
<style type="text/css">
body { margin: 0px; padding: 0px; }
</style>
<body>
<p><img src="file:///android_asset/webkit/android-weberror.png"></p>
</body>
</head>
</html>
I hid URLs inside that upside down Android image, making it like a link object.
I haven't changed anything from "strings.XML" yet (probably unnecessary for now).
However, ads areas (height/width specified by website itself) are still there, but all has been replaced by that upside down Android only
Thanks again for your help Browser's visible area looks cleaner now!

[MOD][TUTORIAL] Background Modifier

So...
We are all here because we love to modify our phones. Some like alot and others like a little.
Here's a little mod made possible by the vr theme system
Change the background for your system to your own personal choice. And I'm not referring to wallpaper I'm referring to the background that most apps use on your phone.
This can all be done on your phone in about 5 minutes. The following may seem like a lot but once you do it once or twice it's very simple. PLEASE NANDROID BEFORE FLASHING... JUST IN CASE
Apps I Use:
Root Explorer Pro by SpeedSoftware
Photo Editor by dev.macguyver
1. Download file below
2. You will need 3 images... 2 dark and 1 light (you can use the same image twice for the dark background if you like, just make a copy. Please keep in mind that most of the time you see these backgrounds you will have text over top of them, so don't make dark background to bright and don't make light backgrounds to dark
3. Using root explorer find the images you want to use and copy them to another place. For example, I have a separate folder from my picture folder called Edited (you can call it whatever you like). It's also best to choose a picture whose resolution is at least 512x512
4. Next open one picture in Photo Editor and choose resize/fit, then select manual and resize to 480x800 NOTE: Not all pictures will stay perfect looking. You may need to crop them beforehand.
5. Once the picture is sized, if necessary you may need to darken the image or brighten the image... Just select color and adjust the brightness slider as needed. Feel free to play with the other options in Photo Editor, as there are a lot of features (This is my number one app used when building themes)
6. Repeat steps for the other images. When you save each image, you must save as a PNG... if your base file was jpg then it will create a new PNG for you
7. After editing the 3 images, change there names...
The light image must be named background_holo_light.png
One dark image must be named background_holo_dark.png and the other must be named tw_background_holo_dark.png
8. Now go to the file you downloaded and Extract (if using root explorer, you might want to set a specific folder to extract to and zip to before starting)
9. Take your 3 custom backgrounds and move then to BGmodifier/vrtheme/system/framework-res.apk/res/drawable-nodpi and paste...You should get 3 popups to replace each file.
10. Exit all the folders... Long press BGModifier, select Zip... when it's finished boot into recovery and flash
ENJOY YOUR OWN CUSTOM BACKGROUNDS
DOWNLOAD THIS FILE
BGModifier.zip - 589.17 KB
Please feel free to ask questions and/or post screenshots of your custom backgrounds
o0BlacknesS0o said:
Please feel free to ask questions and/or post screenshots of your custom backgrounds
Click to expand...
Click to collapse
you can can also do your pulldown (status bar expanded) put a custom image in your notification background.
Some backgrounds-
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
.
Just a couple of framework backgrounds and the 1 notification pulldown.
[email protected]'$ [email protected]@XY

Categories

Resources