I'm a little confused.
First, when I create a toolbar and it overlaps the status bar, I just add fitSysmtemWindow="true" to the parent XML and it works fine.
But when I create a FullScreen DialogFragment , it also overlaps the status bar. I tried adding fitSystemWindow="true" and it does not work.
Only on Android 5.0+. Did not set the status bar translucent anywhere.
Here is my DialogFragment code
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_create_bill_dialog,container, false); return view; } @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); return dialog; }
Thanks. I apologize for my poor English.
android android-layout android-dialogfragment
Math burn
source share