How to set the theme for DialogFragment

后端 未结 4 1821
暖寄归人
暖寄归人 2021-02-07 02:22

Can someone please explain why this statement works perfectly well:

setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Holo);

and th

4条回答
  •  眼角桃花
    2021-02-07 03:08

    https://stackoverflow.com/a/24375599/2898715 it's also possible to omit the setStyle call altogether, and define the defulat style that DialogFragments will use throughout the whole app.

    styles.xml

    
    
    
        
    
        
        
    
    
    

    AndroidManifest.xml

    
    
        .....
        
            .....
        
    
    

提交回复
热议问题