Improvements

hh
Laurent 6 years ago
parent 1c365d9dbb
commit 3c304f3cd5
  1. 12
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt
  2. 1
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/KeyboardAmountView.kt

@ -68,10 +68,10 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
initUI()
this.edit()
this.model.selectionLiveData.value?.index?.let {
Timber.d(">>>> attempt to retrieveEditTextInputConnection")
this.retrieveEditTextInputConnection(it)
}
// this.model.selectionLiveData.value?.index?.let {
// Timber.d(">>>> attempt to retrieveEditTextInputConnection")
// this.retrieveEditTextInputConnection(it)
// }
}
@ -107,13 +107,15 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
this.model.selectionLiveData.observeForever { selection ->
selection?.let {
Timber.d("Current selection is ${selection.index} / ${selection.keyboard}")
retrieveEditTextInputConnection(selection.index)
when (it.keyboard) {
HHKeyboard.ACTION -> {
val positions = this.model.positionsForSelection()
this.keyboard.setPositions(positions)
}
HHKeyboard.AMOUNT -> {
retrieveEditTextInputConnection(selection.index)
}
else -> {}
}
} ?: run {

@ -117,6 +117,7 @@ class KeyboardAmountView(context: Context) : AbstractKeyboardView(context),
editText.setText(amount?.noGroupingFormatted)
// editText.requestFocus()
editText.isEnabled = true // avoid crashes due to input connection null
editText.onCreateInputConnection(EditorInfo())?.let {
this.inputConnection = it

Loading…
Cancel
Save