From d4c1b8d32139ca33fdefe4ad1ca0e155ca8c1a01 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 31 Aug 2018 17:12:56 +0300 Subject: [PATCH] Fix: remove title from PlaylistDialog --- .../newpipe/local/dialog/PlaylistDialog.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java index 4b8e391c7..15ba5d184 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java @@ -1,9 +1,11 @@ package org.schabi.newpipe.local.dialog; +import android.app.Dialog; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; +import android.view.Window; import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.util.StateSaver; @@ -41,6 +43,18 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave StateSaver.onDestroy(savedState); } + @NonNull + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + final Dialog dialog = super.onCreateDialog(savedInstanceState); + //remove title + final Window window = dialog.getWindow(); + if (window != null) { + window.requestFeature(Window.FEATURE_NO_TITLE); + } + return dialog; + } + /*////////////////////////////////////////////////////////////////////////// // State Saving //////////////////////////////////////////////////////////////////////////*/