Commit ae1127f3 by 霍志良

feat:价格筛选

parent 504ec287
...@@ -44,6 +44,8 @@ class PricePopupWindow( ...@@ -44,6 +44,8 @@ class PricePopupWindow(
private val priceRangeViews: ArrayList<View> = ArrayList() private val priceRangeViews: ArrayList<View> = ArrayList()
private var min_Price = "" private var min_Price = ""
private var max_Price = "" private var max_Price = ""
private var SeekBarLeftValue = 0f
private var SeekBarRightValue = 0f
init { init {
val view = val view =
...@@ -113,9 +115,24 @@ class PricePopupWindow( ...@@ -113,9 +115,24 @@ class PricePopupWindow(
textView.isSelected = true textView.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
tempFilter.priceRangesView = textView tempFilter.priceRangesView = textView
if (priceRangesItem.min_price.isNullOrEmpty()) min_Price = "0" if (priceRangesItem.min_price.isNullOrEmpty()) {
if (priceRangesItem.max_price.isNullOrEmpty()) max_Price = "无限" min_Price = "0"
SeekBarLeftValue = 0f
} else {
min_Price = priceRangesItem.min_price.toString()
SeekBarLeftValue =
(priceRangesItem.min_price.toString().toFloat() / 600) * 100f
}
if (priceRangesItem.max_price.isNullOrEmpty()) {
max_Price = "无限"
SeekBarRightValue = 100f
} else {
max_Price = priceRangesItem.max_price.toString()
SeekBarRightValue =
(priceRangesItem.max_price.toString().toFloat() / 600) * 100f
}
contentView.tv_start_end_price.text = "$min_Price-$max_Price" contentView.tv_start_end_price.text = "$min_Price-$max_Price"
contentView.range_price_seekbar.setProgress(SeekBarLeftValue, SeekBarRightValue)
// etMinPrice?.setText(priceRangesItem.min_price) // etMinPrice?.setText(priceRangesItem.min_price)
// etMaxPrice?.setText(priceRangesItem.max_price) // etMaxPrice?.setText(priceRangesItem.max_price)
// etMinPrice?.setSelection(etMinPrice?.text!!.length) // etMinPrice?.setSelection(etMinPrice?.text!!.length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment