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
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
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.
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
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:
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
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
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
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();
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).
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
11 matches
Mail list logo