DialogFragment FEATURE_NO_TITLE is shrunk

后端 未结 1 1250
抹茶落季
抹茶落季 2020-12-12 01:13

I\'m displaying a DialogFragment. I implemented it with no problems, until I decided to remove the title using getDialog().getWindow().requestFeature(Wind

相关标签:
1条回答
  • 2020-12-12 01:38

    Set style in your onCreate(), this helps me to have not shrunk dialog without title.

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Holo_Light_Dialog_NoActionBar_MinWidth);
    }
    
    0 讨论(0)
提交回复
热议问题