would he also need to synchronize the threads? else in the thread that he is
displaying the options he might have checked the boolean and then just
before he calls his function to display the onStop could have got called in
the other thread? possible?

On Sat, Sep 25, 2010 at 6:38 PM, Dianne Hackborn <[email protected]>wrote:

> isFinishing() is not what you want, that tells you if you have called
> finish().  The activity can be destroyed for other reasons, such as a
> configuration change.  Just implement onStop() to set a flag to say not to
> open the menu.
>
>
> On Sat, Sep 25, 2010 at 3:11 PM, Mark Carter <[email protected]>wrote:
>
>> Yeah, I was trying to remember why I posted it delayed - and I think its
>> because I was having the problem without the delay.
>>
>> I suppose, even if the post is not delayed, the user might still back out
>> before the openOptionsMenu gets to the front of the queue.
>>
>> Thanks - yeah, maybe use isFinishing() and possibly override it to set a
>> flag when super.isFinishing() returns. isFinished() would have been nice!
>>
>>
>> On 25 September 2010 23:48, TreKing <[email protected]> wrote:
>>
>>> On Sat, Sep 25, 2010 at 3:11 AM, Mark Carter <[email protected]>wrote:
>>>
>>>> Is there any way to avoid this?
>>>>
>>>
>>> Don't post it delayed? It's probably happening if a user clicks your app
>>> to open it, then decides it was a mistake and tries to exit immediately
>>> after, so the Activity is exiting by the time your Runnable runs.
>>>
>>>
>>>> Maybe a test to see whether the activity is still running? If so, what
>>>> is the most reliable way to do that?
>>>>
>>>
>>> Maybe "isFinishing()"?
>>>
>>>
>>> -------------------------------------------------------------------------------------------------
>>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
>>> transit tracking app for Android-powered devices
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to