Commit 43fa0556 by 刘鹏

Merge branch 'feature/yk_release' into 'release'

Feature/yk release

See merge request app_android_lib/YDL-Component!242
parents f26ac951 ccf23c14
...@@ -449,7 +449,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -449,7 +449,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
} }
//筛选数据获取后回调 //获取筛选数据
override fun onHeadFetched(headData: HeadData?) { override fun onHeadFetched(headData: HeadData?) {
//头部数据获取到后初始化筛选数据 //头部数据获取到后初始化筛选数据
this.headData = headData this.headData = headData
......
...@@ -25,8 +25,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener ...@@ -25,8 +25,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener
import com.yidianling.consultant.model.bean.AllFilter import com.yidianling.consultant.model.bean.AllFilter
import com.yidianling.consultant.model.bean.Filters import com.yidianling.consultant.model.bean.Filters
import com.yidianling.consultant.model.bean.PriceRangesItem import com.yidianling.consultant.model.bean.PriceRangesItem
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.consultant_item_filter.view.* import kotlinx.android.synthetic.main.consultant_item_filter.view.*
import kotlinx.android.synthetic.main.consultant_item_price_range.view.* import kotlinx.android.synthetic.main.consultant_item_price_range.view.*
import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.* import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.*
...@@ -109,6 +107,9 @@ class FilterPopupWindow( ...@@ -109,6 +107,9 @@ class FilterPopupWindow(
} }
view.btnConfirm.setOnClickListener { view.btnConfirm.setOnClickListener {
if (tempFilter.priceRanges?.key1 == "avg_price" && filterData.priceRanges.isNotEmpty()) {
tempFilter.priceRanges?.key1 = filterData.priceRanges[0].key1
}
biEvent(ConsultBIConstants.POSITION_CONSULT_FILTER_CHECKOUT_CLICK) biEvent(ConsultBIConstants.POSITION_CONSULT_FILTER_CHECKOUT_CLICK)
onFilterConfirmListener?.onFilterConfirmed() onFilterConfirmListener?.onFilterConfirmed()
dismiss() dismiss()
...@@ -603,7 +604,8 @@ class FilterPopupWindow( ...@@ -603,7 +604,8 @@ class FilterPopupWindow(
} }
private fun initPriceViews(view: View) { private fun initPriceViews(view: View) {
val priceRange = View.inflate(context, R.layout.consultant_item_price_range, null) as LinearLayout val priceRange =
View.inflate(context, R.layout.consultant_item_price_range, null) as LinearLayout
etMinPrice = priceRange.findViewById(R.id.etMinPrice); etMinPrice = priceRange.findViewById(R.id.etMinPrice);
etMaxPrice = priceRange.findViewById(R.id.etMaxPrice); etMaxPrice = priceRange.findViewById(R.id.etMaxPrice);
...@@ -668,7 +670,11 @@ class FilterPopupWindow( ...@@ -668,7 +670,11 @@ class FilterPopupWindow(
0 0
) )
textView.layoutParams = params textView.layoutParams = params
val contentStr = String.format("%s\n%s", priceRangesItem.display_range, priceRangesItem.recommend_percent) val contentStr = String.format(
"%s\n%s",
priceRangesItem.display_range,
priceRangesItem.recommend_percent
)
val msp = SpannableString(contentStr) val msp = SpannableString(contentStr)
msp.setSpan( msp.setSpan(
AbsoluteSizeSpan(10, true), AbsoluteSizeSpan(10, true),
...@@ -702,7 +708,10 @@ class FilterPopupWindow( ...@@ -702,7 +708,10 @@ class FilterPopupWindow(
etMaxPrice?.setText("") etMaxPrice?.setText("")
etMinPrice?.setText("") etMinPrice?.setText("")
} else { } else {
tempFilter.priceRanges = priceRangesItem.copy(min_price = priceRangesItem.min_price, max_price = priceRangesItem.max_price) tempFilter.priceRanges = priceRangesItem.copy(
min_price = priceRangesItem.min_price,
max_price = priceRangesItem.max_price
)
textView.isSelected = true textView.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
tempFilter.priceRangesView = textView tempFilter.priceRangesView = textView
......
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