2

I want to apply holographic theme when my app runs on 3.0 or higher and use default dialog theme when run on < 3.0.

For that I tried Change theme according to android version. I set the target sdk version = 11 to work for holographic theme in 3.0 and above and it is working for my simple dialog activity (without changing project.properties file android version) but if i declare the same for my library project holo theme is not inherited when I run my app on 3.0 or higher device. It shows dialogs with old theme.

I dont want to change my project.properties file android version.

I don't understand why it is not working in my library project. I also tried creating values-v11 folder and adding but I'm getting the error:

Description Resource Path Location Type error: Error: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Holo.Light').AAPT Problem

Please help me, I'm stuck.

Community
  • 1
  • 1
Harshawardhan
  • 1,521
  • 1
  • 24
  • 29
  • 1
    If you're using eclipse change the target version in project-> preferences, then add target and min SDK in your manifest. Be careful not to use code over your min SDK unless you add the SDK version check ;) – bbedward Mar 07 '12 at 13:59
  • Thanks bbedward and C.Barlow I managed to do that with "AlertDialog.THEME_HOLO_DARK", passing it to Builder object. I also put the check for minsdk version so that it wont crash for api < 11 ;) – Harshawardhan Mar 11 '12 at 19:49

0 Answers0