I
I
IgorMats2011-07-09 09:20:51
Android
IgorMats, 2011-07-09 09:20:51

Problems with displaying the application icon in the launchers of Samsung (Android) phones?

Hello! I came to you with the following problem: for a week I have been googling all possible resources to find how to set the background icons of the application in the launcher (it seems that this problem is observed only in Samsung phones). Most likely, I didn’t describe it well, that’s why I couldn’t google the answer, so with your permission I’ll show the whole thing in pictures)
1306663049_touchwiz002.jpg
As you can see on this screen, the applications have a background (of different colors with lines), but when I set my app, the icon just has a gray background.
Now, if you could tell me either how to stretch the icon so that the launcher does not cut it off, or at least put a background on it, then I would be infinitely grateful !!!
How I tried to solve the problem:

  • Googled on "Drawing Icons for Android Phones"
  • Read recommendations from Google for creating icons
  • Googled on the topic "Where does the background of the icons in TouchWiz come from"
  • Googled on the topic "Icons in launcher'ax Samsung"

Unfortunately, I did not find anything, but I concluded that the background still generates TouchWiz.
I had already lost hope, but I did a little experience: With sadness in my eyes, I went to google sources and took the sources of osmonitor.apk (Quite a large application). I inserted the desired icon into the project, renamed the application to my own and VOILA under my icon is a green background. How? I shoveled all the sources ... Removed all java sources and to no avail. Source code for files like manifest, main_layout, etc. are no different, and the background of the icon appears. How?
Thanks in advance for the replies!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman, 2011-07-09
@WNeZRoS

For non-system applications, the background is generated based on the package name. To be more precise, by the number of characters in the package name.

N
nd0ut, 2011-07-09
@nd0ut

I will assume that the background color is calculated according to some unknown algorithm based on the colors of the icon itself (as in the W7 dock). Try to make an icon with a green circle and a white thing inside, like FastReboot, and if the background is the same, then the theory is correct.

Y
YasonBy, 2011-07-09
@YasonBy

1. In your application, the icon is in resources/drawable, like in OSMonitor?
2. Similar questions (unanswered, alas) were googled here , here and here .
3. In the last answer there is a link to the apk of the Samsung launcher. In which you can find files with the desired background images (res/drawable-hdpi/mainmenu_icon_*_bg). Judging by the names of the files, they are intended for certain + pre-installed built-in applications, and for the rest they are assigned arbitrarily (in the screenshot, the Battery Indicator is drawn over the mainmenu_icon_email_bg).
By the way, pay attention to mainmenu_icon_clock_bg - it just looks like a black glossy square. Maybe you're just "lucky" and your application is assigned this particular background?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question