Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
[fenix] For mozilla-mobile/fenix#23841: Hide keyboard when selecting …
Browse files Browse the repository at this point in the history
…month or year
  • Loading branch information
sunildev-01 authored and mergify[bot] committed Jan 4, 2023
1 parent 8cd7e94 commit 029e32f
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package org.mozilla.fenix.settings.creditcards

import android.annotation.SuppressLint
import android.content.DialogInterface
import android.os.Bundle
import android.view.Menu
Expand Down Expand Up @@ -56,6 +57,7 @@ class CreditCardEditorFragment :

private lateinit var interactor: CreditCardEditorInteractor

@SuppressLint("ClickableViewAccessibility")
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

Expand All @@ -81,10 +83,20 @@ class CreditCardEditorFragment :
creditCardEditorView = CreditCardEditorView(binding, interactor)
creditCardEditorView.bind(creditCardEditorState)

binding.cardNumberInput.apply {
requestFocus()
placeCursorAtEnd()
showKeyboard()
binding.apply {
cardNumberInput.apply {
requestFocus()
placeCursorAtEnd()
showKeyboard()
}
expiryMonthDropDown.setOnTouchListener { view, _ ->
view?.hideKeyboard()
false
}
expiryYearDropDown.setOnTouchListener { view, _ ->
view?.hideKeyboard()
false
}
}
}
}
Expand Down

0 comments on commit 029e32f

Please sign in to comment.