0

I'm creating an application in which I've to display a dialog box. This dialog box having an edittext and a button. I want to display this dialog box before activity starts. please help me.

Ruchir
  • 1,178
  • 3
  • 23
  • 44

3 Answers3

2

Create an instance of dialog in onCreate(); and show it in onResume();

Rohit Goswami
  • 607
  • 5
  • 17
0

you can use a dialog fragment:

http://developer.android.com/reference/android/app/DialogFragment.html

this is an example of how to use it:

check out this tutorial

heLL0
  • 1,147
  • 3
  • 20
  • 28
0

there are some ways where what you can do is you can have a activity which is registered as

<activity android:theme="@android:style/Theme.Dialog" />  

at manifest and show the activity before yours activity that it will be an appearance of dialog beside this

visit

How do I display a dialog in android without an Activity context?

Community
  • 1
  • 1
Jitesh Upadhyay
  • 6,557
  • 1
  • 27
  • 44