Skip to content
Snippets Groups Projects
Commit 994fdbdf authored by Kamal Bramwell's avatar Kamal Bramwell
Browse files

Added password visibility toggle for sensitive TextInputDialog

parent f8535d3e
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ import android.view.ViewGroup ...@@ -14,6 +14,7 @@ import android.view.ViewGroup
import androidx.databinding.DataBindingUtil import androidx.databinding.DataBindingUtil
import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.textfield.TextInputLayout
import io.xxlabs.messenger.R import io.xxlabs.messenger.R
import io.xxlabs.messenger.databinding.ComponentTextinputDialogBinding import io.xxlabs.messenger.databinding.ComponentTextinputDialogBinding
import io.xxlabs.messenger.support.view.XxBottomSheetDialog import io.xxlabs.messenger.support.view.XxBottomSheetDialog
...@@ -58,8 +59,8 @@ class TextInputDialog : XxBottomSheetDialog() { ...@@ -58,8 +59,8 @@ class TextInputDialog : XxBottomSheetDialog() {
private fun setInputPrivacy() { private fun setInputPrivacy() {
if (isSensitive) { if (isSensitive) {
binding.edittextDialogTextInput.editText?.apply { binding.edittextDialogTextInput.apply {
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD endIconMode = TextInputLayout.END_ICON_PASSWORD_TOGGLE
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment