onDetachedFromWindow() will be called before the text view is removed from
its window.  I can't recall exactly the sequence from destroy, but this
should before we look for leaked windows.  I am pretty sure that other
widgets that use pop-up and dialog windows use this to remove them.

On Fri, Oct 2, 2009 at 7:16 AM, Mark Murphy <mmur...@commonsware.com> wrote:

>
> > "Best would be to show/dismiss this dialog in the Activity"
> >
> > I can't write code inside Activty's methods like onPause/onStop/onDestroy
> > because the applications will not be mine always. They can be 3rd party
> > apps.
>
> Create methods on your homebrew TextView implementation that Activity
> needs to call from onPause/onStop/onDestroy, and needs to call in
> onCreate/onStart/onResume, to allow your dismiss/re-display code to run.
>
> If you are expecting to be able to pop up dialogs from a View without any
> Activity modifications, I suspect you may be disappointed. If you can find
> any other View in Android that does this, follow its implementation
> pattern. Off the top of my head, I cannot think of a View that pops up a
> dialog.
>
> If you are looking to contribute a patch to Android with your
> functionality, you might want to have a design discussion on
> [android-platform], to determine what the best way is to implement your
> high-order functionality -- dialogs may not be the right answer.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to