Laurent 5 years ago
parent 8310712e3d
commit 7e19e42014
  1. 7
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt
  2. 21
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt

@ -39,7 +39,6 @@ import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.holder.RowViewHolder
import net.pokeranalytics.android.ui.view.rowrepresentable.ViewIdentifier
import net.pokeranalytics.android.util.extensions.formatted
import timber.log.Timber
enum class HandRowType(var layoutRes: Int) : ViewIdentifier, RowRepresentable {
@ -174,10 +173,6 @@ class HandHistoryAdapter(
delegate?.onRowSelected(this.currentPosition, row, tag)
// val text = dataSource.charSequenceForRow(row, itemView.context, tag)
// editText.hint = text
// editText.text = null
setEditTextBackground(editText = editText, isEnabled = true, isFocused = true)
}
@ -471,7 +466,7 @@ class HandHistoryAdapter(
amountEditText.setOnTouchListener { _, event ->
Timber.d("=== event.action = ${event.action}")
// Timber.d("=== event.action = ${event.action}")
if (event.action == MotionEvent.ACTION_UP) {
// Both are required, otherwise requestFocus() fails
amountEditText.isFocusable = true

@ -220,7 +220,7 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
}
this.replayerItem = menu.findItem(R.id.replayer)
this.replayerItem?.isEnabled = this.model.handHistory.isManaged
Timber.d("this.replayerItem = ${this.replayerItem}")
// Timber.d("this.replayerItem = ${this.replayerItem}")
}
}
@ -644,19 +644,14 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
// set interpolator and updateListener to get the animated value
valueAnimator.addUpdateListener {
this.kbTopGuideline?.let { topGuideline ->
val lp = this.kbTopGuideline.layoutParams as ConstraintLayout.LayoutParams
// get the float value
lp.guideEnd = (it.animatedValue as Float).toInt()
// update layout params
this.kbTopGuideline.layoutParams = lp
val lp = this.kbTopGuideline.layoutParams as ConstraintLayout.LayoutParams
// get the float value
lp.guideEnd = (it.animatedValue as Float).toInt()
// update layout params
this.kbTopGuideline.layoutParams = lp
if (lp.guideEnd == end.toInt()) {
endHandler?.invoke()
}
} ?: run {
Timber.w("WARNING >>> kbTopGuideline is null")
if (lp.guideEnd == end.toInt()) {
endHandler?.invoke()
}
}

Loading…
Cancel
Save