Set the theme for PlaylistCreationDialog explicitly.

This commit is contained in:
Kalle Struik 2021-10-03 14:25:50 +02:00
parent 87c958b2e7
commit ceb55d0ede
1 changed files with 4 additions and 3 deletions

View File

@ -9,13 +9,14 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AlertDialog.Builder;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.DialogEditTextBinding;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.List;
@ -66,7 +67,8 @@ public final class PlaylistCreationDialog extends PlaylistDialog {
dialogBinding.dialogEditText.setHint(R.string.name);
dialogBinding.dialogEditText.setInputType(InputType.TYPE_CLASS_TEXT);
final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(requireContext())
final Builder dialogBuilder = new Builder(requireContext(),
ThemeHelper.getDialogTheme(requireContext()))
.setTitle(R.string.create_playlist)
.setView(dialogBinding.getRoot())
.setCancelable(true)
@ -83,7 +85,6 @@ public final class PlaylistCreationDialog extends PlaylistDialog {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(longs -> successToast.show());
});
return dialogBuilder.create();
}
}