X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FEditBookmarkFolderDatabaseViewDialog.kt;h=e319de030ad3b34fdf4830c9cd04380b3f1c3154;hp=603dff26494e690f28cc93acebfbf2ae25d8b250;hb=91154b307513e7bc6958b27fba518e4f9b564cf9;hpb=bc2e180db377eedadbe1ea455d8fb311ead8f9d6 diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDatabaseViewDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDatabaseViewDialog.kt index 603dff26..e319de03 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDatabaseViewDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDatabaseViewDialog.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2020 Soren Stoutner . + * Copyright © 2016-2021 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with Privacy Browser. If not, see . */ + package com.stoutner.privacybrowser.dialogs import android.annotation.SuppressLint @@ -53,12 +54,7 @@ import java.io.ByteArrayOutputStream private const val DATABASE_ID = "database_id" private const val FAVORITE_ICON_BYTE_ARRAY = "favorite_icon_byte_array" -class EditBookmarkFolderDatabaseViewDialog: DialogFragment() { - // The public interface is used to send information back to the parent activity. - interface EditBookmarkFolderDatabaseViewListener { - fun onSaveBookmarkFolder(dialogFragment: DialogFragment, selectedFolderDatabaseId: Int, favoriteIconBitmap: Bitmap) - } - +class EditBookmarkFolderDatabaseViewDialog : DialogFragment() { // Declare the class variables. private lateinit var editBookmarkFolderDatabaseViewListener: EditBookmarkFolderDatabaseViewListener @@ -69,6 +65,11 @@ class EditBookmarkFolderDatabaseViewDialog: DialogFragment() { private lateinit var currentIconRadioButton: RadioButton private lateinit var saveButton: Button + // The public interface is used to send information back to the parent activity. + interface EditBookmarkFolderDatabaseViewListener { + fun onSaveBookmarkFolder(dialogFragment: DialogFragment, selectedFolderDatabaseId: Int, favoriteIconBitmap: Bitmap) + } + override fun onAttach(context: Context) { // Run the default commands. super.onAttach(context) @@ -78,7 +79,7 @@ class EditBookmarkFolderDatabaseViewDialog: DialogFragment() { } companion object { - // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. Also, the function can then be moved out of a companion object and just become a package-level function. + // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. @JvmStatic fun folderDatabaseId(databaseId: Int, favoriteIconBitmap: Bitmap): EditBookmarkFolderDatabaseViewDialog { // Create a favorite icon byte array output stream.