Fixing issue with empty strings as default values

feature/top10
Laurent 7 years ago
parent 1ed5916f76
commit 090c322b48
  1. 4
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetEditTextFragment.kt
  2. 3
      app/src/main/java/net/pokeranalytics/android/ui/view/rowrepresentable/SessionRow.kt

@ -53,7 +53,9 @@ class BottomSheetEditTextFragment : BottomSheetFragment() {
data[0].hint?.let { editText1.hint = getString(it) } data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener { this.value = it?.toString() } editText1.addTextChangedListener {
this.value = it?.toString()
}
data[0].defaultValue?.let { data[0].defaultValue?.let {
editText1.setText(it.toString()) editText1.setText(it.toString())
} }

@ -176,13 +176,11 @@ enum class SessionRow : RowRepresentable {
data.add(RowRepresentableEditDescriptor(ratedBuyin)) data.add(RowRepresentableEditDescriptor(ratedBuyin))
data.add( data.add(
RowRepresentableEditDescriptor( RowRepresentableEditDescriptor(
"",
inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
) )
) )
data.add( data.add(
RowRepresentableEditDescriptor( RowRepresentableEditDescriptor(
"",
inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
) )
) )
@ -205,7 +203,6 @@ enum class SessionRow : RowRepresentable {
BREAK_TIME -> { BREAK_TIME -> {
arrayListOf( arrayListOf(
RowRepresentableEditDescriptor( RowRepresentableEditDescriptor(
"",
hint = R.string.in_minutes, inputType = InputType.TYPE_CLASS_NUMBER hint = R.string.in_minutes, inputType = InputType.TYPE_CLASS_NUMBER
) )
) )

Loading…
Cancel
Save