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. Android 2.1 on Canadian Telus Milestone bug wont dial 1-888 numbers

I have a number that I dial frquently and its a toll free 1-888 number
and right after my 2.1 update from 2.01 on my Telus bought Milestone
but running on Bell, in Canada, I can no longer dial 1-888 numbers. I
tested 3-4 differant 1-888 numbers I tested 1-800 numbers all 1-888
give a quick buzz and hang up right away, all 1-800 numbers work. Has
anyone else tried on differant phones running 2.1 or even droid or
milestones running 2.1?

-- 

2. Simulating a waiting voicemail message

I am looking for a way to simulate or create a waiting voicemail
message.  I know there has a question about this that have been on the
mailing-list/group here:  http://bit.ly/b6ITDQ

In investigating trying to get a voicemail message simulated w/ the
AVD Emulator, I tried just setting the incoming mail to
"SEND_TO_VOICEMAIL" - but that does not create a message.  There is
not an indicator that the call was made until you check your call log
(which is the expected behavior, so no complaints there).

I have looking through the Android documentation, tutorials/samples,
and reference.  I cannot find anything talking about creating or
bootstrapping a voicemail message (and I haven't seen anything about
handling other instances of a "Message Waiting Indicator").

I've looked around on a couple other message forums, like anddev.org,
and haven't seen any examples dealing with voicemail.  I have a Safari
account and searched in the Android dev books and only find mention of
the Intent URI for the Dailer (voicemail:).

If looks like when I'm trying to achieve would be done by creating a
Notification and passing it to NotificationManager.notify() as done in
this example article:

http://developer.android.com/guide/topics/ui/notifiers/notifications.html

Would PendingIntent be the Intent that I'm looking for?  I'm new to
the platform/api, so I'm likely just missing some knowledge on what
I'm trying to do is called.  I have done a fair bit of looking around,
but I've reached a bit where I feel I'm going in circles.

If looks like once I could create/simulate voicemail, then I'd chance
need to create a PhoneStateListener with a definition of
onMessageWaitingIndicatorChanged() and call
TelephonyManager.listen().

If I have missed a place to check or a resource - just point me
briefly in that direction.

Thanks in advance,

Andrew

-- 

3. problem playing back .mp4

4. Milestone tiba2 mati.

5. Android Gadget driver on PXA27X board

6. How to run a class in background among a package of class

7. android selalu kalah di T3