|
|
@@ -112,7 +112,7 @@ fun AppCompatActivity.OneListedDialog(
|
|
|
|
|
|
}
|
|
|
|
|
|
- return createCustomDialog(cancelable = false) { dialog ->
|
|
|
+ return createCustomDialog(cancelable = true) { dialog ->
|
|
|
backgroundColor = Color.parseColor("#5f000000")
|
|
|
initMenuData()
|
|
|
if (type == "2") {
|
|
|
@@ -295,7 +295,7 @@ class OneSellListedUI(
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ setTextColor(R.color.buy_hall_color)
|
|
|
}.lparams(0, autoSize(72), 1f) {
|
|
|
marginEnd = autoSize(110)
|
|
|
}
|
|
|
@@ -367,7 +367,7 @@ class OneSellListedUI(
|
|
|
viewModel.summaryWrPositionDataByDialog.bindOptional(context){
|
|
|
max = it?.enalbeqty?.toDouble() ?: 1.0
|
|
|
}
|
|
|
- text = "1"
|
|
|
+ text = data.minivalue
|
|
|
oneNumberInputEdittext = this
|
|
|
setOnTextChangeListener { view, value ->
|
|
|
if (value.isNullOrEmpty().not()) {
|
|
|
@@ -396,7 +396,7 @@ class OneSellListedUI(
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ setTextColor(R.color.buy_hall_color)
|
|
|
}.lparams(0, autoSize(72), 1f) {
|
|
|
marginEnd = autoSize(36)
|
|
|
}
|
|
|
@@ -411,7 +411,7 @@ class OneSellListedUI(
|
|
|
}.lparams(matchParent, autoSize(143))
|
|
|
|
|
|
inflateLayout<SeekBar>(R.layout.main_seekbar) {
|
|
|
- min = 10
|
|
|
+ min = 1
|
|
|
max = 100
|
|
|
isIndeterminate = false
|
|
|
splitTrack = false
|
|
|
@@ -452,7 +452,14 @@ class OneSellListedUI(
|
|
|
|
|
|
textView {
|
|
|
viewModel.summaryWrPositionDataByDialog.bindOptional(context){
|
|
|
- text = it?.enalbeqty + it?.enumdicname
|
|
|
+ if (type == "2"){
|
|
|
+ text = it?.creditenableqty + it?.enumdicname
|
|
|
+ }
|
|
|
+ }
|
|
|
+ selectSpotDetailsData.bindOptional(context){
|
|
|
+ if (type == "1"){
|
|
|
+ text = it?.enableqty + data.enumdicname
|
|
|
+ }
|
|
|
}
|
|
|
textSizeAuto = 29
|
|
|
textColorInt = R.color.rma_gray_color
|
|
|
@@ -730,6 +737,7 @@ class OneBuyListedUI(
|
|
|
verticalLayout {
|
|
|
setMarginValue()
|
|
|
selectAccountData.postValue(GlobalDataCollection.instance?.accountData)
|
|
|
+ maxlistedNumber.postValue(1)
|
|
|
backgroundDrawable = createRoundRectDrawable("#ffffff", 24)
|
|
|
linearLayout {
|
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
|
@@ -809,14 +817,14 @@ class OneBuyListedUI(
|
|
|
if (value.toDouble() != 0.0 && marginamount != 0.0) {
|
|
|
maxlistedNumber.postValue(
|
|
|
viewModel.usedAccountData.value?.canUserAmount?.div(
|
|
|
- marginamount
|
|
|
+ value.toString().toDouble()
|
|
|
)?.div(value.toDouble())?.toInt()
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ setTextColor(R.color.buy_hall_color)
|
|
|
}.lparams(0, autoSize(72), 1f) {
|
|
|
marginEnd = autoSize(110)
|
|
|
}
|
|
|
@@ -840,10 +848,11 @@ class OneBuyListedUI(
|
|
|
linearLayout {
|
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
|
numberEditText {
|
|
|
- text = "1"
|
|
|
+ text = data.minivalue
|
|
|
oneNumberInputEdittext = this
|
|
|
setOnTextChangeListener { view, value ->
|
|
|
if (value.isNullOrEmpty().not()) {
|
|
|
+
|
|
|
if (onePriceInputEdittext.text.toString().isNullOrEmpty()
|
|
|
.not()
|
|
|
) {
|
|
|
@@ -869,6 +878,7 @@ class OneBuyListedUI(
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ setTextColor(R.color.buy_hall_color)
|
|
|
}.lparams(0, autoSize(72), 1f) {
|
|
|
marginEnd = autoSize(36)
|
|
|
}
|
|
|
@@ -883,7 +893,7 @@ class OneBuyListedUI(
|
|
|
}.lparams(matchParent, autoSize(143))
|
|
|
|
|
|
inflateLayout<SeekBar>(R.layout.main_seekbar) {
|
|
|
- min = 10
|
|
|
+ min = 1
|
|
|
max = 100
|
|
|
seekBar = this
|
|
|
isIndeterminate = false
|
|
|
@@ -923,10 +933,8 @@ class OneBuyListedUI(
|
|
|
textView {
|
|
|
maxlistedNumber.bindOptional(context) {
|
|
|
//最大可交易数量变更后,输入的值要根据seekbar进度来进行更新
|
|
|
- oneNumberInputEdittext.text = NumberUtils.roundNum(
|
|
|
- it?.times(seekBar.progress.div(100.0)).toString(), 0
|
|
|
- )
|
|
|
- text = it.toString() + "吨"
|
|
|
+
|
|
|
+ text = it.toString() + data.enumdicname
|
|
|
}
|
|
|
textSizeAuto = 29
|
|
|
textColorInt = R.color.rma_gray_color
|
|
|
@@ -970,7 +978,7 @@ class OneBuyListedUI(
|
|
|
}
|
|
|
|
|
|
textView {
|
|
|
- text = "吨"
|
|
|
+ text = data.enumdicname
|
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_gray_color
|
|
|
}.lparams(wrapContent, wrapContent) {
|