X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FCreateBookmarkFolderDialog.kt;h=d5fd6d82d8390996022a5183d03483fa01efc934;hb=044e469923b042c6f019083166d8a543aa5edee3;hp=7d4283bfe296657fc82504dac1820c9ceec5f8b2;hpb=bc2e180db377eedadbe1ea455d8fb311ead8f9d6;p=PrivacyBrowserAndroid.git 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 7d4283bf..d5fd6d82 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.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 @@ -45,15 +46,15 @@ import java.io.ByteArrayOutputStream // Declare the class constants. private const val FAVORITE_ICON_BYTE_ARRAY = "favorite_icon_byte_array" -class CreateBookmarkFolderDialog: DialogFragment() { +class CreateBookmarkFolderDialog : DialogFragment() { + // Declare the class variables. + private lateinit var createBookmarkFolderListener: CreateBookmarkFolderListener + // The public interface is used to send information back to the parent activity. interface CreateBookmarkFolderListener { fun onCreateBookmarkFolder(dialogFragment: DialogFragment, favoriteIconBitmap: Bitmap) } - // Declare the class variables. - private lateinit var createBookmarkFolderListener: CreateBookmarkFolderListener - override fun onAttach(context: Context) { // Run the default commands. super.onAttach(context) @@ -63,7 +64,7 @@ class CreateBookmarkFolderDialog: 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 createBookmarkFolder(favoriteIconBitmap: Bitmap): CreateBookmarkFolderDialog { // Create a favorite icon byte array output stream.