2

Question:- Does android provide any function to retrieve the all themes defined in the system.

Example: Theme_Holo_Light or others.

Monty Sharma
  • 183
  • 2
  • 13

1 Answers1

2

Short answer: no

There are only two theme families for Android:

  • Theme
  • Theme.Holo

The later was introduced in Android 3.0 Honeycomb API 11, and you can knwo that in the release notes

The standard system widgets and overall look have been redesigned and incorporate a new "holographic" user interface theme. The system applies the new theme using the standard style and theme system. Any application that targets the Android 3.0 platform—by setting either the android:minSdkVersion or android:targetSdkVersion value to "11"—inherits the holographic theme by default.

These themes come with variants (basically: Light and Dark)

So when you design a theme:

  • either you create everything from scratch
  • either you inherit from the Theme.DeviceDefault, knowing that it will depends on the Android version of each device, hence you may create a variation of your theme in values-v11 for Holo
rds
  • 26,253
  • 19
  • 107
  • 134
  • Related blog post of interest: [Holo everywhere](http://android-developers.blogspot.fr/2012/01/holo-everywhere.html) – rds Jan 02 '13 at 10:30
  • Thanks for reply ,your means that we can not get all themes provided by system or we do not have any function to retrieve that. – Monty Jan 02 '13 at 10:42
  • @Cobra Indeed. You can inderectly know it at runtime by [checking the version of Android](http://stackoverflow.com/questions/3093365/how-can-i-check-the-system-version-of-android). And you can [design for it thanks to `values-v11`](http://stackoverflow.com/questions/6861887/choosing-a-style-theme-programmatically-at-run-time) – rds Jan 02 '13 at 10:52