How to set Transparent Background as a Custom Dialog Box in android

前端 未结 8 1065
梦谈多话
梦谈多话 2021-02-02 17:52

I need to make my custom dialog box as a transparent.

Sample Code :

Dialog dialog;
@Override
protected Dialog onCreateDialog(int id) 
{ 
    switch(id) 
         


        
相关标签:
8条回答
  • 2021-02-02 18:29
     <?xml version="1.0" encoding="utf-8"?>
     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/a"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" android:background="#00000000">
    
     <!-- Write your LinearLayout code here -->
    
     </RelativeLayout>
    

    Try this code.

    0 讨论(0)
  • 2021-02-02 18:30

    just remove

    from Alert_page_border.xml

    0 讨论(0)
提交回复
热议问题