|
@@ -4,7 +4,6 @@ import android.text.Editable
|
|
|
import android.text.TextWatcher
|
|
|
import android.view.LayoutInflater
|
|
|
import android.view.View
|
|
|
-import android.view.View.OnFocusChangeListener
|
|
|
import android.view.ViewGroup
|
|
|
import android.widget.EditText
|
|
|
import android.widget.LinearLayout
|
|
@@ -144,41 +143,44 @@ class GroundConveyTableAdapter(private val itemList: ArrayList<GroundConveyTable
|
|
|
override fun getItemCount() = itemList.size
|
|
|
|
|
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
|
|
- val item = itemList[holder.bindingAdapterPosition]
|
|
|
- holder.paymentItemName.text = item.sidName
|
|
|
- holder.price.setText(item.price.toString())
|
|
|
- holder.priceUnit.text = item.currencyStr
|
|
|
- holder.count.setText(item.count.toString())
|
|
|
-
|
|
|
- for (checkedItem in OASystem.unitList) {
|
|
|
- if (checkedItem.id == item.units) {
|
|
|
- holder.unit.text = checkedItem.name
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- holder.date.text = item.datePrice.substring(0, 10)
|
|
|
- holder.detail.setText(item.priceContent)
|
|
|
|
|
|
- holder.price.filters = arrayOf(MoneyInputFilter())
|
|
|
+ val item = itemList[holder.bindingAdapterPosition]
|
|
|
|
|
|
if (!item.isVisible) {
|
|
|
- holder.listItem.visibility = View.GONE
|
|
|
+ return
|
|
|
} else {
|
|
|
holder.listItem.visibility = View.VISIBLE
|
|
|
- }
|
|
|
+ holder.paymentItemName.text = item.sidName
|
|
|
+ holder.price.setText(item.price.toString())
|
|
|
+ holder.priceUnit.text = item.currencyStr
|
|
|
+ holder.count.setText(item.count.toString())
|
|
|
+
|
|
|
+ for (checkedItem in OASystem.unitList) {
|
|
|
+ if (checkedItem.id == item.units) {
|
|
|
+ holder.unit.text = checkedItem.name
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- holder.price.onFocusChangeListener = OnFocusChangeListener { _, flag ->
|
|
|
- if (!flag) {
|
|
|
- if (holder.price.text.isNullOrBlank()) {
|
|
|
- holder.price.setText(item.price.toString())
|
|
|
+ holder.listItem.visibility = View.VISIBLE
|
|
|
+
|
|
|
+ holder.date.text = item.datePrice.substring(0, 10)
|
|
|
+ holder.detail.setText(item.priceContent)
|
|
|
+
|
|
|
+ holder.price.filters = arrayOf(MoneyInputFilter())
|
|
|
+
|
|
|
+ holder.price.onFocusChangeListener = View.OnFocusChangeListener { _, flag ->
|
|
|
+ if (!flag) {
|
|
|
+ if (holder.price.text.isNullOrBlank()) {
|
|
|
+ holder.price.setText(item.price.toString())
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- holder.count.onFocusChangeListener = OnFocusChangeListener { _, flag ->
|
|
|
- if (!flag) {
|
|
|
- if (holder.count.text.isNullOrBlank()) {
|
|
|
- holder.count.setText(item.count.toString())
|
|
|
+ holder.count.onFocusChangeListener = View.OnFocusChangeListener { _, flag ->
|
|
|
+ if (!flag) {
|
|
|
+ if (holder.count.text.isNullOrBlank()) {
|
|
|
+ holder.count.setText(item.count.toString())
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|