I am trying launcher for android device, I want to add the themes and styles, applying these themes icon of the app should change same as every launcher provides. if anyone can help . Thank you.
Related
My Android application has two style themes. And i am wondering is it possible to set two icons for the same application and switch between them, when user changes App theme? Each icon for one style. Thanks
I downloaded some free icons and created a notification. At first I thought something was broken but then I realized that the icon I had used was in the same color as the background.
The pack I downloaded included several versions like "holo_dark" and "holo_light". I assume that this has something to do with theming in different android versions or user customizable settings.
What is the intended way to figure out which icon to use in such cases?
The icons are specific to the theme that you will be using in your android application. You have to identify the theme in your application and then use the specific set of icons for your theme.
For more clarity you can refer the Android Asset Studio ActionBar and Tab Icon Generator and see the difference in icons generated for different themes.
Also this article will be very useful in understanding how Styles and Themes work in Android.
I'm at a loss trying to find the default icon used for the Settings application launcher under \android-sdk\platforms\android-10\data\res\drawable-mdpi\
What name does this icon have? can I use it in my application? here it is:
2.2:
4.0:
If you're looking for a "settings" button for your app, you can include the system icon in your xml using #android:drawable/ic_menu_preferences. It won't get you the nice, colored version you included above, but makes a perfect settings icon in your menu or ActionBar.
I described way you can retrieve full resolution icon of every app installed on your phone/pad here: Getting App Icon in Android.
So all you need is find package name of this app.
It's not as simple as retrieving standard android icon from android resources, but however it can help you.
I'm creating an app supporting versions 2.1 and up to what's currently available.
Now, I'd like to make use of drawables available to the user's current theme and/or Android version when designing the ActionBar I'm creating.
The drawables enabled in every version provided by Android are very crisp and non-ambiguous, perfect for my needs.
Problem. I can't access, for instance, #android:drawable/ic_menu_refesh in my XML-files throughout my project.
There is of course the possibility of copying icons from a specific android version and using those, but I can't really see how I would make this sanely working without copying every version of the icon from every build and keeping track of what version an Android is currently running and reference the suitable drawable.
Another issue, themes(?) such as Sense are making things even that much harder. In my app I'd like to use the device's current theme. In my case I have an ICS-device that uses Dark Holo-theme and a 2.3.6-device that uses its default theme. In these cases this means selecting a suitable light colored drawable for the ActionBar/menu.
Problem. In Sense on my HTC Sensation S the background color of menu items are white, which means I now have to pick a suitable dark icon.
How would I go about this to be able to use the device's current theme, and still provide adaptable drawables so they fit the look & feel of the theme?
If I'm understanding correctly, you are wanting to be able to just reference the default icons, say the "menu refresh icon", and have it appear as it does in the system apps. I do not know of a way to do this, and recall reading Android documentation that warning against referencing default drawables, as those icons may change in future versions of Android and your app will not look as intended.
Generally, you will need to create your own icons for each menu item/actionbar item/notification/etc. There are simple tools out there that can create custom and default Android icons for different system themes. You can use resource identifiers in your res folders to have different icons for different API versions/layouts/densities/etc.
http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html
I do not understand why you are setting your icons to gray... What I think you are forgetting is that your app sets the theme, you can choose whatever system theme you want, or have a custom theme that extends from a system theme. Whether you choose dark or light, you only need icons for the theme you set. The only kicker here is to make sure you have icons for varying API versions that differ (i.e. menu icons 2.2 vs 2.3 vs 3.0+), and all you need is to make each API version and use resource identifiers to make sure your app uses the proper one.
If your app supports more than one theme, you can have it use different icons for each theme. See how to do so in my answer to a similar question:
Change ActionBar Menu Icons depending on Style
The only way I could make this work was by copying the icons I wanted provided by Android and then recolor them to a middle ground shade of gray. Not a very ideal solution but it will have to do.
Hi I want to create an android application which displays list of themes(Not the default themes shown in personalize menu in the phone) and user must select the theme which in turn changes the theme of the android phone.
Is this possible? If yes kindly tell how and give me links for the code samples for doing this.
This is not possible to do in a third party application.