|
|
|
@ -27,7 +27,6 @@ import net.pokeranalytics.android.ui.adapter.BindableHolder |
|
|
|
import net.pokeranalytics.android.ui.adapter.RecyclerAdapter |
|
|
|
import net.pokeranalytics.android.ui.adapter.RecyclerAdapter |
|
|
|
import net.pokeranalytics.android.ui.adapter.RowRepresentableDataSource |
|
|
|
import net.pokeranalytics.android.ui.adapter.RowRepresentableDataSource |
|
|
|
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate |
|
|
|
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate |
|
|
|
import net.pokeranalytics.android.ui.extensions.hideKeyboard |
|
|
|
|
|
|
|
import net.pokeranalytics.android.ui.extensions.px |
|
|
|
import net.pokeranalytics.android.ui.extensions.px |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetType |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetType |
|
|
|
import net.pokeranalytics.android.ui.modules.handhistory.model.* |
|
|
|
import net.pokeranalytics.android.ui.modules.handhistory.model.* |
|
|
|
@ -222,10 +221,22 @@ class HandHistoryAdapter( |
|
|
|
|
|
|
|
|
|
|
|
editText.isFocusableInTouchMode = true |
|
|
|
editText.isFocusableInTouchMode = true |
|
|
|
|
|
|
|
|
|
|
|
editText.setOnClickListener { |
|
|
|
// editText.setOnClickListener { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// itemView.context.hideKeyboard(it) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// editText.isFocusable = true |
|
|
|
|
|
|
|
// editText.isFocusableInTouchMode = true |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// editText.requestFocus() |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// editTextSelected(editText, true, editText.tag as Int) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
itemView.context.hideKeyboard(it) |
|
|
|
editText.setOnTouchListener { _, event -> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event.action == MotionEvent.ACTION_UP) { |
|
|
|
|
|
|
|
// Both are required, otherwise requestFocus() fails |
|
|
|
editText.isFocusable = true |
|
|
|
editText.isFocusable = true |
|
|
|
editText.isFocusableInTouchMode = true |
|
|
|
editText.isFocusableInTouchMode = true |
|
|
|
|
|
|
|
|
|
|
|
@ -233,20 +244,8 @@ class HandHistoryAdapter( |
|
|
|
|
|
|
|
|
|
|
|
editTextSelected(editText, true, editText.tag as Int) |
|
|
|
editTextSelected(editText, true, editText.tag as Int) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return@setOnTouchListener true |
|
|
|
// editText.setOnTouchListener { _, event -> |
|
|
|
} |
|
|
|
// |
|
|
|
|
|
|
|
// if (event.action == MotionEvent.ACTION_UP) { |
|
|
|
|
|
|
|
// // Both are required, otherwise requestFocus() fails |
|
|
|
|
|
|
|
// editText.isFocusable = true |
|
|
|
|
|
|
|
// editText.isFocusableInTouchMode = true |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// editText.requestFocus() |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// editTextSelected(editText, true, tag) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// return@setOnTouchListener true |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -579,10 +578,12 @@ class HandHistoryAdapter( |
|
|
|
|
|
|
|
|
|
|
|
// Title |
|
|
|
// Title |
|
|
|
itemView.title.text = setupRow.title(itemView.context) |
|
|
|
itemView.title.text = setupRow.title(itemView.context) |
|
|
|
|
|
|
|
val visibility = if (state == PlayerSetupRow.State.SETUP_ONLY && !setupRow.hero) View.GONE else View.VISIBLE |
|
|
|
|
|
|
|
itemView.title.visibility = visibility |
|
|
|
|
|
|
|
|
|
|
|
// Position recycler |
|
|
|
// Position recycler |
|
|
|
val visibility = if (state == PlayerSetupRow.State.SETUP_ONLY) View.GONE else View.VISIBLE |
|
|
|
val posVisibility = if (state == PlayerSetupRow.State.SETUP_ONLY) View.GONE else View.VISIBLE |
|
|
|
itemView.positionRecyclerView.visibility = visibility |
|
|
|
itemView.positionRecyclerView.visibility = posVisibility |
|
|
|
|
|
|
|
|
|
|
|
this.positionAdapter.positions = adapter.dataSource.contentForRow(row, itemView.context, Position::class) |
|
|
|
this.positionAdapter.positions = adapter.dataSource.contentForRow(row, itemView.context, Position::class) |
|
|
|
this.positionAdapter.setOnClickListener { pos -> |
|
|
|
this.positionAdapter.setOnClickListener { pos -> |
|
|
|
|