Commit d8a14b9d by 霍志良

feat:价格筛选回调

parent c18a8b73
...@@ -1307,7 +1307,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1307,7 +1307,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
pricePopup = PricePopupWindow( pricePopup = PricePopupWindow(
this, headData?.reorder!!, this, headData?.reorder!!,
headData?.filters!!, headData?.filters!!,
tempFilter, allFilter.reorder, this tempFilter, this
) )
pricePopup!!.setOnDismissListener { pricePopup!!.setOnDismissListener {
...@@ -1395,7 +1395,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1395,7 +1395,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
if (headData?.region != null) { if (headData?.region != null) {
val regionPopupWindow = AreaPopupWindow( val regionPopupWindow = AreaPopupWindow(
this, headData?.region this, headData?.region
?: ArrayList(), allFilter.region, allFilter.sub ?: ArrayList(), allFilter.region, allFilter.sub,
true
) )
regionPopupWindow.showAsDropDown(viewSep2) regionPopupWindow.showAsDropDown(viewSep2)
viewDim.visibility = View.VISIBLE viewDim.visibility = View.VISIBLE
...@@ -1615,7 +1616,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1615,7 +1616,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
ConsultAssistantDialogUtils.INSTANCE.expertSearchResetStatus() ConsultAssistantDialogUtils.INSTANCE.expertSearchResetStatus()
} }
override fun onPriceItemSelected(sortItem: ReorderItem) { override fun onPriceItemSelected(priceRangesItem: PriceRangesItem) {
//价格筛选回调 //价格筛选回调
allFilter.priceRanges = priceRange
getPresenter().fetchListData(allFilter, getPresenter().mExtras)
} }
} }
...@@ -892,16 +892,16 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -892,16 +892,16 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
appbar_layout.postDelayed({ appbar_layout.postDelayed({
if (MMKV.defaultMMKV().decodeBool(WHETHER_LOCATION_AUTH)) { if (MMKV.defaultMMKV().decodeBool(WHETHER_LOCATION_AUTH)) {
//同意定位授权 //同意定位授权
showAreaPopupWindow() showAreaPopupWindow(true)
} else { } else {
val dialog = CommonDialog(mContext) val dialog = CommonDialog(mContext)
.setTitle("温馨提示") .setTitle("温馨提示")
.setMessage("建议您授权定位权限,就能轻松获取周边优秀咨询师和其他服务") .setMessage("建议您授权定位权限,就能轻松获取周边优秀咨询师和其他服务")
.setLeftOnclick("暂不") { v1 -> .setLeftOnclick("暂不") { v1 ->
showAreaPopupWindow() showAreaPopupWindow(false)
}.setRightClick("授权") { v12 -> }.setRightClick("授权") { v12 ->
MMKV.defaultMMKV().encode(WHETHER_LOCATION_AUTH, true) MMKV.defaultMMKV().encode(WHETHER_LOCATION_AUTH, true)
showAreaPopupWindow() showAreaPopupWindow(true)
} }
dialog.show() dialog.show()
} }
...@@ -913,7 +913,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -913,7 +913,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
hideSoftInput() hideSoftInput()
appbar_layout.setExpanded(false) appbar_layout.setExpanded(false)
appbar_layout.postDelayed({ appbar_layout.postDelayed({
// showSortPopupWindow()
showPricePopupWindow() showPricePopupWindow()
}, 300) }, 300)
...@@ -965,7 +964,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -965,7 +964,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
pricePopup = PricePopupWindow( pricePopup = PricePopupWindow(
requireContext(), headData?.reorder!!, requireContext(), headData?.reorder!!,
headData?.filters!!, headData?.filters!!,
tempFilter, allFilter.reorder, this tempFilter, this
) )
pricePopup!!.setOnDismissListener { pricePopup!!.setOnDismissListener {
...@@ -1281,13 +1280,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1281,13 +1280,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
//显示地区弹窗 //显示地区弹窗
private fun showAreaPopupWindow() { private fun showAreaPopupWindow(isAgreeLocation: Boolean) {
if (headData?.region != null) { if (headData?.region != null) {
val regionPopupWindow = AreaPopupWindow( val regionPopupWindow = AreaPopupWindow(
mActivity, mActivity,
headData?.region ?: ArrayList(), headData?.region ?: ArrayList(),
allFilter.region, allFilter.region,
allFilter.sub allFilter.sub,
isAgreeLocation
) )
regionPopupWindow.showAsDropDown(viewSep2) regionPopupWindow.showAsDropDown(viewSep2)
viewDim.visibility = View.VISIBLE viewDim.visibility = View.VISIBLE
...@@ -1515,7 +1515,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1515,7 +1515,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
ConsultAssistantDialogUtils.INSTANCE.resetStatus() ConsultAssistantDialogUtils.INSTANCE.resetStatus()
} }
override fun onPriceItemSelected(sortItem: ReorderItem) { override fun onPriceItemSelected(priceRange: PriceRangesItem) {
//价格筛选回调 //价格筛选回调
allFilter.priceRanges = priceRange
getPresenter().fetchListData(allFilter, getPresenter().mExtras)
} }
} }
...@@ -16,31 +16,88 @@ import kotlinx.android.synthetic.main.consultant_item_consult_type.view.* ...@@ -16,31 +16,88 @@ import kotlinx.android.synthetic.main.consultant_item_consult_type.view.*
* 城市列表适配器 * 城市列表适配器
* Created by zqk on 17-7-21. * Created by zqk on 17-7-21.
*/ */
class SubRecyclerViewAdapter(val context: Context, val subList: ArrayList<SubItem>, var selectedSub: SubItem) : RecyclerView.Adapter<SubRecyclerViewAdapter.ViewHolder>() { class SubRecyclerViewAdapter(
val context: Context, val subList: ArrayList<SubItem>,
var selectedSub: SubItem, val locationCode: String
) : RecyclerView.Adapter<SubRecyclerViewAdapter.ViewHolder>() {
var onItemClickListener: MyBaseAdapter.OnItemClickListener<SubItem>? = null var onItemClickListener: MyBaseAdapter.OnItemClickListener<SubItem>? = null
private lateinit var mOnAuthClickLister: OnAuthClickLister
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val subItem = subList[position] val subItem = subList[position]
holder.itemView.tvConsultTypeName.text = subItem.value holder.itemView.tvConsultTypeName.text = subItem.value
if (selectedSub.code == subItem.code) { if (subItem.locationCode == locationCode) {
holder.itemView.reLocation.visibility = View.GONE
holder.itemView.location_img.visibility = View.VISIBLE
holder.itemView.location_img.drawable.setTint(context.resources.getColor(R.color.platform_main_theme))
//选中状态 //选中状态
holder.itemView.tvConsultTypeName.setTypeface(Typeface.DEFAULT_BOLD) holder.itemView.tvConsultTypeName.setTypeface(Typeface.DEFAULT_BOLD)
holder.itemView.tvConsultTypeName.setTextColor(ContextCompat.getColor(context,R.color.platform_main_theme)) holder.itemView.tvConsultTypeName.setTextColor(
} else { ContextCompat.getColor(
context,
R.color.platform_main_theme
)
)
holder.itemView.isEnabled = true
} else if (subItem.locationCode == "NotAuth") {
//未选中状态 //未选中状态
holder.itemView.reLocation.visibility = View.VISIBLE
holder.itemView.reLocation.setOnClickListener {
mOnAuthClickLister.onAuthClick()
}
holder.itemView.location_img.visibility = View.VISIBLE
holder.itemView.tvConsultTypeName.setTypeface(Typeface.DEFAULT) holder.itemView.tvConsultTypeName.setTypeface(Typeface.DEFAULT)
holder.itemView.tvConsultTypeName.setTextColor(ContextCompat.getColor(context,R.color.platform_default_text_color)) holder.itemView.tvConsultTypeName.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_default_text_color
)
)
holder.itemView.location_img.drawable.setTint(context.resources.getColor(R.color.platform_color_black_333333))
holder.itemView.isEnabled = false
} else {
holder.itemView.reLocation.visibility = View.GONE
holder.itemView.isEnabled = true
holder.itemView.location_img.visibility = View.GONE
if (selectedSub.code == subItem.code) {
//选中状态
holder.itemView.tvConsultTypeName.setTypeface(Typeface.DEFAULT_BOLD)
holder.itemView.tvConsultTypeName.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_main_theme
)
)
} else {
//未选中状态
holder.itemView.tvConsultTypeName.setTypeface(Typeface.DEFAULT)
holder.itemView.tvConsultTypeName.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_default_text_color
)
)
}
} }
} }
override fun getItemCount(): Int = subList.size override fun getItemCount(): Int = subList.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(context).inflate(R.layout.consultant_item_consult_type, parent, false) val view = LayoutInflater.from(context)
.inflate(R.layout.consultant_item_consult_type, parent, false)
return ViewHolder(view) return ViewHolder(view)
} }
interface OnAuthClickLister {
fun onAuthClick()
}
fun setOnAuthClickLister(lister: OnAuthClickLister) {
mOnAuthClickLister = lister
}
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
init { init {
itemView.setOnClickListener { itemView.setOnClickListener {
......
package com.yidianling.consultant.listener package com.yidianling.consultant.listener
import com.yidianling.consultant.model.bean.ReorderItem import com.yidianling.consultant.model.bean.PriceRangesItem
/** /**
* Created by zqk on 17-9-20. * Created by zqk on 17-9-20.
*/ */
interface OnPriceItemSelectedListener { interface OnPriceItemSelectedListener {
fun onPriceItemSelected(sortItem: ReorderItem) fun onPriceItemSelected(priceRangesItem: PriceRangesItem)
} }
\ No newline at end of file
...@@ -7,12 +7,13 @@ import kotlinx.android.parcel.Parcelize ...@@ -7,12 +7,13 @@ import kotlinx.android.parcel.Parcelize
@Parcelize @Parcelize
data class SubItem( data class SubItem(
@field:SerializedName("value") @field:SerializedName("value")
var value: String? = null, var value: String? = null,
@field:SerializedName("key") @field:SerializedName("key")
var key: String? = null, var key: String? = null,
@field:SerializedName("code") @field:SerializedName("code")
var code: String? = null var code: String? = null,
var locationCode: String? = ""
) : Parcelable ) : Parcelable
\ No newline at end of file
...@@ -7,16 +7,16 @@ import androidx.recyclerview.widget.LinearLayoutManager ...@@ -7,16 +7,16 @@ import androidx.recyclerview.widget.LinearLayoutManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.PopupWindow import android.widget.PopupWindow
import androidx.collection.arraySetOf
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
import com.ydl.ydlcommon.adapter.MyBaseAdapter import com.ydl.ydlcommon.adapter.MyBaseAdapter
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.adapter.RegionRecyclerViewAdapter import com.yidianling.consultant.adapter.RegionRecyclerViewAdapter
import com.yidianling.consultant.adapter.SubRecyclerViewAdapter import com.yidianling.consultant.adapter.SubRecyclerViewAdapter
import com.yidianling.consultant.bean.ConsultantRecentCity import com.yidianling.consultant.bean.ConsultantRecentCity
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.RECENT_CITY import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.RECENT_CITY
import com.yidianling.consultant.model.SearchApi import com.yidianling.consultant.model.SearchApi
import com.yidianling.consultant.model.bean.RegionItem import com.yidianling.consultant.model.bean.RegionItem
...@@ -32,7 +32,8 @@ class AreaPopupWindow( ...@@ -32,7 +32,8 @@ class AreaPopupWindow(
val context: Context, val context: Context,
regionList: ArrayList<RegionItem>, regionList: ArrayList<RegionItem>,
private var selectedRegion: RegionItem, private var selectedRegion: RegionItem,
private var selectedSub: SubItem private var selectedSub: SubItem,
private val isAgree: Boolean
) : PopupWindow(null, ViewGroup.LayoutParams.MATCH_PARENT, RxImageTool.dp2px(369f)) { ) : PopupWindow(null, ViewGroup.LayoutParams.MATCH_PARENT, RxImageTool.dp2px(369f)) {
private val subList = ArrayList<SubItem>() private val subList = ArrayList<SubItem>()
...@@ -43,6 +44,8 @@ class AreaPopupWindow( ...@@ -43,6 +44,8 @@ class AreaPopupWindow(
var onRegionSelectedListener: OnRegionSelectedListener? = null var onRegionSelectedListener: OnRegionSelectedListener? = null
private var subLocationItem: SubItem? = SubItem() private var subLocationItem: SubItem? = SubItem()
private var locationHistoryList: ArrayList<RegionItem>? = arrayListOf() private var locationHistoryList: ArrayList<RegionItem>? = arrayListOf()
private val locationCode = "-1"
private val recentCityCode = "0"
init { init {
val view = val view =
...@@ -55,7 +58,8 @@ class AreaPopupWindow( ...@@ -55,7 +58,8 @@ class AreaPopupWindow(
this.height = this.height =
((RxDeviceTool.getScreenHeight(context) - RxImageTool.dp2px(90f)) * 0.618).toInt() //设置高度为屏幕的80% ((RxDeviceTool.getScreenHeight(context) - RxImageTool.dp2px(90f)) * 0.618).toInt() //设置高度为屏幕的80%
//根据IP获取当前城市 //根据IP获取当前城市
getRegionByIp() getRegionByIp(isAgree, false)
recentCityBean = recentCityBean =
MMKV.defaultMMKV().decodeParcelable(RECENT_CITY, ConsultantRecentCity::class.java) MMKV.defaultMMKV().decodeParcelable(RECENT_CITY, ConsultantRecentCity::class.java)
if (recentCityBean == null) recentCityBean = ConsultantRecentCity(arrayListOf()) if (recentCityBean == null) recentCityBean = ConsultantRecentCity(arrayListOf())
...@@ -66,12 +70,12 @@ class AreaPopupWindow( ...@@ -66,12 +70,12 @@ class AreaPopupWindow(
RegionItem( RegionItem(
recentCityBean!!.recentCity, recentCityBean!!.recentCity,
value = "历史", value = "历史",
key = "0", key = recentCityCode,
code = "0" code = recentCityCode
) )
) )
subLocationItem?.let { locationList?.add(it) } subLocationItem?.let { locationList?.add(it) }
locationList?.let { RegionItem(it, value = "定位", key = "-1", code = "-1") } locationList?.let { RegionItem(it, value = "定位", key = locationCode, code = locationCode) }
?.let { locationHistoryList?.add(0, it) } ?.let { locationHistoryList?.add(0, it) }
locationHistoryList?.addAll(regionList) locationHistoryList?.addAll(regionList)
...@@ -82,8 +86,25 @@ class AreaPopupWindow( ...@@ -82,8 +86,25 @@ class AreaPopupWindow(
subList.addAll(regionList[0].sub) subList.addAll(regionList[0].sub)
} }
subAdapter = SubRecyclerViewAdapter(context, subList, selectedSub) subAdapter = SubRecyclerViewAdapter(context, subList, selectedSub, locationCode)
subAdapter.setOnAuthClickLister(object : SubRecyclerViewAdapter.OnAuthClickLister {
override fun onAuthClick() {
val dialog = CommonDialog(context)
.setTitle("温馨提示")
.setMessage("建议您授权定位权限,就能轻松获取周边优秀咨询师和其他服务")
.setLeftOnclick("暂不") { v1 ->
dismiss()
}.setRightClick("授权") { v12 ->
MMKV.defaultMMKV().encode(
ConsultBIConstants.ConsultantLocationAuth.WHETHER_LOCATION_AUTH,
true
)
getRegionByIp(true, true)
}
dialog.show()
}
})
view.rvRegion.layoutManager = view.rvRegion.layoutManager =
LinearLayoutManager( LinearLayoutManager(
context, context,
...@@ -111,7 +132,6 @@ class AreaPopupWindow( ...@@ -111,7 +132,6 @@ class AreaPopupWindow(
false false
) )
subAdapter.onItemClickListener = MyBaseAdapter.OnItemClickListener { _, _, data -> subAdapter.onItemClickListener = MyBaseAdapter.OnItemClickListener { _, _, data ->
//倒序保留最近五次的搜索历史记录并去重
saveCitySearchRecord(data) saveCitySearchRecord(data)
selectedSub = data selectedSub = data
onRegionSelectedListener?.onRegionSelected(selectedRegion, selectedSub) onRegionSelectedListener?.onRegionSelected(selectedRegion, selectedSub)
...@@ -120,6 +140,7 @@ class AreaPopupWindow( ...@@ -120,6 +140,7 @@ class AreaPopupWindow(
view.rvSub.scrollToPosition(subList.indexOf(selectedSub) + 1) view.rvSub.scrollToPosition(subList.indexOf(selectedSub) + 1)
} }
//倒序保留最近五次的搜索历史记录并去重
private fun saveCitySearchRecord(data: SubItem) { private fun saveCitySearchRecord(data: SubItem) {
recentCityBean?.let { recentCityBean?.let {
if (it.recentCity.size < 5) { if (it.recentCity.size < 5) {
...@@ -136,17 +157,29 @@ class AreaPopupWindow( ...@@ -136,17 +157,29 @@ class AreaPopupWindow(
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
fun getRegionByIp() { fun getRegionByIp(agreeLocation: Boolean, refreshAdapter: Boolean) {
SearchApi.getSearchApi().getCityByIp() if (agreeLocation) {
.subscribeOn(Schedulers.io()) SearchApi.getSearchApi().getCityByIp()
.observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io())
.subscribe({ .observeOn(AndroidSchedulers.mainThread())
if (it.code == "200") { .subscribe({
subLocationItem?.code = it.data.city_code if (it.code == "200") {
subLocationItem?.key = it.data.city_code subLocationItem?.code = it.data.city_code
subLocationItem?.value = it.data.city_name subLocationItem?.key = it.data.city_code
} subLocationItem?.value = it.data.city_name
}, {}) subLocationItem?.locationCode = locationCode
if (refreshAdapter) {
subAdapter.notifyDataSetChanged()
}
}
}, {})
} else {
subLocationItem?.code = null
subLocationItem?.key = null
subLocationItem?.value = "开启授权,获得定位城市"
subLocationItem?.locationCode = "NotAuth"
}
} }
interface OnRegionSelectedListener { interface OnRegionSelectedListener {
......
package com.yidianling.consultant.ui.view package com.yidianling.consultant.ui.view
import android.content.Context import android.content.Context
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.text.SpannableString import android.text.SpannableString
import android.text.Spanned import android.text.Spanned
import android.text.style.AbsoluteSizeSpan import android.text.style.AbsoluteSizeSpan
...@@ -14,13 +11,13 @@ import android.view.ViewGroup ...@@ -14,13 +11,13 @@ import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import android.widget.PopupWindow import android.widget.PopupWindow
import android.widget.TextView import android.widget.TextView
import com.ydl.ydlcommon.utils.ResUtil.getResources
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.listener.OnPriceItemSelectedListener import com.yidianling.consultant.listener.OnPriceItemSelectedListener
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.ReorderItem import com.yidianling.consultant.model.bean.ReorderItem
import com.yidianling.consultant.ui.view.rangeseekbar.OnRangeChangedListener import com.yidianling.consultant.ui.view.rangeseekbar.OnRangeChangedListener
import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar
...@@ -35,7 +32,7 @@ class PricePopupWindow( ...@@ -35,7 +32,7 @@ class PricePopupWindow(
val context: Context, sortItems: ArrayList<ReorderItem>, val context: Context, sortItems: ArrayList<ReorderItem>,
private val filterData: Filters, private val filterData: Filters,
private val tempFilter: AllFilter, private val tempFilter: AllFilter,
var selectedSort: ReorderItem, onPriceItemSelectedListener: OnPriceItemSelectedListener var onPriceItemSelectedListener: OnPriceItemSelectedListener
) : PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) { ) : PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) {
private val popWidth = (RxDeviceTool.getScreenWidth(context)) private val popWidth = (RxDeviceTool.getScreenWidth(context))
...@@ -58,6 +55,13 @@ class PricePopupWindow( ...@@ -58,6 +55,13 @@ class PricePopupWindow(
this.setBackgroundDrawable(BitmapDrawable()) this.setBackgroundDrawable(BitmapDrawable())
this.isOutsideTouchable = true this.isOutsideTouchable = true
initPriceTag() initPriceTag()
contentView.price_Confirm.setOnClickListener {
// tempFilter.priceRanges?.min_price=min_Price
// tempFilter.priceRanges?.max_price=max_Price
var priceRangesItem = PriceRangesItem(min_Price, max_Price)
onPriceItemSelectedListener.onPriceItemSelected(priceRangesItem)
dismiss()
}
contentView.range_price_seekbar.setOnRangeChangedListener(object : OnRangeChangedListener { contentView.range_price_seekbar.setOnRangeChangedListener(object : OnRangeChangedListener {
override fun onRangeChanged( override fun onRangeChanged(
view: RangeSeekBar?, view: RangeSeekBar?,
......
...@@ -350,7 +350,6 @@ public class RangeSeekBar extends View { ...@@ -350,7 +350,6 @@ public class RangeSeekBar extends View {
//平分显示 //平分显示
float x; float x;
if (tickMarkMode == TRICK_MARK_MODE_OTHER) { if (tickMarkMode == TRICK_MARK_MODE_OTHER) {
Log.e("aaaa", "tickMarkGravity" + tickMarkGravity);
if (tickMarkGravity == TICK_MARK_GRAVITY_RIGHT) { if (tickMarkGravity == TICK_MARK_GRAVITY_RIGHT) {
x = getProgressLeft() + i * trickPartWidth - tickMarkTextRect.width(); x = getProgressLeft() + i * trickPartWidth - tickMarkTextRect.width();
} else if (tickMarkGravity == TICK_MARK_GRAVITY_CENTER) { } else if (tickMarkGravity == TICK_MARK_GRAVITY_CENTER) {
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#1DA1F2"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -9,6 +9,13 @@ ...@@ -9,6 +9,13 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
<ImageView
android:id="@+id/location_img"
android:layout_width="@dimen/platform_dp_15"
android:layout_height="@dimen/platform_dp_15"
android:src="@drawable/consultant_baseline_location_on_24"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/tvConsultTypeName" android:id="@+id/tvConsultTypeName"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -18,12 +25,21 @@ ...@@ -18,12 +25,21 @@
android:textSize="14sp" android:textSize="14sp"
tools:text="咨询方式" /> tools:text="咨询方式" />
<TextView
android:id="@+id/reLocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="授权"
android:textColor="@color/platform_main_theme"
android:textSize="@dimen/platform_sp_14"
android:visibility="gone"></TextView>
<ImageView <ImageView
android:id="@+id/ivCheckCircle" android:id="@+id/ivCheckCircle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@null" android:contentDescription="@null"
android:src="@drawable/consultant_ic_check" android:src="@drawable/consultant_ic_check"
android:visibility="invisible"/> android:visibility="invisible" />
</LinearLayout> </LinearLayout>
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