X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FCreateBookmarkFolderDialog.kt;h=e05dea35b719c72cfa4daa41a8bd97b9c8dbbfa7;hp=c2b4f5f6bbd17750939a7b8388b15199aec15274;hb=1d656c562831f535aa33903d44198dd890393f4f;hpb=0e0e9f5c67bdc06877cbd19254fef6fc6cb69f2d diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.kt index c2b4f5f6..e05dea35 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.kt @@ -19,7 +19,6 @@ package com.stoutner.privacybrowser.dialogs -import android.annotation.SuppressLint import android.app.Dialog import android.content.Context import android.content.DialogInterface @@ -45,7 +44,7 @@ import com.stoutner.privacybrowser.helpers.BookmarksDatabaseHelper import java.io.ByteArrayOutputStream -// Declare the class constants. +// Define the class constants. private const val FAVORITE_ICON_BYTE_ARRAY = "favorite_icon_byte_array" class CreateBookmarkFolderDialog : DialogFragment() { @@ -95,8 +94,6 @@ class CreateBookmarkFolderDialog : DialogFragment() { } } - // `@SuppressLint("InflateParams")` removes the warning about using `null` as the parent view group when inflating the alert dialog. - @SuppressLint("InflateParams") override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { // Get the arguments. val arguments = requireArguments() @@ -113,8 +110,8 @@ class CreateBookmarkFolderDialog : DialogFragment() { // Set the title. dialogBuilder.setTitle(R.string.create_folder) - // Set the view. The parent view is null because it will be assigned by the alert dialog. - dialogBuilder.setView(requireActivity().layoutInflater.inflate(R.layout.create_bookmark_folder_dialog, null)) + // Set the view. + dialogBuilder.setView(R.layout.create_bookmark_folder_dialog) // Set a listener on the cancel button. Using `null` as the listener closes the dialog without doing anything else. dialogBuilder.setNegativeButton(R.string.cancel, null)