문제

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.

도움이 되었습니까?

해결책

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

다른 팁

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

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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top