Kitkat embedded themes - android

Where can I see all available Android themes (under 4.x Android)?
I need something like gallery with images and descriptions of each theme.
I'm tired to try them blindly (set theme and relaunch application to see what I set up).
Thanks!

Related

Prevent Android from changing the theme

I've set theme `"#android:style/Theme.NoTitleBar", but Android keeps switching the way the controls look on different devices.
Is there a way to prevent Android from changing the theme of the application without writing a custom theme?

How to create a white Alert on Android using PhoneGap?

I want to show a popup similar to this one on Android using PhoneGap.Is this a native popup? or is it designed by Twitter?
I can't find its name on the internet
Using JavaScript:alert and navigator.notification.alert(message, alertCallback, [title], [buttonName]) shows the default black dialog.
That is the native dialog from the Light Holo Theme, twitter definitely hasn't built that. You just need to set the correct theme for your app. You can't do that on the HTML5 layer, but it's very easy to set in your manifest.
Assuming that you are running on any device with android 3.0 or higher you can set up your app theme to Holo.Light in your manifest file:
And if you want to target lower versions you can take a look on this question.
And don't use javacript.alert(), that will display an ugly title in your dialog, always use phonegap notification for native dialogs.

How do I decide which icon to use depending on background?

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.

Set drawable icon in menu based on theme

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.

Themes in Android?

I have an idea to create Themes for Android Mobile. But I have no knowledge of how to do this. I would need to know about the following things:
What is the file format of a theme for Android?
What kind of things I want to handle to change the themes (i.e background, directory window, wallpaper, icon selector style, etc.)
How to start to learn about this
Sites and tutorials for beginners
Sample applications and code
If you passed by information about anything above, please share with me. It would be helpful.
Thanks.
I would start with Google's page on Styles and Themes. Many of your questions are answered there.
http://developer.android.com/guide/topics/ui/themes.html
Here's a simple tutorial:
http://developerlife.com/tutorials/?p=309
EDIT:
If you are talking about themes for the phone instead of the app, you can create themes for specific home screen replacements such as aHome. I'm sure if you look around their site you can see how to create a theme for their app.
There are also sites like Android Themes, but they require that you have rooted your phone and have installed a custom ROM such as those by Cyanogen.
Perhaps you could also write your own custom home screen.

Categories

Resources