How to dynamically apply themes in Android

by kirti kaul » Fri, 04 Dec 2009 20:24:36 GMT


Sponsored Links
 Hi,

My query is regarding on whether we can apply dynamically themes in
android,like what we do with our phones in which we can select a theme
and the same theme gets applied all across the phone.Is there a way to
do this in android ????

(I am able to change the default theme by hardcoding in the code
(styles.xml),but I need to know how we can we set themes dynamically.
I saw the Android phone,but there is no Setting where we can set the
Theme.)

Any help will be appreciated!!!

Thanks,
Kirti

--



How to dynamically apply themes in Android

by Nithin » Fri, 04 Dec 2009 21:06:16 GMT


 Hi,

We can dynamically set using setTheme(). The constant you need to put
is android.R.style.Theme_XXXXX

Thanks




--


Sponsored Links


How to dynamically apply themes in Android

by kirti kaul » Mon, 07 Dec 2009 11:07:33 GMT


 Thanks,Have u tried it?I mean are you able to change the theme on
runtime?I mean dynamically in the emulator?





--



How to dynamically apply themes in Android

by Nithin » Mon, 07 Dec 2009 12:25:55 GMT


 Hi,

Its not working in java code. Its working when put theme in manifest
only. In 1.1 SDK, i used setTheme() and it worked perfectly, but now
its not working.

 http://code.google.com/p/android/issues/detail?id=4394 
 http://code.google.com/p/android/issues/detail?id=3793 






--



How to dynamically apply themes in Android

by kirti kaul » Mon, 07 Dec 2009 14:42:19 GMT


 Thanks,I tried with
setTheme(android.R.style.Theme_Light);
        super.onCreate(savedInstanceState);
         setContentView(R.layout.main);
and this seems t owork,but my question is how do we change the Theme
of the whole system Dynamically?I mean the user should be able to
change the themes dynamically from the phone(emulator)







--



Other Threads

1. How to detect CPU Speed?

Is there a way of getting the speed at which the device is running?

-- 

2. Couple questions regarding gestures and system uis

Hello,

I'm a super noob to Android and have a couple questions... If there
are any links to examples that people know of I would love it if they
were posted.  I've been doing some searching and not seeing a lot on
what I'm looking for.

1.  Can have a program running in the background that will listen for
gestures across any view that is currently showing whether or not the
app "has focus"?

2.  Can you replace a core ui view with your own.  i.e.  Create a
keypad application that replaces the default android keypad with one
you have created.

Thanks in advance.
Josh

-- 

3. Gesture detection on Dialog / AlertDialog

4. Re : Development Of A Speech Recognizer

5. MediaPlayer and ShouCAST / How to retrieve Meta Data

6. TabHost Loads Listview that loads a ListView?

7. AudioRecord class - Disable AGC and noise suppression