From a3c5237c2b262f3970b7bad2285e6dc06510d6a8 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sat, 8 Jul 2023 17:40:08 +0200 Subject: [PATCH] fix: Null --- .../com/kunzisoft/keepass/view/AdvancedUnlockInfoView.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/kunzisoft/keepass/view/AdvancedUnlockInfoView.kt b/app/src/main/java/com/kunzisoft/keepass/view/AdvancedUnlockInfoView.kt index 183d36ea6..083b2be73 100644 --- a/app/src/main/java/com/kunzisoft/keepass/view/AdvancedUnlockInfoView.kt +++ b/app/src/main/java/com/kunzisoft/keepass/view/AdvancedUnlockInfoView.kt @@ -36,7 +36,7 @@ class AdvancedUnlockInfoView @JvmOverloads constructor(context: Context, defStyle: Int = 0) : LinearLayout(context, attrs, defStyle) { - private var biometricButtonView: Button + private var biometricButtonView: Button? = null init { val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater? @@ -46,15 +46,15 @@ class AdvancedUnlockInfoView @JvmOverloads constructor(context: Context, } fun setIconViewClickListener(listener: OnClickListener?) { - biometricButtonView.setOnClickListener(listener) + biometricButtonView?.setOnClickListener(listener) } var title: CharSequence get() { - return biometricButtonView.text?.toString() ?: "" + return biometricButtonView?.text?.toString() ?: "" } set(value) { - biometricButtonView.text = value + biometricButtonView?.text = value } fun setTitle(@StringRes textId: Int) {