> "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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---