How to create custom alert dialog in android?

前端 未结 9 1217
再見小時候
再見小時候 2020-12-09 10:36

I am developing a sample app.I am able to show alert on button click having some tittle and button .But now I want to show a pop up window having username (Label)

9条回答
  •  再見小時候
    2020-12-09 10:42

    You can make a normal activity and set the android:theme to dialog:

       
        
    

    and in your xml file for this activity you can decide the height and width of this dialog field. For example:

    
    

    The important thing is the manifest part.

提交回复
热议问题