how to add shadow effect in alert dialog box in android

后端 未结 3 583
轻奢々
轻奢々 2021-01-03 15:53

i want to add shadow effect in alert dialog box . i want this type of shadow effect in my dialog box here i post 3 files first is style.xml second is theme.java or third fil

3条回答
  •  青春惊慌失措
    2021-01-03 16:55

    create background_shadow.xml

    
    
    
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
                
            
        
    
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
                
            
        
        
            
                
            
        
    
    

    style

     
    

    Show dialog

    Dialog dialog = new Dialog(mContext, R.style.AppCompatAlertDialogStyle);
    builderSingle.setTitle(getString(R.string.select_quantity));
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.layout);
    dialog.show();
    

    Hope this will solve your problem

提交回复
热议问题