Custom Dialog without title and border

后端 未结 8 894
终归单人心
终归单人心 2021-02-01 20:19

Based on the code here, http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog . I am successfully able to create a custom dialog with background and buttons ins

8条回答
  •  滥情空心
    2021-02-01 20:46

    Try the following style in your styles.xml:

    
    

    For more options see "Theme.Holo.Light.Dialog" which is part of the Android sources (since Honeycomb), or any other dialog style you based your's on.

    Then simply use this style as basis to your own dialog:

    Dialog myDialog = new Dialog(getActivity(), R.style.free_floating_dialog);
    myDialog.setContentView(R.layout.myContent);
    

提交回复
热议问题