Commit cc3b6d32 by upwork.021

feat: 主题弹窗优化,ui验收优化,bug修复

parent 2e5b358b
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.72", "m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.45", "m-consultant" : "0.0.60.56",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.80", "m-home" : "0.0.23.80",
...@@ -92,7 +92,7 @@ ext { ...@@ -92,7 +92,7 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.72", "m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.44", "m-consultant" : "0.0.60.56",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.41", "m-home" : "0.0.23.41",
......
...@@ -91,7 +91,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -91,7 +91,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
override fun initDataAndEvent() { override fun initDataAndEvent() {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE or WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE or WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)
initViews() initViews()
initData(intent,false) initData(intent, false)
rl_hot_fix_for_huawei.visibility = View.VISIBLE rl_hot_fix_for_huawei.visibility = View.VISIBLE
} }
...@@ -109,6 +109,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -109,6 +109,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private const val EXTRA_IS_SHOW_HOT = "isInitShowHot" private const val EXTRA_IS_SHOW_HOT = "isInitShowHot"
private const val EXTRA_SEARCH_WORD = "searchWord" private const val EXTRA_SEARCH_WORD = "searchWord"
private const val EXTRA_RELATED_WORD = "related_word" private const val EXTRA_RELATED_WORD = "related_word"
private const val EXTRA_IS_RECCOMMEND_WORD = "is_reccommend_word"
private const val EXTRA_IS_FROM_SPLASH = "isFromSplash" private const val EXTRA_IS_FROM_SPLASH = "isFromSplash"
private const val FILTER_STATUS_NORMAL = 0 //默认筛选状态 private const val FILTER_STATUS_NORMAL = 0 //默认筛选状态
private const val FILTER_STATUS_FILTERED = 1 //非默认筛选状态 private const val FILTER_STATUS_FILTERED = 1 //非默认筛选状态
...@@ -149,12 +150,20 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -149,12 +150,20 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
* 搜索页面过来的 * 搜索页面过来的
* @param sign2为14 仅用于埋点 * @param sign2为14 仅用于埋点
* @param relatedWord 搜索内容的关联词 * @param relatedWord 搜索内容的关联词
* @param isRecommendWords 是否是推荐词
*/ */
fun startSearch(context: Context, searchWord: String?,sign2:String,relatedWord:String) { fun startSearch(
context: Context,
searchWord: String?,
sign2: String,
relatedWord: String,
isRecommendWords: Boolean
) {
val intent = Intent(context, ExpertSearchActivity::class.java) val intent = Intent(context, ExpertSearchActivity::class.java)
intent.putExtra(EXTRA_SEARCH_WORD, searchWord) intent.putExtra(EXTRA_SEARCH_WORD, searchWord)
intent.putExtra(EXTRA_RELATED_WORD, relatedWord) intent.putExtra(EXTRA_RELATED_WORD, relatedWord)
intent.putExtra("sign2",sign2) intent.putExtra(EXTRA_IS_RECCOMMEND_WORD, isRecommendWords)
intent.putExtra("sign2", sign2)
context.startActivity(intent) context.startActivity(intent)
} }
...@@ -236,7 +245,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -236,7 +245,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
val layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false) val layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
rvExperts.layoutManager = layoutManager rvExperts.layoutManager = layoutManager
rvExperts.adapter = doctorAdapter rvExperts.adapter = doctorAdapter
doctorAdapter.setOnClickLister(object: ExpertSearchAdapter.OnClickLister{ doctorAdapter.setOnClickLister(object : ExpertSearchAdapter.OnClickLister {
override fun onClick(searchWords: String) { override fun onClick(searchWords: String) {
allFilter.searchWord = searchWords allFilter.searchWord = searchWords
...@@ -372,49 +381,64 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -372,49 +381,64 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
} }
} }
private fun initData(mIntent: Intent,isRefresh:Boolean) { private fun initData(mIntent: Intent, isRefresh: Boolean) {
fromPageType = mIntent.getIntExtra(EXTRA_FROM_PAGE, -1) fromPageType = mIntent.getIntExtra(EXTRA_FROM_PAGE, -1)
initCategory = mIntent.getStringExtra(EXTRA_CATEGORY) ?: "" initCategory = mIntent.getStringExtra(EXTRA_CATEGORY) ?: ""
initShowType = mIntent.getIntExtra(EXTRA_SHOW_TYPE, 0) initShowType = mIntent.getIntExtra(EXTRA_SHOW_TYPE, 0)
val relatedWord = mIntent.getStringExtra(EXTRA_RELATED_WORD) // 搜索内容的联想词 val relatedWord = mIntent.getStringExtra(EXTRA_RELATED_WORD) // 搜索内容的联想词
val searchWord = mIntent.getStringExtra(EXTRA_SEARCH_WORD) val searchWord = mIntent.getStringExtra(EXTRA_SEARCH_WORD)
if (!TextUtils.isEmpty(relatedWord)){ // 判断搜索内容的联想词为空,则用搜索词进行搜索 val isRecommendWords = mIntent.getBooleanExtra(EXTRA_IS_RECCOMMEND_WORD, false)
if (!TextUtils.isEmpty(relatedWord)) { // 判断搜索内容的联想词为空,则用搜索词进行搜索
allFilter.searchWord = relatedWord allFilter.searchWord = relatedWord
}else{ } else {
allFilter.searchWord = searchWord allFilter.searchWord = searchWord
} }
mSign2 = mIntent.getStringExtra("sign2")?:"" mSign2 = mIntent.getStringExtra("sign2") ?: ""
getRouterParam() getRouterParam()
allFilter.showType.key = initShowType allFilter.showType.key = initShowType
if (!TextUtils.isEmpty(initCategory)){ if (!TextUtils.isEmpty(initCategory)) {
allFilter.categoryId2List.add(initCategory) allFilter.categoryId2List.add(initCategory)
} }
if (!TextUtils.isEmpty(cateName)){ if (!TextUtils.isEmpty(cateName)) {
tvSubject.text = cateName tvSubject.text = cateName
updateFilterTextViewStatus(tvSubject,FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
} }
getPresenter().fetchListHead() getPresenter().fetchListHead()
if (isRefresh){ if (isRefresh) {
refresh(false) refresh(false)
} }
tv_search_content.text = searchWord tv_search_content.text = searchWord
// 判断搜索词和联想词不一样,则显示匹配结果 // 判断搜索词和联想词不一样,则显示匹配结果
if (!TextUtils.isEmpty(searchWord)&&!TextUtils.isEmpty(relatedWord)&&searchWord!=relatedWord){ LogUtil.e("searchWord:${searchWord}")
doctorList.add(ExpertServiceItem(true,searchWord,relatedWord)) LogUtil.e("relatedWord:${relatedWord}")
if (!TextUtils.isEmpty(searchWord) && !TextUtils.isEmpty(relatedWord) && searchWord != relatedWord) {
if (doctorList.size > 0 && doctorList[0].is_head_view) {
doctorList[0] = ExpertServiceItem(true, searchWord, relatedWord)
} else if (doctorList.size > 0) {
doctorList.add(0, ExpertServiceItem(true, searchWord, relatedWord))
} else {
doctorList.add(ExpertServiceItem(true, searchWord, relatedWord))
}
} else {
if (doctorList.size > 0 && doctorList[0].is_head_view) {
doctorList.removeAt(0)
}
} }
v_loading.visibility = View.VISIBLE v_loading.visibility = View.VISIBLE
v_loading.setViewType(LogoLoadingView.TYPE_LOADING, null) v_loading.setViewType(LogoLoadingView.TYPE_LOADING, null)
doctorAdapter.clickCount = 0
doctorAdapter.setIsRecommendWords(isRecommendWords)
doctorAdapter.setEntrance(1) doctorAdapter.setEntrance(1)
} }
override fun onNewIntent(intent: Intent?) { override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent) super.onNewIntent(intent)
initData(intent!!,true) initData(intent!!, true)
} }
...@@ -438,44 +462,52 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -438,44 +462,52 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//设置热门搜索 //设置热门搜索
initHotViews(lin_filter2, it.highlighter) initHotViews(lin_filter2, it.highlighter)
} }
it.cates[0].children?.forEachIndexed { index, children-> it.cates[0].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.childList.add(childrenBean) allFilter.childList.add(childrenBean)
} }
it.cates[1].children?.forEachIndexed { index, children-> it.cates[1].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.stressList.add(childrenBean) allFilter.stressList.add(childrenBean)
} }
it.cates[2].children?.forEachIndexed { index, children-> it.cates[2].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.loveEmotionList.add(childrenBean) allFilter.loveEmotionList.add(childrenBean)
} }
it.cates[3].children?.forEachIndexed { index, children-> it.cates[3].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.marriedFamilyList.add(childrenBean) allFilter.marriedFamilyList.add(childrenBean)
} }
it.cates[4].children?.forEachIndexed { index, children-> it.cates[4].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.personalGrowthList.add(childrenBean) allFilter.personalGrowthList.add(childrenBean)
} }
it.cates[5].children?.forEachIndexed { index, children-> it.cates[5].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.interpersonalRelationshipList.add(childrenBean) allFilter.interpersonalRelationshipList.add(childrenBean)
} }
it.cates[6].children?.forEachIndexed { index, children-> it.cates[6].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.careerDevelopmentList.add(childrenBean) allFilter.careerDevelopmentList.add(childrenBean)
} }
it.cates[7].children?.forEachIndexed { index, children-> it.cates[7].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.mentalHealthList.add(childrenBean) allFilter.mentalHealthList.add(childrenBean)
} }
} }
...@@ -508,8 +540,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -508,8 +540,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
textView.isSelected = true textView.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
// 埋点 // 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE, ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.ConsultEvent.POSITION_CHOICE_FILTER_CLICK,hot.value!!,"app","") ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_CHOICE_FILTER_CLICK,
hot.value!!,
"app",
""
)
} }
filterLabelSet() filterLabelSet()
//开始筛选数据 //开始筛选数据
...@@ -797,33 +834,37 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -797,33 +834,37 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
/** /**
* 获取专家列表数据 * 获取专家列表数据
*/ */
override fun onDoctorListFetched(data: MutableList<ExpertServiceItem>, extras:Extras?,curPage:Int) { override fun onDoctorListFetched(
data: MutableList<ExpertServiceItem>,
extras: Extras?,
curPage: Int
) {
if (rvExperts.adapter != doctorAdapter) { if (rvExperts.adapter != doctorAdapter) {
rvExperts.adapter = doctorAdapter rvExperts.adapter = doctorAdapter
} }
// 如果是第一页 // 如果是第一页
if (curPage==1){ if (curPage == 1) {
if (data.size>=10){ if (data.size >= 10) {
hasMore = true hasMore = true
doctorAdapter.hasMore = true doctorAdapter.hasMore = true
}else{ } else {
hasMore = false hasMore = false
doctorAdapter.hasMore = false doctorAdapter.hasMore = false
} }
if (doctorList.size>0){ if (doctorList.size > 0 && doctorList[0].is_head_view) {
val expertServiceItem = doctorList[0] val expertServiceItem = doctorList[0]
doctorList.clear() doctorList.clear()
doctorList.add(expertServiceItem) doctorList.add(expertServiceItem)
}else{ } else {
doctorList.clear() doctorList.clear()
} }
} }
if (data.size==0) { // data的长度为0的时候为最后一页 if (data.size == 0) { // data的长度为0的时候为最后一页
hasMore = false hasMore = false
doctorAdapter.hasMore = false doctorAdapter.hasMore = false
}else{ } else {
doctorList.addAll(data) doctorList.addAll(data)
} }
doctorAdapter.notifyDataSetChanged() doctorAdapter.notifyDataSetChanged()
...@@ -838,8 +879,14 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -838,8 +879,14 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
srlContainer.isRefreshing = false srlContainer.isRefreshing = false
// 埋点 // 埋点
val sign1 = data.joinToString(","){it.id} val sign1 = data.joinToString(",") { it.id }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,sign1,mSign2,"app") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,
sign1,
mSign2,
"app"
)
} }
override fun fetchListFailed(msg: String?) { override fun fetchListFailed(msg: String?) {
...@@ -865,23 +912,26 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -865,23 +912,26 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
isDoSearch = false isDoSearch = false
isRecommend = false isRecommend = false
if (doctorList.size==0||doctorList.size>0&&TextUtils.isEmpty(doctorList[0].related_word)){ if (doctorList.size > 0 && doctorList[0].is_head_view) {
tv_reload.visibility = View.GONE val expertServiceItem = doctorList[0]
tv_reload_hint.text = msg doctorList.clear()
ll_network_error.visibility = View.VISIBLE doctorList.add(expertServiceItem)
iv_exception.setImageResource(R.drawable.platform_ico_img_zixun_empty) doctorAdapter.notifyDataSetChanged()
rvExperts.visibility = View.GONE v_loading.visibility = View.GONE
dismissProgressDialog() ll_network_error.visibility = View.GONE
srlContainer.isRefreshing = false
}else{
doctorAdapter.notifyDataSetChanged()
v_loading.visibility = View.GONE
ll_network_error.visibility = View.GONE
rvExperts.visibility = View.VISIBLE rvExperts.visibility = View.VISIBLE
} } else {
tv_reload.visibility = View.GONE
tv_reload_hint.text = msg
ll_network_error.visibility = View.VISIBLE
iv_exception.setImageResource(R.drawable.platform_ico_img_zixun_empty)
rvExperts.visibility = View.GONE
dismissProgressDialog()
srlContainer.isRefreshing = false
}
} }
...@@ -1035,25 +1085,33 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1035,25 +1085,33 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//筛选确认回调 //筛选确认回调
override fun onFilterConfirmed() { override fun onFilterConfirmed() {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_OPEN) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_OPEN)
LogUtil.d("filter: " + tempFilter.showType.value + "," LogUtil.d(
+ tempFilter.enquiries.map { it.value }.joinToString(",") + "," "filter: " + tempFilter.showType.value + ","
+ tempFilter.ages.map { it.value }.joinToString(",") + "," + tempFilter.enquiries.map { it.value }.joinToString(",") + ","
+ tempFilter.others.map { it.value }.joinToString(",")+ "," + tempFilter.ages.map { it.value }.joinToString(",") + ","
+ tempFilter.doctorEdu.map { it.value }.joinToString(",")) + tempFilter.others.map { it.value }.joinToString(",") + ","
+ tempFilter.doctorEdu.map { it.value }.joinToString(",")
)
props1.put( props1.put(
"filtrate_second", "filtrate_second",
tempFilter.showType.value + "," tempFilter.showType.value + ","
+ tempFilter.enquiries.map { it.value }.joinToString(",") + "," + tempFilter.enquiries.map { it.value }.joinToString(",") + ","
+ tempFilter.ages.map { it.value }.joinToString(",") + "," + tempFilter.ages.map { it.value }.joinToString(",") + ","
+ tempFilter.others.map { it.value }.joinToString(",") +"," + tempFilter.others.map { it.value }.joinToString(",") + ","
+ tempFilter.doctorEdu.map { it.value }.joinToString(",") + tempFilter.doctorEdu.map { it.value }.joinToString(",")
) )
BuryPointUtils.buryPoint("Filtrate", props1) BuryPointUtils.buryPoint("Filtrate", props1)
// 埋点 // 埋点
if (tempFilter.specialityCrowd.size>0){ if (tempFilter.specialityCrowd.size > 0) {
val sign1 = tempFilter.specialityCrowd.joinToString(","){it.value!!} val sign1 = tempFilter.specialityCrowd.joinToString(",") { it.value!! }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE,ConsultBIConstants.ConsultEvent.POSITION_GOODAT_CROWD_CLICK,sign1,"app","") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_GOODAT_CROWD_CLICK,
sign1,
"app",
""
)
} }
...@@ -1364,33 +1422,26 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1364,33 +1422,26 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
} }
} }
private var categoryPopup: CategoryPopupWindow? = null private var mHandler: Handler? = null
private var mHandler:Handler?=null
/** /**
* 显示主题弹窗 * 显示主题弹窗
*/ */
private fun showSubjectPopupWindow() { private fun showSubjectPopupWindow() {
if (categoryPopup==null) { val categoryPopup = CategoryPopupWindow(this, allFilter)
categoryPopup = CategoryPopupWindow(this,allFilter) mHandler = Handler()
mHandler = Handler() mHandler!!.post {
mHandler!!.post { categoryPopup.updateData()
categoryPopup!!.updateData() }
} categoryPopup.setOnDismissListener {
categoryPopup!!.setOnDismissListener { viewDim.visibility = View.INVISIBLE
viewDim.visibility = View.INVISIBLE ConsultAssistantDialogUtils.INSTANCE.fitRequest(this, "doctor_list", true)
ConsultAssistantDialogUtils.INSTANCE.fitRequest(this, "doctor_list", true)
}
ConsultAssistantDialogUtils.INSTANCE.hideAssistantActivity()
categoryPopup!!.onSubjectsSelectedListener = this
categoryPopup!!.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
}else{
ConsultAssistantDialogUtils.INSTANCE.hideAssistantActivity()
categoryPopup!!.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
} }
ConsultAssistantDialogUtils.INSTANCE.hideAssistantActivity()
categoryPopup.onSubjectsSelectedListener = this
categoryPopup.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
} }
/** /**
...@@ -1398,15 +1449,21 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1398,15 +1449,21 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
* *
* 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态 * 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态
*/ */
override fun onCategoriesSelected(signLit:ArrayList<String>) { override fun onCategoriesSelected(signLit: ArrayList<String>) {
if (signLit.isNotEmpty()){ if (signLit.isNotEmpty()) {
val sign1 = signLit.joinToString(","){it} val sign1 = signLit.joinToString(",") { it }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.ConsultEvent.POSITION_TWO_CATEGORY_CLICK, sign1,"app","") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_TWO_CATEGORY_CLICK,
sign1,
"app",
""
)
} }
if (allFilter.categoryId2List.size>0||allFilter.categoryId3List.size>0){ if (allFilter.categoryId2List.size > 0 || allFilter.categoryId3List.size > 0) {
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
}else{ } else {
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_NORMAL)
} }
refresh() refresh()
...@@ -1421,7 +1478,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1421,7 +1478,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private fun refresh(isShowRefresh: Boolean? = true) { private fun refresh(isShowRefresh: Boolean? = true) {
srlContainer.isRefreshing = isShowRefresh!! srlContainer.isRefreshing = isShowRefresh!!
onScrollListener.resetState() onScrollListener.resetState()
getPresenter().mExtras=null getPresenter().mExtras = null
getPresenter().fetchListData(allFilter, getPresenter().mExtras) getPresenter().fetchListData(allFilter, getPresenter().mExtras)
rvExperts.scrollToPosition(0) rvExperts.scrollToPosition(0)
} }
...@@ -1503,7 +1560,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1503,7 +1560,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
mHandler=null mHandler = null
ConsultAssistantDialogUtils.INSTANCE.expertSearchResetStatus() ConsultAssistantDialogUtils.INSTANCE.expertSearchResetStatus()
} }
} }
...@@ -62,14 +62,15 @@ import org.json.JSONObject ...@@ -62,14 +62,15 @@ import org.json.JSONObject
import java.util.concurrent.Executors import java.util.concurrent.Executors
@Route(path = "/consultant/consultant") @Route(path = "/consultant/consultant")
class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView, class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(),
View.OnClickListener, IExpertSearchView,
OnCategoriesSelectedListener, OnSortItemSelectedListener, OnFilterConfirmListener, OnCategoriesSelectedListener, OnSortItemSelectedListener, OnFilterConfirmListener,
SwipeRefreshLayout.OnRefreshListener { SwipeRefreshLayout.OnRefreshListener {
private lateinit var mContext: Context private lateinit var mContext: Context
private lateinit var mActivity: FragmentActivity private lateinit var mActivity: FragmentActivity
var startTime =0L var startTime = 0L
var endTime =0L var endTime = 0L
private var mIdssign1:String="" // 列表埋点咨询师列表id拼接参数 private var mIdssign1: String = "" // 列表埋点咨询师列表id拼接参数
override fun layoutResId(): Int { override fun layoutResId(): Int {
return R.layout.consultant_activity_expert_search_list return R.layout.consultant_activity_expert_search_list
...@@ -286,15 +287,18 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -286,15 +287,18 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun setUserVisibleHint(isVisibleToUser: Boolean) { override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser) super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser && isResumed) { if (isVisibleToUser && isResumed) {
startTime=System.currentTimeMillis() startTime = System.currentTimeMillis()
showConsultAssistantDialog() showConsultAssistantDialog()
} else { } else {
hideConsultAssistantDialog() hideConsultAssistantDialog()
if (startTime!=0L){ if (startTime != 0L) {
endTime=System.currentTimeMillis() endTime = System.currentTimeMillis()
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_PAGE_STAY_VISIT,(endTime-startTime).toString()) ActionCountUtils.count(
ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_PAGE_STAY_VISIT,
(endTime - startTime).toString()
)
} }
} }
if (isVisibleToUser && isResumed) { if (isVisibleToUser && isResumed) {
onResume() onResume()
} }
...@@ -352,44 +356,52 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -352,44 +356,52 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
//设置热门搜索 //设置热门搜索
initHotViews(lin_filter2, it.highlighter) initHotViews(lin_filter2, it.highlighter)
} }
it.cates[0].children?.forEachIndexed { index, children-> it.cates[0].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.childList.add(childrenBean) allFilter.childList.add(childrenBean)
} }
it.cates[1].children?.forEachIndexed { index, children-> it.cates[1].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.stressList.add(childrenBean) allFilter.stressList.add(childrenBean)
} }
it.cates[2].children?.forEachIndexed { index, children-> it.cates[2].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.loveEmotionList.add(childrenBean) allFilter.loveEmotionList.add(childrenBean)
} }
it.cates[3].children?.forEachIndexed { index, children-> it.cates[3].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.marriedFamilyList.add(childrenBean) allFilter.marriedFamilyList.add(childrenBean)
} }
it.cates[4].children?.forEachIndexed { index, children-> it.cates[4].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.personalGrowthList.add(childrenBean) allFilter.personalGrowthList.add(childrenBean)
} }
it.cates[5].children?.forEachIndexed { index, children-> it.cates[5].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.interpersonalRelationshipList.add(childrenBean) allFilter.interpersonalRelationshipList.add(childrenBean)
} }
it.cates[6].children?.forEachIndexed { index, children-> it.cates[6].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.careerDevelopmentList.add(childrenBean) allFilter.careerDevelopmentList.add(childrenBean)
} }
it.cates[7].children?.forEachIndexed { index, children-> it.cates[7].children?.forEachIndexed { index, children ->
val type = if (children.cate_name.length>4) 2 else 1 val type = if (children.cate_name.length > 4) 2 else 1
val childrenBean = ChildrenBean(children.cate_name,children.cate_id,index<=12,type) val childrenBean =
ChildrenBean(children.cate_name, children.cate_id, index <= 12, type)
allFilter.mentalHealthList.add(childrenBean) allFilter.mentalHealthList.add(childrenBean)
} }
} }
...@@ -421,8 +433,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -421,8 +433,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
textView.isSelected = true textView.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
// 埋点 // 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE, ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.ConsultEvent.POSITION_CHOICE_FILTER_CLICK,hot.value!!,"app","") ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_CHOICE_FILTER_CLICK,
hot.value!!,
"app",
""
)
} }
filterLabelSet() filterLabelSet()
//开始筛选数据 //开始筛选数据
...@@ -564,7 +581,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -564,7 +581,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
} }
if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size+allFilter.doctorEdu.size + allFilter.title.size+allFilter.specialityCrowd.size > 0) { if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.doctorEdu.size + allFilter.title.size + allFilter.specialityCrowd.size > 0) {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED)
} else { } else {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL)
...@@ -584,7 +601,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -584,7 +601,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
} }
if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.title.size+allFilter.specialityCrowd.size > 0) { if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.title.size + allFilter.specialityCrowd.size > 0) {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED)
} else { } else {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL)
...@@ -604,7 +621,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -604,7 +621,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
} }
if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.title.size+allFilter.specialityCrowd.size > 0) { if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.title.size + allFilter.specialityCrowd.size > 0) {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED)
} else { } else {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL)
...@@ -624,7 +641,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -624,7 +641,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
} }
if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.title.size+allFilter.specialityCrowd.size > 0) { if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.title.size + allFilter.specialityCrowd.size > 0) {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_FILTERED)
} else { } else {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL)
...@@ -708,30 +725,32 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -708,30 +725,32 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
/** /**
* 获取专家列表数据 * 获取专家列表数据
*/ */
override fun onDoctorListFetched(data: MutableList<ExpertServiceItem>, extras:Extras?,curPage:Int) { override fun onDoctorListFetched(
data: MutableList<ExpertServiceItem>,
extras: Extras?,
curPage: Int
) {
if (rvExperts.adapter != doctorAdapter) { if (rvExperts.adapter != doctorAdapter) {
rvExperts.adapter = doctorAdapter rvExperts.adapter = doctorAdapter
} }
LogUtil.d("data size " + data.size) LogUtil.d("data size " + data.size)
// 如果是第一页 // 如果是第一页
if (curPage==1){ if (curPage == 1) {
if (data.size>=10){ if (data.size >= 10) {
hasMore = true hasMore = true
doctorAdapter.hasMore = true doctorAdapter.hasMore = true
}else{ } else {
hasMore = false hasMore = false
doctorAdapter.hasMore = false doctorAdapter.hasMore = false
} }
doctorList.clear() doctorList.clear()
// 加入头部数据并隐藏,否则点击事件position会错乱
doctorList.add(ExpertServiceItem(false,"",""))
} }
if (data.size==0) { // data的长度为0的时候为最后一页 if (data.size == 0) { // data的长度为0的时候为最后一页
hasMore = false hasMore = false
doctorAdapter.hasMore = false doctorAdapter.hasMore = false
}else{ } else {
doctorList.addAll(data) doctorList.addAll(data)
} }
doctorAdapter.notifyDataSetChanged() doctorAdapter.notifyDataSetChanged()
...@@ -746,8 +765,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -746,8 +765,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
srlContainer.isRefreshing = false srlContainer.isRefreshing = false
// 埋点 // 埋点
mIdssign1 = data.joinToString(","){it.id} mIdssign1 = data.joinToString(",") { it.id }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,mIdssign1,sign2,"app") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,
mIdssign1,
sign2,
"app"
)
} }
override fun fetchListFailed(msg: String?) { override fun fetchListFailed(msg: String?) {
...@@ -904,7 +929,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -904,7 +929,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
filterPopupWindow.setOnDismissListener { filterPopupWindow.setOnDismissListener {
viewDim.visibility = View.INVISIBLE viewDim.visibility = View.INVISIBLE
viewDim_filter.visibility = View.GONE viewDim_filter.visibility = View.GONE
if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.doctorEdu.size + allFilter.title.size+allFilter.specialityCrowd.size > 0 || !TextUtils.isEmpty( if (allFilter.others.size + allFilter.enquiries.size + allFilter.ages.size + allFilter.doctorEdu.size + allFilter.title.size + allFilter.specialityCrowd.size > 0 || !TextUtils.isEmpty(
allFilter.priceRanges?.minPrice allFilter.priceRanges?.minPrice
) || !TextUtils.isEmpty(allFilter.priceRanges?.maxPrice) ) || !TextUtils.isEmpty(allFilter.priceRanges?.maxPrice)
) { ) {
...@@ -941,9 +966,15 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -941,9 +966,15 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
BuryPointUtils.buryPoint("Filtrate", props1) BuryPointUtils.buryPoint("Filtrate", props1)
// 埋点 // 埋点
if (tempFilter.specialityCrowd.size>0){ if (tempFilter.specialityCrowd.size > 0) {
val sign1 = tempFilter.specialityCrowd.joinToString(","){it.value!!} val sign1 = tempFilter.specialityCrowd.joinToString(",") { it.value!! }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE,ConsultBIConstants.ConsultEvent.POSITION_GOODAT_CROWD_CLICK,sign1,"app","") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_GOODAT_CROWD_CLICK,
sign1,
"app",
""
)
} }
...@@ -1062,7 +1093,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1062,7 +1093,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
//筛选标题显示处理 //筛选标题显示处理
private fun filterLabelSet() { private fun filterLabelSet() {
if ((allFilter.others.size + allFilter.ages.size + allFilter.doctorEdu.size + allFilter.enquiries.size + allFilter.title.size+allFilter.specialityCrowd.size) == 1) { if ((allFilter.others.size + allFilter.ages.size + allFilter.doctorEdu.size + allFilter.enquiries.size + allFilter.title.size + allFilter.specialityCrowd.size) == 1) {
var text: String? = "" var text: String? = ""
when { when {
allFilter.others.size == 1 -> { allFilter.others.size == 1 -> {
...@@ -1077,10 +1108,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1077,10 +1108,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
allFilter.title.size == 1 -> { allFilter.title.size == 1 -> {
text = allFilter.title[0].value text = allFilter.title[0].value
} }
allFilter.specialityCrowd.size==1 -> { allFilter.specialityCrowd.size == 1 -> {
text = allFilter.specialityCrowd[0].value text = allFilter.specialityCrowd[0].value
} }
allFilter.doctorEdu.size==1 -> { allFilter.doctorEdu.size == 1 -> {
text = allFilter.doctorEdu[0].value text = allFilter.doctorEdu[0].value
} }
else -> { else -> {
...@@ -1174,7 +1205,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1174,7 +1205,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
//显示地区弹窗 //显示地区弹窗
private fun showAreaPopupWindow() { private fun showAreaPopupWindow() {
if (headData?.region != null) { if (headData?.region != null) {
val regionPopupWindow = AreaPopupWindow(mActivity, headData?.region ?: ArrayList(), allFilter.region, allFilter.sub) val regionPopupWindow = AreaPopupWindow(
mActivity,
headData?.region ?: ArrayList(),
allFilter.region,
allFilter.sub
)
regionPopupWindow.showAsDropDown(viewSep2) regionPopupWindow.showAsDropDown(viewSep2)
viewDim.visibility = View.VISIBLE viewDim.visibility = View.VISIBLE
updateFilterTextViewStatus(tvArea, FILTER_STATUS_OPEN) updateFilterTextViewStatus(tvArea, FILTER_STATUS_OPEN)
...@@ -1192,7 +1228,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1192,7 +1228,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
updateFilterTextViewStatus(tvArea, FILTER_STATUS_OPEN) updateFilterTextViewStatus(tvArea, FILTER_STATUS_OPEN)
allFilter.region = region allFilter.region = region
allFilter.sub = sub allFilter.sub = sub
if ( TextUtils.isEmpty(region.code) && TextUtils.isEmpty(sub.code)) { if (TextUtils.isEmpty(region.code) && TextUtils.isEmpty(sub.code)) {
tvArea.text = "地区" tvArea.text = "地区"
} else if (!TextUtils.isEmpty(region.code) && !TextUtils.isEmpty(sub.code)) { } else if (!TextUtils.isEmpty(region.code) && !TextUtils.isEmpty(sub.code)) {
if (region.value?.length ?: 0 > 4) { if (region.value?.length ?: 0 > 4) {
...@@ -1250,49 +1286,47 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1250,49 +1286,47 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
private var categoryPopup: CategoryPopupWindow? = null private var mHandler: Handler? = null
private var mHandler:Handler?=null
/** /**
* 显示八大类弹窗 * 显示八大类弹窗
*/ */
private fun showSubjectPopupWindow() { private fun showSubjectPopupWindow() {
if (categoryPopup==null) { val categoryPopup = CategoryPopupWindow(mActivity, allFilter)
categoryPopup = CategoryPopupWindow(mActivity,allFilter) mHandler = Handler()
mHandler = Handler() mHandler!!.post {
mHandler!!.post { categoryPopup.updateData()
categoryPopup!!.updateData()
}
categoryPopup!!.setOnDismissListener {
viewDim.visibility = View.INVISIBLE
showConsultAssistantDialog()
}
hideConsultAssistantDialog()
categoryPopup!!.onSubjectsSelectedListener = this
categoryPopup!!.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
}else{
hideConsultAssistantDialog()
categoryPopup!!.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
} }
categoryPopup.setOnDismissListener {
viewDim.visibility = View.INVISIBLE
showConsultAssistantDialog()
}
hideConsultAssistantDialog()
categoryPopup.onSubjectsSelectedListener = this
categoryPopup.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
} }
/** /**
* 主题选择确认回调 * 主题选择确认回调
* *
*/ */
override fun onCategoriesSelected(signLit:ArrayList<String>) { override fun onCategoriesSelected(signLit: ArrayList<String>) {
if (signLit.isNotEmpty()){ if (signLit.isNotEmpty()) {
val sign1 = signLit.joinToString(","){it} val sign1 = signLit.joinToString(",") { it }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.ConsultEvent.POSITION_TWO_CATEGORY_CLICK, sign1,"app","") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_TWO_CATEGORY_CLICK,
sign1,
"app",
""
)
} }
if (allFilter.categoryId2List.size>0||allFilter.categoryId3List.size>0){ if (allFilter.categoryId2List.size > 0 || allFilter.categoryId3List.size > 0) {
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
}else{ } else {
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_NORMAL)
} }
refresh() refresh()
...@@ -1308,15 +1342,21 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1308,15 +1342,21 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
* EventBus从首页某个位置点击事件传递 * EventBus从首页某个位置点击事件传递
* sign 仅用于埋点事件统计 * sign 仅用于埋点事件统计
*/ */
private var sign2="" private var sign2 = ""
fun onEvent(event: HomeModuleTabEvent) { fun onEvent(event: HomeModuleTabEvent) {
if (!TextUtils.isEmpty(event.sign)){ if (!TextUtils.isEmpty(event.sign)) {
sign2 = event.sign sign2 = event.sign
// 埋点 // 埋点
if (!TextUtils.isEmpty(mIdssign1)){ if (!TextUtils.isEmpty(mIdssign1)) {
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,mIdssign1,sign2,"app") ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,
mIdssign1,
sign2,
"app"
)
} }
} }
} }
//刷新列表 //刷新列表
...@@ -1382,13 +1422,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1382,13 +1422,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
super.onResume() super.onResume()
refresh(false) refresh(false)
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT) ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT)
ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit","6") ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit", "6")
} }
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
EventBus.getDefault().unregister(this) EventBus.getDefault().unregister(this)
mHandler=null mHandler = null
ConsultAssistantDialogUtils.INSTANCE.resetStatus() ConsultAssistantDialogUtils.INSTANCE.resetStatus()
} }
} }
...@@ -98,14 +98,24 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -98,14 +98,24 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
if (actionId == EditorInfo.IME_ACTION_SEARCH) { if (actionId == EditorInfo.IME_ACTION_SEARCH) {
// 搜索的关联词 // 搜索的关联词
var relatedWords = "" var relatedWords = ""
var isRecommendWords = false
if (searchSuggestList.isNotEmpty()&&searchSuggestList.size>0){ if (searchSuggestList.isNotEmpty()&&searchSuggestList.size>0){
searchSuggestList[0].suggest_relations?.let { if (searchSuggestList[0].suggest_relations.size>0){
if (it.size>0){ relatedWords = searchSuggestList[0].suggest_relations[0]
relatedWords = it[0] isRecommendWords = true
} }
if (TextUtils.isEmpty(relatedWords)&&!TextUtils.isEmpty(searchSuggestList[0].suggest_content)){
relatedWords = searchSuggestList[0].suggest_content
}
doSearch(etSearch.text.toString(),relatedWords,isRecommendWords)
}else{
val searchWords = etSearch.text.toString()
if (TextUtils.isEmpty(searchWords)){
doSearch(searchWords,"",isRecommendWords)
}else{
getSearchWords(etSearch.text.toString(),true)
} }
} }
doSearch(etSearch.text.toString(),relatedWords)
} }
true true
} }
...@@ -138,12 +148,20 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -138,12 +148,20 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
searchWordsAdapter.setOnItemClickListener { adapter, view, position -> searchWordsAdapter.setOnItemClickListener { adapter, view, position ->
// 搜索的关联词 // 搜索的关联词
var relatedWords = "" var relatedWords = ""
var isRecommendWords = false
if (searchSuggestList.isNotEmpty()&&searchSuggestList.size>0){ if (searchSuggestList.isNotEmpty()&&searchSuggestList.size>0){
searchSuggestList[position].suggest_relations?.let { if (searchSuggestList[position].suggest_relations.size>0){
relatedWords = it[0] relatedWords = searchSuggestList[position].suggest_relations[0]
isRecommendWords = true
}
if (TextUtils.isEmpty(relatedWords)&&!TextUtils.isEmpty(searchSuggestList[position].suggest_content)){
relatedWords = searchSuggestList[position].suggest_content
} }
} }
doSearch(searchSuggestList[position].suggest_content,relatedWords) doSearch(searchSuggestList[position].suggest_content,relatedWords,isRecommendWords)
// 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,ConsultBIConstants.POSITION_YDL_USER_ASSOCIATE_WORD_CLICK,etSearch.text.toString(),searchSuggestList[position].suggest_content,"app")
} }
etSearch.addTextChangedListener(object : TextWatcher { etSearch.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
...@@ -167,6 +185,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -167,6 +185,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
}) })
} }
/** /**
* 获取搜索联想词 * 获取搜索联想词
* @param isClickWords 是否是点击历史搜索、热门搜索等进行搜索 * @param isClickWords 是否是点击历史搜索、热门搜索等进行搜索
...@@ -186,20 +205,27 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -186,20 +205,27 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
if (isClickWords){ if (isClickWords){
// 搜索的关联词 // 搜索的关联词
var relatedWords = "" var relatedWords = ""
var isRecommendWords = false
if (!searchWordsBean.search_suggests.isNullOrEmpty()&&searchWordsBean.search_suggests.size>0){ if (!searchWordsBean.search_suggests.isNullOrEmpty()&&searchWordsBean.search_suggests.size>0){
searchWordsBean.search_suggests[0].suggest_relations?.let { if (searchWordsBean.search_suggests[0].suggest_relations.size>0){
if (it.size>0){ relatedWords = searchWordsBean.search_suggests[0].suggest_relations[0]
relatedWords = it[0] isRecommendWords = true
} }
if (TextUtils.isEmpty(relatedWords)&&!TextUtils.isEmpty(searchWordsBean.search_suggests[0].suggest_content)){
relatedWords = searchWordsBean.search_suggests[0].suggest_content
} }
} }
doSearch(searchContent,relatedWords) doSearch(searchContent,relatedWords,isRecommendWords)
}else{ }else{
searchSuggestList.clear() searchSuggestList.clear()
if (!searchWordsBean.search_suggests.isNullOrEmpty()){ if (!searchWordsBean.search_suggests.isNullOrEmpty()){
rv_search_words.visibility = View.VISIBLE rv_search_words.visibility = View.VISIBLE
searchSuggestList.addAll(searchWordsBean.search_suggests) searchSuggestList.addAll(searchWordsBean.search_suggests)
searchWordsAdapter.notifyDataAndSetSearchWord(mSearchContent) searchWordsAdapter.notifyDataAndSetSearchWord(mSearchContent)
// 埋点
val sign2 = searchSuggestList.joinToString(","){it.suggest_content}
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,ConsultBIConstants.POSITION_YDL_USER_ASSOCIATE_WORD_VISIT,searchContent,sign2,"app")
}else{ }else{
rv_search_words.visibility = View.GONE rv_search_words.visibility = View.GONE
} }
...@@ -358,8 +384,9 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -358,8 +384,9 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
/** /**
* 搜索 * 搜索
* @param isRecommendWords 是否是推荐词
*/ */
private fun doSearch(searchWords:String,relatedWords:String) { private fun doSearch(searchWords:String,relatedWords:String,isRecommendWords:Boolean) {
val view = this.currentFocus val view = this.currentFocus
if (view != null) { if (view != null) {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
...@@ -375,7 +402,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -375,7 +402,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
Gson().toJson(historyList) Gson().toJson(historyList)
) )
} }
ExpertSearchActivity.startSearch(this, searchWords,"14",relatedWords) ExpertSearchActivity.startSearch(this, searchWords,"14",relatedWords,isRecommendWords)
finish() finish()
} }
......
...@@ -29,6 +29,7 @@ import com.yidianling.consultant.constants.ConsultBIConstants ...@@ -29,6 +29,7 @@ import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.model.bean.ExpertServiceItem import com.yidianling.consultant.model.bean.ExpertServiceItem
import com.yidianling.consultant.modular.utils.TempH5RouteUtils import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn import com.yidianling.consultant.router.ConsultantIn
import kotlinx.android.synthetic.main.consultant_activity_hot_search.*
import kotlinx.android.synthetic.main.consultant_expert_search_feedbackrate.view.* import kotlinx.android.synthetic.main.consultant_expert_search_feedbackrate.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.* import kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_item_view.view.* import kotlinx.android.synthetic.main.consultant_expert_search_item_view.view.*
...@@ -71,12 +72,18 @@ class ExpertSearchAdapter( ...@@ -71,12 +72,18 @@ class ExpertSearchAdapter(
var hasMore = true var hasMore = true
var pageIndex: Int = 0 var pageIndex: Int = 0
private var clickCount=0 // 搜索结果提示标签点击次数 var clickCount=0 // 搜索结果提示标签点击次数
var mIsRecommendWords = false // 是否是推荐词
fun setEntrance(pageIndex: Int) { fun setEntrance(pageIndex: Int) {
this.pageIndex = pageIndex this.pageIndex = pageIndex
} }
fun setIsRecommendWords(isRecommend:Boolean){
mIsRecommendWords = isRecommend
}
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
if (holder is HeaderViewHolder) { // 搜索结果提示头部 if (holder is HeaderViewHolder) { // 搜索结果提示头部
...@@ -87,6 +94,12 @@ class ExpertSearchAdapter( ...@@ -87,6 +94,12 @@ class ExpertSearchAdapter(
var text = "根据匹配,为您推荐“${listData[0].related_word}”相关词" var text = "根据匹配,为您推荐“${listData[0].related_word}”相关词"
holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].related_word) holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].related_word)
holder.tvSearchWord.text = listData[0].search_content holder.tvSearchWord.text = listData[0].search_content
// 埋点
if (mIsRecommendWords){
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_map_word_visit",listData[0].search_content,listData[0].related_word,"app")
}else{
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_correction_word_visit",listData[0].search_content,listData[0].related_word,"app")
}
holder.tvSearchWord.setOnClickListener { holder.tvSearchWord.setOnClickListener {
mOnClickLister.onClick(holder.tvSearchWord.text.toString()) mOnClickLister.onClick(holder.tvSearchWord.text.toString())
++clickCount ++clickCount
...@@ -95,14 +108,24 @@ class ExpertSearchAdapter( ...@@ -95,14 +108,24 @@ class ExpertSearchAdapter(
holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].search_content) holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].search_content)
holder.tvSearchTips.text = "你要找的是不是" holder.tvSearchTips.text = "你要找的是不是"
holder.tvSearchWord.text = listData[0].related_word holder.tvSearchWord.text = listData[0].related_word
// 埋点
if (mIsRecommendWords){
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_map_inputword_click",listData[0].related_word,listData[0].search_content,"app")
}else{
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_correction_inputword_click",listData[0].related_word,listData[0].search_content,"app")
}
}else if (clickCount==2){ // 第二次点击搜索标签隐藏搜索匹配结果提示 }else if (clickCount==2){ // 第二次点击搜索标签隐藏搜索匹配结果提示
// 埋点
if (mIsRecommendWords){
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_map_recommendword_click",listData[0].search_content,listData[0].related_word,"app")
}else{
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_correction_recommendword_click",listData[0].search_content,listData[0].related_word,"app")
}
listData.removeAt(0) listData.removeAt(0)
clickCount = 0 // 点击两次后重置为0
} }
} }
} }
}else {
holder.clSearchWords.visibility = View.GONE
// listData.removeAt(0)
} }
} }
} else if (holder is NormalViewHolder) { } else if (holder is NormalViewHolder) {
...@@ -423,10 +446,10 @@ class ExpertSearchAdapter( ...@@ -423,10 +446,10 @@ class ExpertSearchAdapter(
override fun getItemViewType(position: Int): Int = override fun getItemViewType(position: Int): Int =
when { when {
position==0 ->{ position==0&&listData.size>0&&listData[0].is_head_view ->{
HEADER_VIEW HEADER_VIEW
} }
position>0&&position < listData.size -> { position < listData.size -> {
NORMAL_VIEW NORMAL_VIEW
} }
!hasMore && listData.size == 0 -> { !hasMore && listData.size == 0 -> {
......
...@@ -11,7 +11,7 @@ data class SearchSuggestListBean( ...@@ -11,7 +11,7 @@ data class SearchSuggestListBean(
val id:String, val id:String,
val score:String, val score:String,
val suggest_content:String, val suggest_content:String,
val suggest_relations:ArrayList<String>?, val suggest_relations:ArrayList<String>,
val search_count: Int, val search_count: Int,
val suggest_classify_types:ArrayList<String>, val suggest_classify_types:ArrayList<String>,
val mapping_classify_type_exist:Boolean val mapping_classify_type_exist:Boolean
......
...@@ -21,7 +21,10 @@ class ConsultBIConstants { ...@@ -21,7 +21,10 @@ class ConsultBIConstants {
const val POSITION_DAOYI_ADVERTISEMENT_CLICK="daoyi_advertisement_page|daoyi_advertisement_click" const val POSITION_DAOYI_ADVERTISEMENT_CLICK="daoyi_advertisement_page|daoyi_advertisement_click"
const val PART_ID_CONSULT_COUNSELOR_LIST_PAGE="consult_counselor_list_page" // 咨询师列表页面浏览part_id const val PART_ID_CONSULT_COUNSELOR_LIST_PAGE="consult_counselor_list_page" // 咨询师列表页面浏览part_id
const val PART_ID_YDL_USER_MAIN_PAGE="ydl_user_main_page" // 联想词part_id
const val POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT="consult_counselor_list_page_visit" // 咨询师列表页面浏览position const val POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT="consult_counselor_list_page_visit" // 咨询师列表页面浏览position
const val POSITION_YDL_USER_ASSOCIATE_WORD_VISIT="ydl_user_associate_word_visit" // 联想词曝光position
const val POSITION_YDL_USER_ASSOCIATE_WORD_CLICK="ydl_user_associate_word_click" // 联想词点击position
} }
//====================APP咨询列表页(app_consult_list_page)==================== //====================APP咨询列表页(app_consult_list_page)====================
...@@ -75,8 +78,7 @@ class ConsultBIConstants { ...@@ -75,8 +78,7 @@ class ConsultBIConstants {
class UserMainEvent { class UserMainEvent {
companion object { companion object {
private const val YDL_USER_MAIN_PAGE: String = private const val YDL_USER_MAIN_PAGE: String = "ydl_user_main_page|"//壹点灵用户版首页 partId
"ydl_user_main_page|"//壹点灵用户版首页 partId
const val YDL_USER_SEARCH_CLICK: String = const val YDL_USER_SEARCH_CLICK: String =
YDL_USER_MAIN_PAGE + "ydl_user_search_click" //搜索栏 YDL_USER_MAIN_PAGE + "ydl_user_search_click" //搜索栏
......
...@@ -403,7 +403,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -403,7 +403,7 @@ class ConsultAssistantDialogUtils private constructor() {
.getSecondTaskActivity()?.finish() .getSecondTaskActivity()?.finish()
activity.finish() activity.finish()
} else { } else {
if (null != activity && !activity.isFinishing) { if (!activity.isFinishing) {
activity.finish() activity.finish()
} }
} }
...@@ -417,10 +417,10 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -417,10 +417,10 @@ class ConsultAssistantDialogUtils private constructor() {
ffrom ffrom
) )
} }
if (null != activity && activity is ConsultAssistantCenterActivity && !activity.isFinishing) activity.finish() if (activity is ConsultAssistantCenterActivity && !activity.isFinishing) activity.finish()
}, object : ThrowableConsumer() { }, object : ThrowableConsumer() {
override fun accept(msg: String) { override fun accept(msg: String) {
if (null != activity && activity is ConsultAssistantCenterActivity && !activity.isFinishing) activity.finish() if (activity is ConsultAssistantCenterActivity && !activity.isFinishing) activity.finish()
} }
} }
) )
......
...@@ -6,6 +6,7 @@ import android.view.LayoutInflater ...@@ -6,6 +6,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.PopupWindow import android.widget.PopupWindow
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R import com.yidianling.consultant.R
...@@ -506,6 +507,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -506,6 +507,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (mAllFilter.childList.size>12){ if (mAllFilter.childList.size>12){
ivSortChildEducationOpen.visibility = View.VISIBLE ivSortChildEducationOpen.visibility = View.VISIBLE
view.ll_sort_child_education_open.setOnClickListener { view.ll_sort_child_education_open.setOnClickListener {
val params = rvSortChildEducation.layoutParams as LinearLayout.LayoutParams
if (!childEducationAdapter.isVisible){ if (!childEducationAdapter.isVisible){
if (childList.size<=12){ if (childList.size<=12){
childList.addAll(mAllFilter.childList.subList(12,mAllFilter.childList.size)) childList.addAll(mAllFilter.childList.subList(12,mAllFilter.childList.size))
...@@ -513,9 +515,15 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -513,9 +515,15 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
} }
childEducationAdapter.setAllVisible() childEducationAdapter.setAllVisible()
ivSortChildEducationOpen.setImageResource(R.drawable.consultant_ic_sort_open) ivSortChildEducationOpen.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
rvSortChildEducation.layoutParams = params
}else{ }else{
childEducationAdapter.setGone() childEducationAdapter.setGone()
ivSortChildEducationOpen.setImageResource(R.drawable.consultant_ic_sort_close) ivSortChildEducationOpen.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
rvSortChildEducation.layoutParams = params
} }
} }
} }
...@@ -529,6 +537,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -529,6 +537,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (mAllFilter.stressList.size>12){ if (mAllFilter.stressList.size>12){
ivSortEmotionalStress.visibility = View.VISIBLE ivSortEmotionalStress.visibility = View.VISIBLE
view.ll_sort_emotional_stress.setOnClickListener { view.ll_sort_emotional_stress.setOnClickListener {
val params = rvSortEmotionalStress.layoutParams as LinearLayout.LayoutParams
if (!stressAdapter.isVisible){ if (!stressAdapter.isVisible){
if (stressList.size<=12){ if (stressList.size<=12){
stressList.addAll(mAllFilter.stressList.subList(12,mAllFilter.stressList.size)) stressList.addAll(mAllFilter.stressList.subList(12,mAllFilter.stressList.size))
...@@ -536,9 +545,15 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -536,9 +545,15 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
} }
stressAdapter.setAllVisible() stressAdapter.setAllVisible()
ivSortEmotionalStress.setImageResource(R.drawable.consultant_ic_sort_open) ivSortEmotionalStress.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
rvSortEmotionalStress.layoutParams = params
}else{ }else{
stressAdapter.setGone() stressAdapter.setGone()
ivSortEmotionalStress.setImageResource(R.drawable.consultant_ic_sort_close) ivSortEmotionalStress.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
rvSortEmotionalStress.layoutParams = params
} }
} }
} }
...@@ -551,12 +566,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -551,12 +566,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (loveEmotionList.size>12){ if (loveEmotionList.size>12){
ivSortLoveEmotion.visibility = View.VISIBLE ivSortLoveEmotion.visibility = View.VISIBLE
view.ll_sort_love_emotion.setOnClickListener { view.ll_sort_love_emotion.setOnClickListener {
val params = view.rv_sort_love_emotion.layoutParams as LinearLayout.LayoutParams
if (!loveEmotionAdapter.isVisible){ if (!loveEmotionAdapter.isVisible){
loveEmotionAdapter.setAllVisible() loveEmotionAdapter.setAllVisible()
ivSortLoveEmotion.setImageResource(R.drawable.consultant_ic_sort_open) ivSortLoveEmotion.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
view.rv_sort_love_emotion.layoutParams = params
}else{ }else{
loveEmotionAdapter.setGone() loveEmotionAdapter.setGone()
ivSortLoveEmotion.setImageResource(R.drawable.consultant_ic_sort_close) ivSortLoveEmotion.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
view.rv_sort_love_emotion.layoutParams = params
} }
} }
} }
...@@ -566,12 +588,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -566,12 +588,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (marriedFamilyList.size>12){ if (marriedFamilyList.size>12){
ivSortMarriedFamily.visibility = View.VISIBLE ivSortMarriedFamily.visibility = View.VISIBLE
view.ll_sort_married_family.setOnClickListener { view.ll_sort_married_family.setOnClickListener {
val params = view.rv_sort_married_family.layoutParams as LinearLayout.LayoutParams
if (!marriedFamilyAdapter.isVisible){ if (!marriedFamilyAdapter.isVisible){
marriedFamilyAdapter.setAllVisible() marriedFamilyAdapter.setAllVisible()
ivSortMarriedFamily.setImageResource(R.drawable.consultant_ic_sort_open) ivSortMarriedFamily.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
view.rv_sort_married_family.layoutParams = params
}else{ }else{
marriedFamilyAdapter.setGone() marriedFamilyAdapter.setGone()
ivSortMarriedFamily.setImageResource(R.drawable.consultant_ic_sort_close) ivSortMarriedFamily.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
view.rv_sort_married_family.layoutParams = params
} }
} }
} }
...@@ -581,12 +610,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -581,12 +610,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (personalGrowthList.size>12){ if (personalGrowthList.size>12){
ivSortPersonalGrowth.visibility = View.VISIBLE ivSortPersonalGrowth.visibility = View.VISIBLE
view.ll_sort_personal_growth.setOnClickListener { view.ll_sort_personal_growth.setOnClickListener {
val params = view.rv_sort_personal_growth.layoutParams as LinearLayout.LayoutParams
if (!personalGrowthAdapter.isVisible){ if (!personalGrowthAdapter.isVisible){
personalGrowthAdapter.setAllVisible() personalGrowthAdapter.setAllVisible()
ivSortPersonalGrowth.setImageResource(R.drawable.consultant_ic_sort_open) ivSortPersonalGrowth.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
view.rv_sort_personal_growth.layoutParams = params
}else{ }else{
personalGrowthAdapter.setGone() personalGrowthAdapter.setGone()
ivSortPersonalGrowth.setImageResource(R.drawable.consultant_ic_sort_close) ivSortPersonalGrowth.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
view.rv_sort_personal_growth.layoutParams = params
} }
} }
} }
...@@ -596,12 +632,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -596,12 +632,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (interpersonalRelationshipList.size>12){ if (interpersonalRelationshipList.size>12){
ivSortInterpersonalRelationship.visibility = View.VISIBLE ivSortInterpersonalRelationship.visibility = View.VISIBLE
view.ll_sort_interpersonal_relationship.setOnClickListener { view.ll_sort_interpersonal_relationship.setOnClickListener {
val params = view.rv_sort_interpersonal_relationship.layoutParams as LinearLayout.LayoutParams
if (!interpersonalRelationshipAdapter.isVisible){ if (!interpersonalRelationshipAdapter.isVisible){
interpersonalRelationshipAdapter.setAllVisible() interpersonalRelationshipAdapter.setAllVisible()
ivSortInterpersonalRelationship.setImageResource(R.drawable.consultant_ic_sort_open) ivSortInterpersonalRelationship.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
view.rv_sort_interpersonal_relationship.layoutParams = params
}else{ }else{
interpersonalRelationshipAdapter.setGone() interpersonalRelationshipAdapter.setGone()
ivSortInterpersonalRelationship.setImageResource(R.drawable.consultant_ic_sort_close) ivSortInterpersonalRelationship.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
view.rv_sort_interpersonal_relationship.layoutParams = params
} }
} }
} }
...@@ -611,12 +654,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -611,12 +654,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (careerDevelopmentList.size>12){ if (careerDevelopmentList.size>12){
ivSortCareerDevelopment.visibility = View.VISIBLE ivSortCareerDevelopment.visibility = View.VISIBLE
view.ll_sort_career_development.setOnClickListener { view.ll_sort_career_development.setOnClickListener {
val params = view.rv_sort_career_development.layoutParams as LinearLayout.LayoutParams
if (!careerDevelopmentAdapter.isVisible){ if (!careerDevelopmentAdapter.isVisible){
careerDevelopmentAdapter.setAllVisible() careerDevelopmentAdapter.setAllVisible()
ivSortCareerDevelopment.setImageResource(R.drawable.consultant_ic_sort_open) ivSortCareerDevelopment.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
view.rv_sort_career_development.layoutParams = params
}else{ }else{
careerDevelopmentAdapter.setGone() careerDevelopmentAdapter.setGone()
ivSortCareerDevelopment.setImageResource(R.drawable.consultant_ic_sort_close) ivSortCareerDevelopment.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
view.rv_sort_career_development.layoutParams = params
} }
} }
} }
...@@ -626,12 +676,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -626,12 +676,19 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (mentalHealthList.size>12){ if (mentalHealthList.size>12){
ivSortMentalHealth.visibility = View.VISIBLE ivSortMentalHealth.visibility = View.VISIBLE
view.ll_sort_mental_health.setOnClickListener { view.ll_sort_mental_health.setOnClickListener {
val params = view.rv_sort_mental_health.layoutParams as LinearLayout.LayoutParams
if (!mentalHealthAdapter.isVisible){ if (!mentalHealthAdapter.isVisible){
mentalHealthAdapter.setAllVisible() mentalHealthAdapter.setAllVisible()
ivSortMentalHealth.setImageResource(R.drawable.consultant_ic_sort_open) ivSortMentalHealth.setImageResource(R.drawable.consultant_ic_sort_open)
// 展开的布局设置自适应
params.height = LinearLayout.LayoutParams.WRAP_CONTENT
view.rv_sort_mental_health.layoutParams = params
}else{ }else{
mentalHealthAdapter.setGone() mentalHealthAdapter.setGone()
ivSortMentalHealth.setImageResource(R.drawable.consultant_ic_sort_close) ivSortMentalHealth.setImageResource(R.drawable.consultant_ic_sort_close)
// 关闭的时候布局设置为固定高度
params.height = RxImageTool.dp2px(138f)
view.rv_sort_mental_health.layoutParams = params
} }
} }
} }
......
...@@ -4,33 +4,29 @@ import android.annotation.SuppressLint ...@@ -4,33 +4,29 @@ import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.BitmapDrawable
import android.os.Build
import androidx.core.content.ContextCompat
import android.text.* import android.text.*
import android.text.style.AbsoluteSizeSpan import android.text.style.AbsoluteSizeSpan
import android.util.Log import android.util.Log
import android.view.* import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.* import android.widget.*
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper
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.common.tools.RxKeyboardTool import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.http.ExpertSearchDataManager
import com.yidianling.consultant.listener.OnFilterConfirmListener 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.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
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.*
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="566dp" android:layout_height="566dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/platform_white" android:background="@color/platform_white"
android:orientation="vertical"> android:orientation="vertical">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent">
>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginBottom="68dp" android:layout_marginBottom="68dp"
> android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_child_education_open" android:id="@+id/ll_sort_child_education_open"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16"
android:layout_marginTop="@dimen/platform_dp_17" android:layout_marginTop="@dimen/platform_dp_17"
android:gravity="center_vertical" android:gravity="center_vertical"
> android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16">
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:includeFontPadding="false"
android:textStyle="bold"
android:text="亲子教育" android:text="亲子教育"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_child_education_open" android:id="@+id/iv_sort_child_education_open"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_child_education" android:id="@+id/rv_sort_child_education"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_emotional_stress" android:id="@+id/ll_sort_emotional_stress"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="情绪压力" android:text="情绪压力"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_emotional_stress" android:id="@+id/iv_sort_emotional_stress"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_emotional_stress" android:id="@+id/rv_sort_emotional_stress"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginEnd="12dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:nestedScrollingEnabled="false"
/> android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_love_emotion" android:id="@+id/ll_sort_love_emotion"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="恋爱情感" android:text="恋爱情感"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_love_emotion" android:id="@+id/iv_sort_love_emotion"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_love_emotion" android:id="@+id/rv_sort_love_emotion"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_married_family" android:id="@+id/ll_sort_married_family"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="婚姻家庭" android:text="婚姻家庭"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_married_family" android:id="@+id/iv_sort_married_family"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_married_family" android:id="@+id/rv_sort_married_family"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_personal_growth" android:id="@+id/ll_sort_personal_growth"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="个人成长" android:text="个人成长"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_personal_growth" android:id="@+id/iv_sort_personal_growth"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_personal_growth" android:id="@+id/rv_sort_personal_growth"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_interpersonal_relationship" android:id="@+id/ll_sort_interpersonal_relationship"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="人际关系" android:text="人际关系"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_interpersonal_relationship" android:id="@+id/iv_sort_interpersonal_relationship"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_interpersonal_relationship" android:id="@+id/rv_sort_interpersonal_relationship"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_career_development" android:id="@+id/ll_sort_career_development"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="职场发展" android:text="职场发展"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_career_development" android:id="@+id/iv_sort_career_development"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_career_development" android:id="@+id/rv_sort_career_development"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
<LinearLayout <LinearLayout
android:id="@+id/ll_sort_mental_health" android:id="@+id/ll_sort_mental_health"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_25"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_21"
android:gravity="center_vertical"
>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:includeFontPadding="false"
android:text="心理健康" android:text="心理健康"
android:textSize="16sp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:includeFontPadding="false" android:textSize="16sp" />
android:fontFamily="sans-serif-medium" />
<ImageView <ImageView
android:id="@+id/iv_sort_mental_health" android:id="@+id/iv_sort_mental_health"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:src="@drawable/consultant_ic_sort_close" android:src="@drawable/consultant_ic_sort_close"
android:visibility="gone" android:visibility="gone" />
/>
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sort_mental_health" android:id="@+id/rv_sort_mental_health"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="138dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:overScrollMode="never" android:layout_marginEnd="12dp"
/> android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
...@@ -320,36 +319,35 @@ ...@@ -320,36 +319,35 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="68dp" android:layout_height="68dp"
android:background="@color/white"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="8dp" android:paddingTop="8dp"
android:background="@color/white" android:paddingEnd="16dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent">
>
<TextView <TextView
android:id="@+id/btn_reset" android:id="@+id/btn_reset"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="44dp" android:layout_height="44dp"
android:layout_weight="1"
android:background="@drawable/consultant_stroke_ebebeb_r_8" android:background="@drawable/consultant_stroke_ebebeb_r_8"
android:gravity="center" android:gravity="center"
android:text="@string/platform_reset" android:text="@string/platform_reset"
android:textSize="16sp" android:textColor="@color/platform_color_242424"
android:textColor="@color/platform_color_242424" /> android:textSize="16sp" />
<TextView <TextView
android:id="@+id/btnConfirm" android:id="@+id/btnConfirm"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="44dp" android:layout_height="44dp"
android:layout_marginStart="13dp" android:layout_marginStart="13dp"
android:layout_weight="1"
android:background="@drawable/consultant_solid_main_theme_color_r_8" android:background="@drawable/consultant_solid_main_theme_color_r_8"
android:gravity="center" android:gravity="center"
android:text="@string/platform_confirm" android:text="@string/platform_confirm"
android:textSize="16sp" android:textColor="@color/white"
android:textColor="@color/white" /> android:textSize="16sp" />
</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