It’s possibile to start a dialog from other activity ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No I don’t think so, and if it is you shouldn’t. Each dialog should be created in the context of the current activity. For what reason do you want to do this?
If your doing it because you want to save code, it makes much more sense to create a new class called something like DialogFactory. Then you can have a static method that takes a context as a parameter and creates a dialog. This way you can just call
any time you need to use that dialog.
Heres an example of what createDialog() could look like