[android-developers] Re: setting app theme at runtime

2013-01-05 Thread skink
dashman wrote: Thanks. I see how this can be done. Now from the main app, I open a preferences screen that allows the user to select a theme. But I don't want to restart the app right there - user might want to do other things. From the main app, how can I detect that the Preferences

[android-developers] Re: setting app theme at runtime

2013-01-05 Thread dashman
Yes I thought about that. but since the app has to be restarted on theme change - i did not want to do it as soon as the preferences changed. they might want to do other things in the preferences. the place to do seems to be when they're backing out of the pref page. i've solved this problem by

[android-developers] Re: setting app theme at runtime

2013-01-04 Thread dashman
Thanks. I see how this can be done. Now from the main app, I open a preferences screen that allows the user to select a theme. But I don't want to restart the app right there - user might want to do other things. From the main app, how can I detect that the Preferences screen was closed.

[android-developers] Re: setting app theme at runtime

2013-01-04 Thread bob
Maybe override onBackPressed for the Preferences activity? On Friday, January 4, 2013 1:34:11 PM UTC-6, dashman wrote: Thanks. I see how this can be done. Now from the main app, I open a preferences screen that allows the user to select a theme. But I don't want to restart the app

[android-developers] Re: setting app theme at runtime

2013-01-04 Thread dashman
yes i thought of overriding onStop(). but how to i notify the main activity that the preferences was closed. On Friday, January 4, 2013 2:53:18 PM UTC-5, bob wrote: Maybe override onBackPressed for the Preferences activity? On Friday, January 4, 2013 1:34:11 PM UTC-6, dashman wrote:

[android-developers] Re: setting app theme at runtime

2013-01-04 Thread dashman
seems like starting the preferences activity with startActivityForResult() should work. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this

[android-developers] Re: setting app theme at runtime

2013-01-04 Thread dashman
from the closing Activity, when and where should setResult() be called. trying to send the result back to the activity waiting for startActivityForResult(). I did it in onStop() - and it always returns RESULT_CANCELED even though i hard-coded a RESULT_OK. seems like RESULT_CANCELED is being

Re: [android-developers] Re: setting app theme at runtime

2013-01-04 Thread TreKing
On Fri, Jan 4, 2013 at 4:51 PM, dashman erjdri...@gmail.com wrote: from the closing Activity, when and where should setResult() be called. Before you call finish() on it. trying to send the result back to the activity waiting for startActivityForResult(). What is the result? Don't you

Re: [android-developers] Re: setting app theme at runtime

2013-01-04 Thread dashman
after much experimentation - this works public void onBackPressed() { setResult( RESULT_OK ); // whatever result user wants sent back // then call either one of the lines below - not sure which one is better super.onBackPressed();

Re: [android-developers] Re: setting app theme at runtime

2013-01-04 Thread TreKing
On Fri, Jan 4, 2013 at 5:15 PM, dashman erjdri...@gmail.com wrote: // then call either one of the lines below - not sure which one is better super.onBackPressed(); //finish(); } Same diff. I believe super.onBackPressed() just calls finish() (you can check this easily).

[android-developers] Re: setting app theme at runtime

2013-01-03 Thread RichardC
See: http://stackoverflow.com/questions/2482848/how-to-change-current-theme-at-runtime-in-android and follow some of the links Note that change in theme will not take place until an active Activity is re-created/re-started On Thursday, January 3, 2013 11:17:46 PM UTC, dashman wrote: i'd like