Commit 62026965 by 刘鹏

Merge branch 'feat/diamond_category_zl' into 'd/v4.4.08'

金刚位全部跳转分类页,咨询列表页分类UI调整

See merge request app_android_lib/YDL-Component!324
parents 521e2162 a565bb91
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
*/ */
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_TEST; // public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD; public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库 // public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
......
...@@ -159,7 +159,7 @@ ext { ...@@ -159,7 +159,7 @@ ext {
"exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0", "exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0",
"free_reflection" : "me.weishu:free_reflection:2.0.0", "free_reflection" : "me.weishu:free_reflection:2.0.0",
"imagepicker" : "com.ydl:imagepicker:1.0.8.2", "imagepicker" : "com.ydl:imagepicker:1.0.8.2",
"pictureselector" : "com.ydl:pictureselector:1.2.0", "pictureselector" : "com.ydl:pictureselector:1.2.2",
"protector" : "com.ydl:protector:1.0.12@aar", "protector" : "com.ydl:protector:1.0.12@aar",
"blankUtil" : "com.blankj:utilcode:1.25.9", "blankUtil" : "com.blankj:utilcode:1.25.9",
"ydl-hnet" : "com.ydl:h-net:0.0.8", "ydl-hnet" : "com.ydl:h-net:0.0.8",
......
...@@ -7,17 +7,22 @@ ...@@ -7,17 +7,22 @@
android:name=".ExpertSearchActivity" android:name=".ExpertSearchActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/consultant_NoTitleTheme"/> android:theme="@style/consultant_NoTitleTheme" />
<activity
android:name=".ExpertEightCategoryActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/consultant_NoTitleTheme" />
<activity <activity
android:name=".HotSearchActivity" android:name=".HotSearchActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/consultant_NoTitleTheme"/> android:theme="@style/consultant_NoTitleTheme" />
<activity <activity
android:name=".ConsultAssistantCenterActivity" android:name=".ConsultAssistantCenterActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/consultant_Transparent"/> android:theme="@style/consultant_Transparent" />
<activity android:name=".preview.GridPreviewActivity" <activity android:name=".preview.GridPreviewActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
......
package com.yidianling.consultant
import android.annotation.SuppressLint
import android.view.WindowManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.model.SearchApi
import com.yidianling.consultant.model.bean.ChildrenBean
import com.yidianling.consultant.router.ConsultantIn
import com.yidianling.consultant.ui.view.topView.EightCategoryView
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.consultant_layout_eight_category.*
import kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
@Route(path = "/consult/eightcategory")
class ExpertEightCategoryActivity : BaseActivity() {
override fun layoutResId(): Int {
return R.layout.consultant_layout_eight_category
}
override fun getStatusViewOptions(): StatusBarOptions {
return StatusBarOptions(true, true)
}
@SuppressLint("CheckResult")
override fun initDataAndEvent() {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE or WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)
showProgressDialog()
SearchApi.getSearchApi()
.searchEightCategoryHotWord()
.compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ resp ->
dismissProgressDialog()
var mutableList = mutableListOf<MutableList<ChildrenBean>>()
resp.forEach {
it.children?.let { it1 -> mutableList.add(it1) }
}
mutableList.forEachIndexed { index, item ->
item.forEachIndexed { inin, childrenBean ->
if (inin < 8) {
childrenBean.isVisible = true
}
if (inin == 8) {
return@forEachIndexed
}
}
}
val eightCategoryView = EightCategoryView(this, true)
eightCategoryView.setData(mutableList, null, null, true)
eight_view_ll.addView(eightCategoryView)
}, { t ->
dismissProgressDialog()
})
btn_back.setOnClickListener {
onBackPressed()
}
btn_call.setOnClickListener {
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_ONLINE_CUSTOMER_CLICK)
ConsultantIn.startP2PXiaoYi(this)
}
tv_guide.setOnClickListener {
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_CONSULT_GUIDE_CLICK)
val h5param = H5Params(HttpConfig.H5_URL + "help/consultation/", "咨询指南")
h5param.isShowMenu = true
NewH5Activity.start(this, h5param)
}
rl_search.setOnClickListener {
ActionCountUtils.count(
ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_SEARCH_CLICK,
tv_search_content.hint.toString()
)
ARouter.getInstance()
.build("/consult/hot_search")
.withString(
ExpertSearchActivity.HOT_SEARCH_DOCTOR_NAME,
tv_search_content.text.toString()
)
.navigation()
}
}
}
\ No newline at end of file
...@@ -34,6 +34,7 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager ...@@ -34,6 +34,7 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.ui.LogoLoadingView import com.ydl.ydlcommon.ui.LogoLoadingView
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...@@ -47,6 +48,7 @@ import com.yidianling.consultant.adapter.ExpertSearchAdapter ...@@ -47,6 +48,7 @@ import com.yidianling.consultant.adapter.ExpertSearchAdapter
import com.yidianling.consultant.bean.ConsultantRecentCity import com.yidianling.consultant.bean.ConsultantRecentCity
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.POPUP_ICON_CLICK import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.POPUP_ICON_CLICK
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.PRICE_TYPE_CLICK
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.YDL_USER_CONSULT_SEARCH_CLICK import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.YDL_USER_CONSULT_SEARCH_CLICK
import com.yidianling.consultant.listener.OnCategoriesSelectedListener import com.yidianling.consultant.listener.OnCategoriesSelectedListener
import com.yidianling.consultant.listener.OnFilterConfirmListener import com.yidianling.consultant.listener.OnFilterConfirmListener
...@@ -83,6 +85,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -83,6 +85,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private var locationRegionItem: RegionItem? = null private var locationRegionItem: RegionItem? = null
private var locationList: ArrayList<SubItem>? = arrayListOf() private var locationList: ArrayList<SubItem>? = arrayListOf()
private var locationHistoryList: ArrayList<RegionItem>? = arrayListOf() private var locationHistoryList: ArrayList<RegionItem>? = arrayListOf()
private var eightcategoryPopup: EightCategoryPopupWindow? = null
override fun showImage(url: String?, imgView: ImageView) { override fun showImage(url: String?, imgView: ImageView) {
YDLImageCacheManager.showImage(ExpertSearchActivity@ this, url, imgView) YDLImageCacheManager.showImage(ExpertSearchActivity@ this, url, imgView)
} }
...@@ -126,6 +130,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -126,6 +130,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
const val EXTRA_CATEGORY_NAME = "category_name" const val EXTRA_CATEGORY_NAME = "category_name"
const val EXTRA_SHOW_TYPE = "showType" const val EXTRA_SHOW_TYPE = "showType"
const val EXTRA_FROM_PAGE = "fromPage" const val EXTRA_FROM_PAGE = "fromPage"
const val CATEID3IN = "cateid3in"
const val HOT_SEARCH_DOCTOR_NAME = "hot_search_doctor_name" const val HOT_SEARCH_DOCTOR_NAME = "hot_search_doctor_name"
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"
...@@ -213,6 +218,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -213,6 +218,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private val doctorList = ArrayList<ExpertServiceItem>() private val doctorList = ArrayList<ExpertServiceItem>()
private var hasMore = true private var hasMore = true
private var initCategory = "0" private var initCategory = "0"
private var hasCateid = "0"
private var initCategoryCateid3 = "0"
private var initShowType: Int = 1 private var initShowType: Int = 1
var mapFilter: Map<String, Any>? = null var mapFilter: Map<String, Any>? = null
...@@ -411,6 +418,12 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -411,6 +418,12 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
mapFilter = mIntent.getSerializableExtra(GO_CRITERIA) as HashMap<String, Any> mapFilter = mIntent.getSerializableExtra(GO_CRITERIA) as HashMap<String, Any>
} }
initCategory = mIntent.getStringExtra("cateId") ?: "" initCategory = mIntent.getStringExtra("cateId") ?: ""
initCategoryCateid3 = mIntent.getStringExtra(CATEID3IN) ?: ""
if (!TextUtils.isEmpty(initCategoryCateid3) && initCategoryCateid3 != "0") {
allFilter.categoryId3List.add(initCategoryCateid3)
}
if (mIntent.getStringExtra("cateTitle") != null) { if (mIntent.getStringExtra("cateTitle") != null) {
cateName = mIntent.getStringExtra("cateTitle") cateName = mIntent.getStringExtra("cateTitle")
} }
...@@ -430,10 +443,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -430,10 +443,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
if (!TextUtils.isEmpty(initCategory) && initCategory != "0") { if (!TextUtils.isEmpty(initCategory) && initCategory != "0") {
allFilter.categoryId2List.add(initCategory) allFilter.categoryId2List.add(initCategory)
} }
if (!TextUtils.isEmpty(cateName)) {
tvSubject.text = cateName
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
}
getPresenter().fetchListHead() getPresenter().fetchListHead()
recommendListView.requestData(initCategory) recommendListView.requestData(initCategory)
...@@ -461,13 +470,43 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -461,13 +470,43 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
v_loading.visibility = View.VISIBLE v_loading.visibility = View.VISIBLE
v_loading.setViewType(LogoLoadingView.TYPE_LOADING, null) v_loading.setViewType(LogoLoadingView.TYPE_LOADING, null)
hasCateid = mIntent.getStringExtra(IYDLRouterConstant.HASCATEID) ?: ""
doctorAdapter.clickCount = 0 doctorAdapter.clickCount = 0
doctorAdapter.setIsRecommendWords(isRecommendWords) doctorAdapter.setIsRecommendWords(isRecommendWords)
doctorAdapter.setEntrance(1) doctorAdapter.setEntrance(1)
getPresenter().fetchFunctionWord(2) getPresenter().fetchFunctionWord(2)
} }
private fun hasCateid() {
//金刚位传递过来的cateid 如果八大分类 contain这个cateid就显示。否则不显示。
val mutableList = mutableListOf<MutableList<ChildrenBean>>()
mutableList.add(allFilter.childList)
mutableList.add(allFilter.stressList)
mutableList.add(allFilter.loveEmotionList)
mutableList.add(allFilter.marriedFamilyList)
mutableList.add(allFilter.personalGrowthList)
mutableList.add(allFilter.interpersonalRelationshipList)
mutableList.add(allFilter.careerDevelopmentList)
mutableList.add(allFilter.mentalHealthList)
var isShow = false
mutableList.forEachIndexed { index, item ->
if (item[0].cate_id == hasCateid) {
item[0].isSelected = true
isShow = true
}
}
if (isShow) {
if (!TextUtils.isEmpty(cateName)) {
tvSubject.text = cateName
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
}
} else {
tvSubject.text = "困扰"
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_NORMAL)
}
}
override fun onNewIntent(intent: Intent?) { override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent) super.onNewIntent(intent)
initData(intent!!, true) initData(intent!!, true)
...@@ -543,6 +582,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -543,6 +582,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
allFilter.mentalHealthList.add(childrenBean) allFilter.mentalHealthList.add(childrenBean)
} }
} }
hasCateid()
} }
override fun onFunctionWordFetched(wordBean: MutableList<FunctionWordBean>) { override fun onFunctionWordFetched(wordBean: MutableList<FunctionWordBean>) {
...@@ -1025,7 +1065,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1025,7 +1065,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
hideSoftInput() hideSoftInput()
appbar_layout.setExpanded(false) appbar_layout.setExpanded(false)
appbar_layout.postDelayed({ appbar_layout.postDelayed({
showSubjectPopupWindow() // showSubjectPopupWindow()
showeightCategoryPopupWindow()
}, 300) }, 300)
} }
...@@ -1079,6 +1120,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1079,6 +1120,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
appbar_layout.setExpanded(false) appbar_layout.setExpanded(false)
appbar_layout.postDelayed({ appbar_layout.postDelayed({
updateFilterTextViewStatus(tvSort, FILTER_STATUS_OPEN) updateFilterTextViewStatus(tvSort, FILTER_STATUS_OPEN)
ActionCountUtils.count(PRICE_TYPE_CLICK)
showPricePopupWindow() showPricePopupWindow()
}, 300) }, 300)
...@@ -1382,7 +1424,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1382,7 +1424,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
tempFilter, this tempFilter, this
) )
} }
pricePopup!!.setOnDismissListener { pricePopup?.setOnDismissListener {
if (tempFilter.priceRanges != null) { if (tempFilter.priceRanges != null) {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSort, FILTER_STATUS_FILTERED)
} else { } else {
...@@ -1665,11 +1707,28 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1665,11 +1707,28 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
} }
/** /**
* 显示八大类弹窗
*/
private fun showeightCategoryPopupWindow() {
eightcategoryPopup = EightCategoryPopupWindow(this, allFilter)
eightcategoryPopup?.setListener(this)
eightcategoryPopup?.setOnDismissListener {
viewDim.visibility = View.INVISIBLE
ConsultAssistantDialogUtils.INSTANCE.fitRequest(this, "doctor_list", true)
}
ConsultAssistantDialogUtils.INSTANCE.hideAssistantActivity()
eightcategoryPopup?.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
}
/**
* 主题选择确认回调 * 主题选择确认回调
* *
* 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态 * 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态
*/ */
override fun onCategoriesSelected(signLit: ArrayList<String>) { override fun onCategoriesSelected(signLit: ArrayList<String>) {
eightcategoryPopup?.dismiss()
if (signLit.isNotEmpty()) { if (signLit.isNotEmpty()) {
val sign1 = signLit.joinToString(",") { it } val sign1 = signLit.joinToString(",") { it }
ActionCountUtils.baiDuCountSign3( ActionCountUtils.baiDuCountSign3(
......
...@@ -50,6 +50,7 @@ import com.yidianling.common.tools.ToastUtil ...@@ -50,6 +50,7 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.adapter.ExpertSearchAdapter import com.yidianling.consultant.adapter.ExpertSearchAdapter
import com.yidianling.consultant.bean.ConsultantRecentCity import com.yidianling.consultant.bean.ConsultantRecentCity
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.PRICE_TYPE_CLICK
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.REFUSE_ALREADY import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.REFUSE_ALREADY
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.WHETHER_LOCATION_AUTH import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.WHETHER_LOCATION_AUTH
import com.yidianling.consultant.listener.* import com.yidianling.consultant.listener.*
...@@ -96,6 +97,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -96,6 +97,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
private var locationRegionItem: RegionItem? = null private var locationRegionItem: RegionItem? = null
private var locationList: ArrayList<SubItem>? = arrayListOf() private var locationList: ArrayList<SubItem>? = arrayListOf()
private var locationHistoryList: ArrayList<RegionItem>? = arrayListOf() private var locationHistoryList: ArrayList<RegionItem>? = arrayListOf()
private var eightcategoryPopup: EightCategoryPopupWindow? = null
override fun layoutResId(): Int { override fun layoutResId(): Int {
return R.layout.consultant_activity_expert_search_list return R.layout.consultant_activity_expert_search_list
...@@ -908,7 +910,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -908,7 +910,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
hideSoftInput() hideSoftInput()
appbar_layout.setExpanded(false) appbar_layout.setExpanded(false)
appbar_layout.postDelayed({ appbar_layout.postDelayed({
showSubjectPopupWindow() // showSubjectPopupWindow()
showeightCategoryPopupWindow()
}, 300) }, 300)
} }
...@@ -953,6 +956,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -953,6 +956,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
appbar_layout.setExpanded(false) appbar_layout.setExpanded(false)
appbar_layout.postDelayed({ appbar_layout.postDelayed({
updateFilterTextViewStatus(tvSort, FILTER_STATUS_OPEN) updateFilterTextViewStatus(tvSort, FILTER_STATUS_OPEN)
ActionCountUtils.count(PRICE_TYPE_CLICK)
showPricePopupWindow() showPricePopupWindow()
}, 300) }, 300)
...@@ -1518,10 +1522,27 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1518,10 +1522,27 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
/** /**
* 显示八大类弹窗
*/
private fun showeightCategoryPopupWindow() {
eightcategoryPopup = EightCategoryPopupWindow(mActivity, allFilter)
eightcategoryPopup?.setListener(this)
eightcategoryPopup?.setOnDismissListener {
viewDim.visibility = View.INVISIBLE
showConsultAssistantDialog()
}
hideConsultAssistantDialog()
eightcategoryPopup?.showAsDropDown(viewSep2)
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_OPEN)
viewDim.visibility = View.VISIBLE
}
/**
* 主题选择确认回调 * 主题选择确认回调
* *
*/ */
override fun onCategoriesSelected(signLit: ArrayList<String>) { override fun onCategoriesSelected(signLit: ArrayList<String>) {
eightcategoryPopup?.dismiss()
if (signLit.isNotEmpty()) { if (signLit.isNotEmpty()) {
val sign1 = signLit.joinToString(",") { it } val sign1 = signLit.joinToString(",") { it }
ActionCountUtils.baiDuCountSign3( ActionCountUtils.baiDuCountSign3(
......
...@@ -127,6 +127,9 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -127,6 +127,9 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
} }
if (allFilter.sub.code != null&&allFilter.sub.code!=allFilter.region.code) { if (allFilter.sub.code != null&&allFilter.sub.code!=allFilter.region.code) {
filterMap["city_code"] = allFilter.sub.code filterMap["city_code"] = allFilter.sub.code
if (allFilter.sub.provinceCode.isNotEmpty()) {
filterMap["province_code"] = allFilter.sub.provinceCode
}
} }
} }
// 咨询方式 // 咨询方式
......
package com.yidianling.consultant.adapter
import android.annotation.SuppressLint
import android.content.Context
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.yidianling.consultant.R
import com.yidianling.consultant.model.bean.ChildrenBean
import com.yidianling.consultant.model.bean.EightCategoryBean
import kotlinx.android.synthetic.main.consultant_layout_category_view.*
import kotlinx.android.synthetic.main.eight_category_detail_list_item.view.*
import kotlinx.android.synthetic.main.eight_category_list_item.view.*
/**
* Created by zqk on 17-9-20.
*/
class CategoryDetailAdapter(
private val context: Context,
private val categoryDetailList: MutableList<MutableList<ChildrenBean>>,
private val categoryNamelList: MutableList<EightCategoryBean>,
) : RecyclerView.Adapter<CategoryDetailAdapter.ViewHolder>() {
lateinit var outAdapterClicklistener: OutAdapterClicklistener
override fun getItemCount(): Int = categoryNamelList.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val itemView =
LayoutInflater.from(context)
.inflate(R.layout.eight_category_detail_list_item, parent, false)
return ViewHolder(itemView)
}
override fun onBindViewHolder(holder: ViewHolder, @SuppressLint("RecyclerView") position: Int) {
holder.category_name.text = categoryNamelList[position].string
val eightCategoryAdapter = CategoryDetailTextAdapter(context, categoryDetailList[position])
eightCategoryAdapter.setOnClick(object :
CategoryDetailTextAdapter.TextAdapterOnclickListener {
override fun textOnClick(textPosition: Int) {
outAdapterClicklistener.outAdapterClick(position, textPosition)
}
})
if (categoryDetailList[position].size > 9) {
holder.collapse_hide.visibility = View.VISIBLE
holder.arrow_collapse_hide.visibility = View.VISIBLE
} else {
holder.collapse_hide.visibility = View.GONE
holder.arrow_collapse_hide.visibility = View.GONE
}
if (categoryNamelList[position].collapse) {
eightCategoryAdapter.setAllVisible()
holder.collapse_hide.text = "收起"
holder.arrow_collapse_hide.background =
context.resources.getDrawable(R.drawable.consult_hide_arrow)
} else {
eightCategoryAdapter.setGone()
holder.collapse_hide.text = "展开"
holder.arrow_collapse_hide.background =
context.resources.getDrawable(R.drawable.consult_collapse_arrow)
}
holder.collapse_hide.setOnClickListener {
if (categoryNamelList[position].collapse) {
//显示 展开
categoryNamelList[position].collapse = false
holder.collapse_hide.text = "展开"
holder.arrow_collapse_hide.background =
context.resources.getDrawable(R.drawable.consult_collapse_arrow)
eightCategoryAdapter.setGone()
} else {
//显示收起
categoryNamelList[position].collapse = true
holder.collapse_hide.text = "收起"
holder.arrow_collapse_hide.background =
context.resources.getDrawable(R.drawable.consult_hide_arrow)
eightCategoryAdapter.setAllVisible()
}
}
holder.category_list_detail.layoutManager = GridLayoutManager(context, 3)
holder.category_list_detail.adapter = eightCategoryAdapter
}
interface OutAdapterClicklistener {
fun outAdapterClick(outPosition: Int, inPosition: Int)
}
fun setOutClicklistener(listener: OutAdapterClicklistener) {
this.outAdapterClicklistener = listener
}
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val category_name = itemView.category_name
val category_list_detail = itemView.category_list_detail
val collapse_hide = itemView.collapse_hide
val arrow_collapse_hide = itemView.arrow_collapse_hide
}
}
\ No newline at end of file
package com.yidianling.consultant.adapter
import android.annotation.SuppressLint
import android.content.Context
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.yidianling.consultant.R
import com.yidianling.consultant.model.bean.ChildrenBean
import kotlinx.android.synthetic.main.consultant_layout_category_view.*
import kotlinx.android.synthetic.main.eight_category_detail_item_item.view.*
import kotlinx.android.synthetic.main.eight_category_detail_list_item.view.*
import kotlinx.android.synthetic.main.eight_category_list_item.view.*
/**
* Created by zqk on 17-9-20.
*/
class CategoryDetailTextAdapter(
private val context: Context,
private val categoryDetailList: MutableList<ChildrenBean>,
) : RecyclerView.Adapter<CategoryDetailTextAdapter.ViewHolder>() {
var isVisible = false
lateinit var textAdapterOnclickListener: TextAdapterOnclickListener
override fun getItemCount(): Int = categoryDetailList.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val itemView =
LayoutInflater.from(context)
.inflate(R.layout.eight_category_detail_item_item, parent, false)
return ViewHolder(itemView)
}
@SuppressLint("UseCompatLoadingForDrawables")
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var param = RecyclerView.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
);
if (categoryDetailList[position].isVisible) {
param.height = ViewGroup.LayoutParams.WRAP_CONTENT
param.width = ViewGroup.LayoutParams.MATCH_PARENT
param.setMargins(0, 0, 10, 10)
holder.itemView.visibility = View.VISIBLE
} else {
param.height = 0
param.width = 0
holder.itemView.visibility = View.GONE;
}
holder.itemView.layoutParams = param
holder.category_name_detail.text = categoryDetailList[position].cate_name
holder.category_name_detail.isSelected = categoryDetailList[position].isSelected
if (categoryDetailList[position].isSelected) {
holder.category_name_detail.setTextColor(context.resources.getColor(R.color.platform_main_theme))
holder.category_name_detail.background =
context.getDrawable(R.drawable.consult_price_expert_selected)
} else {
holder.category_name_detail.background =
context.getDrawable(R.drawable.consult_price_expert_unseleted)
holder.category_name_detail.setTextColor(context.resources.getColor(R.color.platform_color_333333))
}
holder.itemView.setOnClickListener {
textAdapterOnclickListener.textOnClick(position)
}
}
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val category_name_detail = itemView.category_name_detail
}
interface TextAdapterOnclickListener {
fun textOnClick(position: Int)
}
fun setOnClick(adapterOnclickListener: TextAdapterOnclickListener) {
this.textAdapterOnclickListener = adapterOnclickListener
}
fun setAllVisible() {
categoryDetailList.forEach { bean ->
bean.isVisible = true
}
notifyDataSetChanged()
isVisible = true
}
fun setGone() {
categoryDetailList.forEachIndexed { index, bean ->
if (index > 8) {
bean.isVisible = false
}
}
notifyDataSetChanged()
isVisible = false
}
}
\ No newline at end of file
package com.yidianling.consultant.adapter
import android.annotation.SuppressLint
import android.content.Context
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import com.yidianling.consultant.R
import com.yidianling.consultant.model.bean.EightCategoryBean
import kotlinx.android.synthetic.main.eight_category_list_item.view.*
/**
* Created by zqk on 17-9-20.
*/
class EightCategoryAdapter(
private val context: Context,
private val eightCateList: MutableList<EightCategoryBean>,
private val singleMultiple: Boolean
) : RecyclerView.Adapter<EightCategoryAdapter.ViewHolder>() {
lateinit var onLeftClickListener: OnLeftClickListener
override fun getItemCount(): Int = eightCateList.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val itemView =
LayoutInflater.from(context).inflate(R.layout.eight_category_list_item, parent, false)
return ViewHolder(itemView)
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.eight_name.text = eightCateList[position].string
holder.itemView.setOnClickListener {
onLeftClickListener.onLeftClick(position)
}
if (eightCateList[position].selected) {
holder.itemView.setBackgroundColor(ContextCompat.getColor(context, R.color.white))
holder.eight_name.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_main_theme
)
)
if (singleMultiple) {
holder.single_selected_tag.visibility = View.VISIBLE
} else {
holder.single_selected_tag.visibility = View.INVISIBLE
}
} else {
holder.eight_name.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_color_242424
)
)
holder.single_selected_tag.visibility = View.INVISIBLE
holder.itemView.setBackgroundColor(
ContextCompat.getColor(
context,
R.color.platform_color_F7F7F7
)
)
}
if (eightCateList[position].hasData) {
holder.multiple_choise.visibility = View.VISIBLE
} else {
holder.multiple_choise.visibility = View.INVISIBLE
}
}
interface OnLeftClickListener {
fun onLeftClick(leftPosition: Int)
}
fun setleftClick(leftListener: OnLeftClickListener) {
this.onLeftClickListener = leftListener
}
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val eight_name = itemView.eight_name
val multiple_choise = itemView.multiple_choise
val single_selected_tag = itemView.single_selected_tag
}
}
\ No newline at end of file
...@@ -79,6 +79,7 @@ class ConsultBIConstants { ...@@ -79,6 +79,7 @@ class ConsultBIConstants {
const val PRICE_CHOICE_CLICK = "$CONSULT_FILTER_PRICE_PAGE|price_choice_click" const val PRICE_CHOICE_CLICK = "$CONSULT_FILTER_PRICE_PAGE|price_choice_click"
const val PRICE_SLIDE_CLICK = "$CONSULT_FILTER_PRICE_PAGE|price_slide_click" const val PRICE_SLIDE_CLICK = "$CONSULT_FILTER_PRICE_PAGE|price_slide_click"
const val BOTTOM_ICON_CLICK = "$CONSULT_FILTER_PRICE_PAGE|bottom_icon_click" const val BOTTOM_ICON_CLICK = "$CONSULT_FILTER_PRICE_PAGE|bottom_icon_click"
const val PRICE_TYPE_CLICK = "$CONSULT_FILTER_PRICE_PAGE|price_type_click"
} }
} }
class ConsultSearchListEvent { class ConsultSearchListEvent {
...@@ -113,4 +114,24 @@ class ConsultBIConstants { ...@@ -113,4 +114,24 @@ class ConsultBIConstants {
const val RECENT_CITY = "recent_city" const val RECENT_CITY = "recent_city"
} }
} }
class Experts {
companion object {
//part_id
const val EXPERTS_DETAIL = "ydl_experts_detail|"
//2.专家主页_背景图私聊点击 sign1: 咨询师id
const val EXPERT_BANNER_PRIVATE_CHAT_CLICK =
EXPERTS_DETAIL + "expert_banner_private_chat_click"
//3.专家主页_背景图预约点击 sign1: 咨询师id
const val EXPERT_BANNER_IMMEDIATELY_BOOKING_CLICK = EXPERTS_DETAIL +
"expert_banner_immediately_booking_click"
//3.专家主页_背景图预约点击 sign1: 咨询师id
const val BOOKING_PRODUCT_POPUP_PAGE_CLICK = EXPERTS_DETAIL +
"booking_product_popup_page_click"
}
}
} }
\ No newline at end of file
...@@ -13,11 +13,6 @@ import android.view.View ...@@ -13,11 +13,6 @@ import android.view.View
import android.view.WindowManager import android.view.WindowManager
import com.facebook.drawee.backends.pipeline.Fresco import com.facebook.drawee.backends.pipeline.Fresco
import com.facebook.drawee.interfaces.DraweeController import com.facebook.drawee.interfaces.DraweeController
import com.facebook.imagepipeline.common.ResizeOptions
import com.facebook.imagepipeline.common.RotationOptions
import com.facebook.imagepipeline.postprocessors.IterativeBoxBlurPostProcessor
import com.facebook.imagepipeline.request.ImageRequest
import com.facebook.imagepipeline.request.ImageRequestBuilder
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils import com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
...@@ -33,7 +28,6 @@ class ConsultAssistantDialog( ...@@ -33,7 +28,6 @@ class ConsultAssistantDialog(
mContext: Context, mContext: Context,
val consultAssistantClickListener: OnConsultAssistantClickListener? val consultAssistantClickListener: OnConsultAssistantClickListener?
) : Dialog(mContext, R.style.consultant_expert_dialog_default_style) { ) : Dialog(mContext, R.style.consultant_expert_dialog_default_style) {
private var animate: ObjectAnimator? = null private var animate: ObjectAnimator? = null
private var minWidth: Int? = null private var minWidth: Int? = null
...@@ -41,16 +35,16 @@ class ConsultAssistantDialog( ...@@ -41,16 +35,16 @@ class ConsultAssistantDialog(
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.consultant_expert_consult_assistant_popup_window) setContentView(R.layout.consultant_expert_consult_assistant_popup_window)
val params = window.attributes val params = window?.attributes
params.width = WindowManager.LayoutParams.WRAP_CONTENT params?.width = WindowManager.LayoutParams.WRAP_CONTENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT params?.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity = Gravity.RIGHT + Gravity.BOTTOM params?.gravity = Gravity.RIGHT + Gravity.BOTTOM
params.verticalMargin = 0.07f params?.verticalMargin = 0.07f
params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE //不拦截外部点击事件 params?.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE //不拦截外部点击事件
window.attributes = params window?.attributes = params
window.setDimAmount(0f) window?.setDimAmount(0f)
window.setWindowAnimations(R.style.consultant_expert_consult_assistant_dialog_animate) window?.setWindowAnimations(R.style.consultant_expert_consult_assistant_dialog_animate)
if (!ConsultAssistantDialogUtils.INSTANCE.canShowDesc()) { if (!ConsultAssistantDialogUtils.INSTANCE.canShowDesc()) {
consultant_assistant_dialog_desc_ll.visibility = View.GONE consultant_assistant_dialog_desc_ll.visibility = View.GONE
...@@ -84,12 +78,14 @@ class ConsultAssistantDialog( ...@@ -84,12 +78,14 @@ class ConsultAssistantDialog(
} }
override fun onAnimationEnd(animation: Animator?) { override fun onAnimationEnd(animation: Animator?) {
ConsultAssistantDialogUtils.INSTANCE.setDescHide() if (ownerActivity != null) {
hide() ConsultAssistantDialogUtils.INSTANCE.setDescHide()
// show() hide()
Handler().postDelayed({ Handler().postDelayed({
show() show()
}, 10) }, 10)
}
} }
override fun onAnimationCancel(animation: Animator?) { override fun onAnimationCancel(animation: Animator?) {
...@@ -130,21 +126,21 @@ class ConsultAssistantDialog( ...@@ -130,21 +126,21 @@ class ConsultAssistantDialog(
// 刷新dialog布局,减小拦截点击区域 // 刷新dialog布局,减小拦截点击区域
fun refreshDialogLayout(width: Int) { fun refreshDialogLayout(width: Int) {
val params = window.attributes val params = window?.attributes
if (width != 0) { minWidth = if (width != 0) {
minWidth = width width
} else { } else {
minWidth = (RxImageTool.dp2px(60f) * 1.5).toInt() (RxImageTool.dp2px(60f) * 1.5).toInt()
} }
params.width = minWidth!! params?.width = minWidth
params.height = WindowManager.LayoutParams.WRAP_CONTENT params?.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity = Gravity.RIGHT + Gravity.BOTTOM params?.gravity = Gravity.RIGHT + Gravity.BOTTOM
params.verticalMargin = 0.07f params?.verticalMargin = 0.07f
params.horizontalMargin = 0.01f params?.horizontalMargin = 0.01f
window.setWindowAnimations(0) window?.setWindowAnimations(0)
window.attributes = params window?.attributes = params
} }
interface OnConsultAssistantClickListener { interface OnConsultAssistantClickListener {
......
...@@ -7,10 +7,7 @@ import com.ydl.ydlcommon.data.http.BaseAPIResponse ...@@ -7,10 +7,7 @@ import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlnet.YDLHttpUtils import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.consultant.bean.* import com.yidianling.consultant.bean.*
import com.yidianling.consultant.model.bean.ExpertBean import com.yidianling.consultant.model.bean.*
import com.yidianling.consultant.model.bean.FunctionWordBean
import com.yidianling.consultant.model.bean.HeadData
import com.yidianling.consultant.model.bean.PromptPaymentBean
import io.reactivex.Observable import io.reactivex.Observable
import retrofit2.http.* import retrofit2.http.*
...@@ -42,6 +39,11 @@ interface SearchApi { ...@@ -42,6 +39,11 @@ interface SearchApi {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun searchConditions(@Query("cateSource") cateSource: Int): Observable<BaseAPIResponse<HeadData>> fun searchConditions(@Query("cateSource") cateSource: Int): Observable<BaseAPIResponse<HeadData>>
//查询八大类目包括
@GET("consult/search/v3/mix-cates")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun searchEightCategoryHotWord(): Observable<BaseAPIResponse<MutableList<CateItem>>>
//查询功能词、底纹词 //查询功能词、底纹词
//(1热门词,2底纹词,3跳转词) //(1热门词,2底纹词,3跳转词)
@POST("function/word/queryList") @POST("function/word/queryList")
......
package com.yidianling.consultant.model.bean
data class EightCategoryBean(
val string: String,
var collapse: Boolean = false,
var selected: Boolean = false,
var hasData: Boolean = false
)
\ No newline at end of file
...@@ -15,5 +15,6 @@ data class SubItem( ...@@ -15,5 +15,6 @@ data class SubItem(
@field:SerializedName("code") @field:SerializedName("code")
var code: String? = null, var code: String? = null,
var locationCode: String? = "" var locationCode: String? = "",
var provinceCode: String = ""
) : Parcelable ) : Parcelable
\ No newline at end of file
...@@ -13,13 +13,14 @@ import androidx.fragment.app.FragmentStatePagerAdapter ...@@ -13,13 +13,14 @@ import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType
import com.yidianling.consultant.preview.SmoothImageView.onTransformListener import com.yidianling.consultant.preview.SmoothImageView.onTransformListener
import com.yidianling.im.api.listener.ApiStringResponseCallback import com.yidianling.im.api.listener.ApiStringResponseCallback
import com.yidianling.im.api.service.IImService import com.yidianling.im.api.service.IImService
import kotlinx.android.synthetic.main.consultant_image_preview_photo.* import kotlinx.android.synthetic.main.consultant_image_preview_photo.*
import kotlinx.android.synthetic.main.fragment_image_photo_layout.*
import java.util.* import java.util.*
/** /**
...@@ -88,6 +89,7 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -88,6 +89,7 @@ class GPreviewActivity : AppCompatActivity() {
titleBar = findViewById(R.id.titleBar) titleBar = findViewById(R.id.titleBar)
chatBtn.setOnClickListener { chatBtn.setOnClickListener {
//私聊
if (!toUid.isNullOrBlank()) { if (!toUid.isNullOrBlank()) {
ModularServiceManager.provide(IImService::class.java) ModularServiceManager.provide(IImService::class.java)
.startChat(this@GPreviewActivity, toUid.toString(), 0x001, 0, 0, false) .startChat(this@GPreviewActivity, toUid.toString(), 0x001, 0, 0, false)
...@@ -102,14 +104,32 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -102,14 +104,32 @@ class GPreviewActivity : AppCompatActivity() {
} }
}, 2000) }, 2000)
ActionCountUtils.count(
ConsultBIConstants.Experts.EXPERT_BANNER_PRIVATE_CHAT_CLICK,
toUid.toString()
)
} }
} }
bookingBtn.setOnClickListener { bookingBtn.setOnClickListener {
ModularServiceManager.provide(IImService::class.java) toUid?.let { toUid ->
.showConsultServiceDialog(activity = this, toUid = toUid!!, doctorId = doctorId!!) doctorId?.let { doctorId ->
ModularServiceManager.provide(IImService::class.java)
.showConsultServiceDialog(
activity = this,
toUid = toUid,
doctorId = doctorId
)
}
ActionCountUtils.count(
ConsultBIConstants.Experts.EXPERT_BANNER_IMMEDIATELY_BOOKING_CLICK,
toUid
)
}
} }
......
...@@ -140,6 +140,9 @@ class AreaPopupWindow( ...@@ -140,6 +140,9 @@ class AreaPopupWindow(
//倒序保留最近五次的搜索历史记录并去重 //倒序保留最近五次的搜索历史记录并去重
private fun saveCitySearchRecord(data: SubItem) { private fun saveCitySearchRecord(data: SubItem) {
if (data.value == "不限") return if (data.value == "不限") return
if (selectedRegion.code.toString() != "0") data.provinceCode =
selectedRegion.code.toString()
recentCityBean?.let { recentCityBean?.let {
if (it.recentCity.size < 5) { if (it.recentCity.size < 5) {
it.recentCity.add(0, data) it.recentCity.add(0, data)
......
package com.yidianling.consultant.ui.view
import android.content.Context
import android.graphics.drawable.BitmapDrawable
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.PopupWindow
import androidx.fragment.app.FragmentActivity
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.asFragmentActivity
import com.yidianling.consultant.R
import com.yidianling.consultant.adapter.SortAdapter
import com.yidianling.consultant.layoutmanager.FlowLayoutManager
import com.yidianling.consultant.listener.OnCategoriesSelectedListener
import com.yidianling.consultant.model.bean.AllFilter
import com.yidianling.consultant.model.bean.ChildrenBean
import com.yidianling.consultant.ui.view.topView.EightCategoryView
import kotlinx.android.synthetic.main.consultant_ui_eight_category_popup_window.view.*
import kotlinx.android.synthetic.main.consultant_ui_subject_popup_window.view.*
import kotlinx.android.synthetic.main.consultant_ui_subject_popup_window.view.btnConfirm
import kotlinx.android.synthetic.main.consultant_ui_subject_popup_window.view.btn_reset
/**
* 主题弹窗
* Created by zqk on 17-9-15.
*/
class EightCategoryPopupWindow(context: Context, allFilter: AllFilter) :
PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, RxImageTool.dp2px(566f)) {
private var view: View = LayoutInflater.from(context)
.inflate(R.layout.consultant_ui_eight_category_popup_window, null)
var mAllFilter: AllFilter
private var context: Context
var onSubjectsSelectedListener: OnCategoriesSelectedListener? = null
lateinit var mutableList: MutableList<MutableList<ChildrenBean>>
private val signList = ArrayList<String>() // 用于埋点
init {
this.contentView = view
this.isFocusable = true
this.context = context
@Suppress("DEPRECATION")
this.setBackgroundDrawable(BitmapDrawable())
this.isOutsideTouchable = true
mAllFilter = allFilter
initView()
}
fun setListener(onSubjectsSelectedListener: OnCategoriesSelectedListener) {
this.onSubjectsSelectedListener = onSubjectsSelectedListener
val eightCategoryView = EightCategoryView(context, false)
eightCategoryView.setData(mutableList, mAllFilter, onSubjectsSelectedListener, false)
view.eight_category_fl.addView(eightCategoryView)
}
private fun initView() {
inputMethodMode = INPUT_METHOD_NEEDED
mutableList = mutableListOf<MutableList<ChildrenBean>>()
mutableList.add(mAllFilter.childList)
mutableList.add(mAllFilter.stressList)
mutableList.add(mAllFilter.loveEmotionList)
mutableList.add(mAllFilter.marriedFamilyList)
mutableList.add(mAllFilter.personalGrowthList)
mutableList.add(mAllFilter.interpersonalRelationshipList)
mutableList.add(mAllFilter.careerDevelopmentList)
mutableList.add(mAllFilter.mentalHealthList)
// val fragmentTransaction = context?.asFragmentActivity()?.supportFragmentManager?.beginTransaction()
// val searchFragment=ConsultCategoryFragment()
// fragmentTransaction?.add(R.id.eight_category_fl,searchFragment)?.commit()
}
}
\ No newline at end of file
...@@ -4,21 +4,14 @@ import android.annotation.SuppressLint ...@@ -4,21 +4,14 @@ 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.text.* import android.text.TextUtils
import android.text.style.AbsoluteSizeSpan
import android.util.Log import android.util.Log
import android.view.KeyEvent
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager
import android.widget.* import android.widget.*
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.google.android.material.slider.LabelFormatter
import com.google.android.material.slider.RangeSlider
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.LogUtil
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
...@@ -29,11 +22,10 @@ import com.yidianling.consultant.model.bean.AllFilter ...@@ -29,11 +22,10 @@ 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 com.yidianling.consultant.model.bean.ReorderItem import com.yidianling.consultant.model.bean.ReorderItem
import com.yidianling.consultant.ui.view.rangeseekbar.OnRangeChangedListener
import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar
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_ui_filter_popup.view.* import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.*
import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.btnConfirm
import kotlinx.android.synthetic.main.consultant_ui_subject_popup_window.view.*
import kotlin.math.roundToInt import kotlin.math.roundToInt
...@@ -51,7 +43,6 @@ class FilterPopupWindow( ...@@ -51,7 +43,6 @@ class FilterPopupWindow(
private val showTypeViews: ArrayList<View> = ArrayList() private val showTypeViews: ArrayList<View> = ArrayList()
private val enquiryViews: ArrayList<View> = ArrayList() private val enquiryViews: ArrayList<View> = ArrayList()
private val priceRangeViews: ArrayList<View> = ArrayList()
private val ageViews: ArrayList<View> = ArrayList() private val ageViews: ArrayList<View> = ArrayList()
private val otherViews: ArrayList<View> = ArrayList() private val otherViews: ArrayList<View> = ArrayList()
private val ziZhiViews: ArrayList<View> = ArrayList() private val ziZhiViews: ArrayList<View> = ArrayList()
...@@ -69,9 +60,6 @@ class FilterPopupWindow( ...@@ -69,9 +60,6 @@ class FilterPopupWindow(
private val popWidth = (RxDeviceTool.getScreenWidth(context)) private val popWidth = (RxDeviceTool.getScreenWidth(context))
var etMinPrice: EditText? = null
var etMaxPrice: EditText? = null
init { init {
val view = LayoutInflater.from(context).inflate(R.layout.consultant_ui_filter_popup, null) val view = LayoutInflater.from(context).inflate(R.layout.consultant_ui_filter_popup, null)
...@@ -105,7 +93,6 @@ class FilterPopupWindow( ...@@ -105,7 +93,6 @@ class FilterPopupWindow(
//学历选择 //学历选择
initEduViews(view) initEduViews(view)
initKeyboardListener(view)
updateCount() updateCount()
view.btnReset.setOnClickListener { view.btnReset.setOnClickListener {
...@@ -124,6 +111,7 @@ class FilterPopupWindow( ...@@ -124,6 +111,7 @@ class FilterPopupWindow(
@SuppressLint("UseCompatLoadingForDrawables") @SuppressLint("UseCompatLoadingForDrawables")
private fun initShowSortViews(view: View) { private fun initShowSortViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flSortType.removeAllViews()
for ((index, enquiry) in sortItems.withIndex()) { for ((index, enquiry) in sortItems.withIndex()) {
val llTextView = val llTextView =
View.inflate(context, R.layout.consultant_item_filter, null) as TextView View.inflate(context, R.layout.consultant_item_filter, null) as TextView
...@@ -177,33 +165,11 @@ class FilterPopupWindow( ...@@ -177,33 +165,11 @@ class FilterPopupWindow(
} }
} }
@SuppressLint("ClickableViewAccessibility")
private fun initKeyboardListener(view: View) {
val svFilter = view.findViewById<ScrollView>(R.id.sv_filter)
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
svFilter.setOnTouchListener { _, _ ->
if (imm.isActive(etMinPrice) || imm.isActive(etMaxPrice)) {
RxKeyboardTool.hideSoftInput(context, etMaxPrice)
RxKeyboardTool.hideSoftInput(context, etMinPrice)
}
false
}
val activity = context as Activity;
RxKeyboardTool.setKeyboardChangedListener(activity) { b: Boolean, i: Int, i1: Int, i2: Int ->
if (!b) {
//软键盘隐藏
updatePriceFilter()
}
}
}
private fun reset() { private fun reset() {
tempFilter.showType = filterData.showType[0] tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear() tempFilter.ages.clear()
tempFilter.doctorEdu.clear() tempFilter.doctorEdu.clear()
tempFilter.reorder = ReorderItem()
// 擅长人群 // 擅长人群
tempFilter.specialityCrowd.clear() tempFilter.specialityCrowd.clear()
tempFilter.others.clear() tempFilter.others.clear()
...@@ -254,6 +220,19 @@ class FilterPopupWindow( ...@@ -254,6 +220,19 @@ class FilterPopupWindow(
v.paint.isFakeBoldText = false v.paint.isFakeBoldText = false
} }
} }
initZiZhiViews(contentView)
initOtherViews(contentView)
initShowSortViews(contentView)
initShowTypeViews(contentView)
//咨询方式
initEnquiryViews(contentView)
//年龄选择
initAgeViews(contentView)
//擅长人群
initGoodAtCrowd(contentView)
//学历选择
initEduViews(contentView)
updateCount(ConsultBIConstants.POSITION_CONSULT_FILTER_RESET_CLICK) updateCount(ConsultBIConstants.POSITION_CONSULT_FILTER_RESET_CLICK)
} }
...@@ -390,6 +369,7 @@ class FilterPopupWindow( ...@@ -390,6 +369,7 @@ class FilterPopupWindow(
* */ * */
private fun initOtherViews(view: View) { private fun initOtherViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flOther.removeAllViews()
for ((index, other) in filterData.other.withIndex()) { for ((index, other) in filterData.other.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, dp36) val params = FrameLayout.LayoutParams(mWidth, dp36)
...@@ -437,6 +417,7 @@ class FilterPopupWindow( ...@@ -437,6 +417,7 @@ class FilterPopupWindow(
* */ * */
private fun initZiZhiViews(view: View) { private fun initZiZhiViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(40f)) / 2 val mWidth = (popWidth - RxImageTool.dp2px(40f)) / 2
view.flZhizi.removeAllViews()
for (other in filterData.title) { for (other in filterData.title) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, dp36) val params = FrameLayout.LayoutParams(mWidth, dp36)
...@@ -453,7 +434,6 @@ class FilterPopupWindow( ...@@ -453,7 +434,6 @@ class FilterPopupWindow(
} }
textView.tvFilterName.text = " " + other.value + " " textView.tvFilterName.text = " " + other.value + " "
textView.setOnClickListener { textView.setOnClickListener {
if (textView.isSelected) { if (textView.isSelected) {
tempFilter.title.remove(other) tempFilter.title.remove(other)
textView.isSelected = false textView.isSelected = false
...@@ -478,6 +458,7 @@ class FilterPopupWindow( ...@@ -478,6 +458,7 @@ class FilterPopupWindow(
*/ */
private fun initGoodAtCrowd(view: View) { private fun initGoodAtCrowd(view: View) {
// 如果标标签数量大于20,取前20个默认展示 // 如果标标签数量大于20,取前20个默认展示
view.fl_crowd.removeAllViews()
if (filterData.specialityCrowd.size > 20) { if (filterData.specialityCrowd.size > 20) {
view.ll_crowd_more.visibility = View.VISIBLE view.ll_crowd_more.visibility = View.VISIBLE
view.ll_crowd_more.setOnClickListener { view.ll_crowd_more.setOnClickListener {
...@@ -544,6 +525,7 @@ class FilterPopupWindow( ...@@ -544,6 +525,7 @@ class FilterPopupWindow(
* */ * */
private fun initAgeViews(view: View) { private fun initAgeViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flAge.removeAllViews()
for ((index, age) in filterData.age.withIndex()) { for ((index, age) in filterData.age.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f)) val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
...@@ -591,6 +573,7 @@ class FilterPopupWindow( ...@@ -591,6 +573,7 @@ class FilterPopupWindow(
* */ * */
private fun initEduViews(view: View) { private fun initEduViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.fl_edu.removeAllViews()
for ((index, edu) in filterData.doctorEdu.withIndex()) { for ((index, edu) in filterData.doctorEdu.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f)) val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
...@@ -635,6 +618,7 @@ class FilterPopupWindow( ...@@ -635,6 +618,7 @@ class FilterPopupWindow(
private fun initEnquiryViews(view: View) { private fun initEnquiryViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flEnquiryType.removeAllViews()
for ((index, enquiry) in filterData.enquiry.withIndex()) { for ((index, enquiry) in filterData.enquiry.withIndex()) {
val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null) val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null)
val textView: TextView = llLayout.findViewById(R.id.tvFilterName) val textView: TextView = llLayout.findViewById(R.id.tvFilterName)
...@@ -689,28 +673,10 @@ class FilterPopupWindow( ...@@ -689,28 +673,10 @@ class FilterPopupWindow(
} }
} }
private fun updatePriceFilter() {
RxKeyboardTool.hideSoftInput(context, etMaxPrice)
RxKeyboardTool.hideSoftInput(context, etMinPrice)
if (tempFilter.priceRanges == null) {
val priceRangesItem = PriceRangesItem()
tempFilter.priceRanges = priceRangesItem;
}
tempFilter.priceRanges!!.max_price = etMaxPrice?.text.toString()
tempFilter.priceRanges!!.min_price = etMinPrice?.text.toString()
tempFilter.priceRangesView?.isSelected = false
tempFilter.priceRangesView?.paint?.isFakeBoldText = false
tempFilter.priceRangesView = null
etMinPrice?.clearFocus()
etMaxPrice?.clearFocus()
updateCount(ConsultBIConstants.POSITION_AVERAGE_SERVICE_INPUT)
}
private fun initShowTypeViews(view: View) { private fun initShowTypeViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(42f)) / 2 val mWidth = (popWidth - RxImageTool.dp2px(42f)) / 2
view.flShowType.removeAllViews()
for ((index, showType) in filterData.showType.withIndex()) { for ((index, showType) in filterData.showType.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, dp36) val params = FrameLayout.LayoutParams(mWidth, dp36)
......
...@@ -28,8 +28,7 @@ import kotlinx.android.synthetic.main.consultant_ui_price_popup_window.view.* ...@@ -28,8 +28,7 @@ import kotlinx.android.synthetic.main.consultant_ui_price_popup_window.view.*
/** /**
* 排序弹窗 * 价格筛选弹窗
* Created by zqk on 17-9-15.
*/ */
class PricePopupWindow( class PricePopupWindow(
val context: Context, val context: Context,
......
package com.yidianling.consultant.ui.view.topView
import android.content.Context
import androidx.recyclerview.widget.LinearSmoothScroller
class LinearTopSmoothScroller(context: Context?) : LinearSmoothScroller(context) {
override fun getVerticalSnapPreference(): Int {
return SNAP_TO_START
}
}
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/white"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingTop="@dimen/platform_dp_15" android:paddingTop="@dimen/platform_dp_17"
android:paddingBottom="@dimen/platform_dp_15" android:paddingBottom="@dimen/platform_dp_17"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:id="@+id/ll_view"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/eight_category"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:background="@color/platform_color_F7F7F7"
android:orientation="vertical" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/category_detail"
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:background="@color/white"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp">
<TextView
android:id="@+id/btn_reset"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_weight="1"
android:background="@drawable/consultant_stroke_ebebeb_r_8"
android:gravity="center"
android:text="@string/platform_reset"
android:textColor="@color/platform_color_242424"
android:textSize="16sp" />
<TextView
android:id="@+id/btnConfirm"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="13dp"
android:layout_weight="1"
android:background="@drawable/consultant_solid_main_theme_color_r_8"
android:gravity="center"
android:text="@string/platform_confirm"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/consultant_layout_search_toolbar"
android:layout_width="match_parent"
android:layout_height="48dp" />
<LinearLayout
android:id="@+id/eight_view_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/eight_category_fl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" />
</LinearLayout>
\ No newline at end of file
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white"
android:layout_weight="2" android:layout_weight="3"
android:overScrollMode="never"/> android:overScrollMode="never"/>
</LinearLayout> </LinearLayout>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/scroll_nested"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
......
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/category_name_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/platform_dp_5"
android:layout_marginBottom="@dimen/platform_dp_5"
android:background="@drawable/consult_price_expert_unseleted"
android:gravity="center"
android:minHeight="@dimen/platform_dp_40"
android:paddingStart="@dimen/platform_dp_10"
android:paddingTop="@dimen/platform_dp_6"
android:paddingRight="@dimen/platform_dp_10"
android:paddingBottom="@dimen/platform_dp_6"
android:textColor="@color/platform_color_333333"
android:textSize="@dimen/platform_sp_12"
tools:text="aaaaaaaaa">
</TextView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginEnd="@dimen/platform_dp_12"
android:orientation="vertical"
android:paddingTop="@dimen/platform_dp_12"
android:paddingBottom="@dimen/platform_dp_13">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/platform_dp_12"
android:gravity="center">
<TextView
android:id="@+id/category_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="恋爱情感"
android:textColor="#1c212d"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/collapse_hide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:padding="@dimen/platform_dp_5"
android:text="展开"
android:textColor="@color/platform_main_theme"
android:textSize="@dimen/platform_sp_12" />
<ImageView
android:id="@+id/arrow_collapse_hide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/consult_collapse_arrow">
</ImageView>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/category_list_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="3">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center"
android:orientation="horizontal">
<View
android:id="@+id/single_selected_tag"
android:layout_width="3dp"
android:layout_height="@dimen/platform_dp_15"
android:background="@color/platform_main_theme"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/multiple_choise"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/alert_selected"
android:backgroundTint="@color/platform_main_theme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:visibility="gone">
</ImageView>
<TextView
android:id="@+id/eight_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_3"
android:layout_marginTop="@dimen/platform_dp_15"
android:layout_marginBottom="@dimen/platform_dp_15"
android:textColor="@color/color_242424"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:textSize="@dimen/sp_14"
tools:text="情绪压力">
</TextView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -6,6 +6,7 @@ import android.content.Context ...@@ -6,6 +6,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import android.widget.ImageView import android.widget.ImageView
import android.widget.RelativeLayout
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.dou361.ijkplayer.widget.PlayStateParams import com.dou361.ijkplayer.widget.PlayStateParams
import com.dou361.ijkplayer.widget.PlayerView import com.dou361.ijkplayer.widget.PlayerView
...@@ -18,7 +19,6 @@ import com.yidianling.common.tools.RxImageTool ...@@ -18,7 +19,6 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.course.R import com.yidianling.course.R
import com.yidianling.course.coursePlay.CoursePlayActivity import com.yidianling.course.coursePlay.CoursePlayActivity
import com.yidianling.course.flutterPlugin.CourseSendPlugin import com.yidianling.course.flutterPlugin.CourseSendPlugin
import com.yidianling.course.uitls.VideoProgressUtil
import java.util.* import java.util.*
/** /**
...@@ -78,7 +78,7 @@ object VideoFloatHelper { ...@@ -78,7 +78,7 @@ object VideoFloatHelper {
} }
} }
val videoLayout = it.findViewById<ImageView>(R.id.app_video_box) val videoLayout = it.findViewById<RelativeLayout>(R.id.app_video_box)
try { try {
initVideoPlayer(activity, videoLayout) initVideoPlayer(activity, videoLayout)
......
...@@ -14,15 +14,6 @@ import android.os.Build; ...@@ -14,15 +14,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Parcelable; import android.os.Parcelable;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.provider.Settings; import android.provider.Settings;
import android.text.Editable; import android.text.Editable;
import android.text.InputFilter; import android.text.InputFilter;
...@@ -41,7 +32,14 @@ import android.widget.LinearLayout; ...@@ -41,7 +32,14 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.util.DeviceUtils; import androidx.appcompat.app.AlertDialog;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.luck.picture.lib.entity.LocalMedia; import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.listener.OnResultCallbackListener; import com.luck.picture.lib.listener.OnResultCallbackListener;
import com.tbruyelle.rxpermissions2.RxPermissions; import com.tbruyelle.rxpermissions2.RxPermissions;
...@@ -55,8 +53,8 @@ import com.ydl.ydlcommon.base.BaseApp; ...@@ -55,8 +53,8 @@ import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.base.BaseFragment; import com.ydl.ydlcommon.base.BaseFragment;
import com.ydl.ydlcommon.data.http.BaseResponse; import com.ydl.ydlcommon.data.http.BaseResponse;
import com.ydl.ydlcommon.router.YdlCommonOut; import com.ydl.ydlcommon.router.YdlCommonOut;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.ydl.ydlcommon.utils.BuryPointUtils; import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.DisplayUtils;
import com.ydl.ydlcommon.utils.MoonUtil; import com.ydl.ydlcommon.utils.MoonUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.StringUtils; import com.ydl.ydlcommon.utils.StringUtils;
...@@ -64,9 +62,8 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog; ...@@ -64,9 +62,8 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.ydl.ydlcommon.view.dialog.NormalDialog; import com.ydl.ydlcommon.view.dialog.NormalDialog;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.RxFileTool; import com.yidianling.common.tools.RxFileTool;
import com.yidianling.dynamic.BuildConfig;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.bean.DynamicDraftBean; import com.yidianling.dynamic.bean.DynamicDraftBean;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity; import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity;
import com.yidianling.dynamic.common.emoji.EmoticonPickerView; import com.yidianling.dynamic.common.emoji.EmoticonPickerView;
...@@ -77,7 +74,6 @@ import com.yidianling.dynamic.event.DynamicSaveEvent; ...@@ -77,7 +74,6 @@ import com.yidianling.dynamic.event.DynamicSaveEvent;
import com.yidianling.dynamic.event.EditContentEvent; import com.yidianling.dynamic.event.EditContentEvent;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.model.PublishTrendResult; import com.yidianling.dynamic.model.PublishTrendResult;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.yidianling.dynamic.publishTrend.DynamicPublishImageAdapter; import com.yidianling.dynamic.publishTrend.DynamicPublishImageAdapter;
import com.yidianling.dynamic.publishTrend.PublishTrendActivity; import com.yidianling.dynamic.publishTrend.PublishTrendActivity;
import com.yidianling.dynamic.publishTrend.SelecTopicActivity; import com.yidianling.dynamic.publishTrend.SelecTopicActivity;
...@@ -963,11 +959,52 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie ...@@ -963,11 +959,52 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
} }
if (Build.VERSION.SDK_INT>Build.VERSION_CODES.P){ if (Build.VERSION.SDK_INT>Build.VERSION_CODES.P){
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
AddImag(list.get(i).getAndroidQToPath()); LocalMedia localMedia = list.get(i);
String path;
if (!TextUtils.isEmpty(localMedia.getAndroidQToPath())) {
//android q路径
path = localMedia.getAndroidQToPath();
} else if (!TextUtils.isEmpty(localMedia.getCutPath())) {
//android 裁剪路径
path = localMedia.getCutPath();
} else if (!TextUtils.isEmpty(localMedia.getOriginalPath())) {
//android 初始路径
path = localMedia.getOriginalPath();
} else if (!TextUtils.isEmpty(localMedia.getCompressPath())) {
//android 压缩路径
path = localMedia.getCompressPath();
} else if (!TextUtils.isEmpty(localMedia.getRealPath())) {
//android 真实路径
path = localMedia.getRealPath();
} else {
path = localMedia.getPath();
}
if (!TextUtils.isEmpty(path)) {
AddImag(path);
}
} }
}else{ }else{
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
AddImag(list.get(i).getPath()); LocalMedia localMedia = list.get(i);
String path;
if (!TextUtils.isEmpty(localMedia.getPath())) {
path = localMedia.getPath();
} else if (!TextUtils.isEmpty(localMedia.getCutPath())) {
//android 裁剪路径
path = localMedia.getCutPath();
} else if (!TextUtils.isEmpty(localMedia.getOriginalPath())) {
//android 初始路径
path = localMedia.getOriginalPath();
} else if (!TextUtils.isEmpty(localMedia.getCompressPath())) {
//android 压缩路径
path = localMedia.getCompressPath();
} else {
//android 真实路径
path = localMedia.getRealPath();
}
if (!TextUtils.isEmpty(path)) {
AddImag(path);
}
} }
} }
......
...@@ -45,7 +45,6 @@ import com.yidianling.tests.api.service.ITestsApiService ...@@ -45,7 +45,6 @@ import com.yidianling.tests.api.service.ITestsApiService
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
import org.json.JSONObject import org.json.JSONObject
import java.net.URLDecoder
open class HomeBaseImpl : IHomeBaseEvent { open class HomeBaseImpl : IHomeBaseEvent {
...@@ -271,15 +270,14 @@ open class HomeBaseImpl : IHomeBaseEvent { ...@@ -271,15 +270,14 @@ open class HomeBaseImpl : IHomeBaseEvent {
} else if (data.goType.equals("h5")) { } else if (data.goType.equals("h5")) {
NewH5Activity.start(mContext, H5Params(data.goUrl.toString(), "")) NewH5Activity.start(mContext, H5Params(data.goUrl.toString(), ""))
} else if (data.goType.equals("special_categories")) { } else if (data.goType.equals("special_categories")) {
ARouter.getInstance().build("/consult/list") //全部
.withInt(IYDLRouterConstant.EXTRA_SHOWTYPE, 0) ARouter.getInstance().build("/consult/eightcategory")
.withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title)
.withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap)
.navigation() .navigation()
} else { } else {
ARouter.getInstance().build("/consult/list") ARouter.getInstance().build("/consult/list")
.withInt(IYDLRouterConstant.EXTRA_SHOWTYPE, 0) .withInt(IYDLRouterConstant.EXTRA_SHOWTYPE, 0)
.withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title) .withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title)
.withString(IYDLRouterConstant.HASCATEID, data.cateId)
.withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap) .withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap)
.navigation() .navigation()
} }
...@@ -565,7 +563,8 @@ open class HomeBaseImpl : IHomeBaseEvent { ...@@ -565,7 +563,8 @@ open class HomeBaseImpl : IHomeBaseEvent {
YDLRouterManager.router( YDLRouterManager.router(
IYDLRouterConstant.ROUTER_H5_H5, IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, bean.listAllUrl!!), "" bean.listAllUrl?.let { YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, it) },
""
) )
} }
......
...@@ -69,6 +69,7 @@ class HomeHeaderBean : HomeItemBaseBean { ...@@ -69,6 +69,7 @@ class HomeHeaderBean : HomeItemBaseBean {
var icon: String? = "", var icon: String? = "",
var goType: String? = "", var goType: String? = "",
var goUrl: String? = "", var goUrl: String? = "",
var cateId: String? = "",
var goCriteriaMap: HashMap<String, Any>? = null var goCriteriaMap: HashMap<String, Any>? = null
) : Serializable ) : Serializable
......
...@@ -3,15 +3,10 @@ package com.yidianling.home.ui.view ...@@ -3,15 +3,10 @@ package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout import android.widget.LinearLayout
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import kotlinx.android.synthetic.ydl.home_button_banner_view.view.* import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
...@@ -28,11 +23,6 @@ class HomeButtonBannerView( ...@@ -28,11 +23,6 @@ class HomeButtonBannerView(
private var homeEvent: IHomeBaseEvent?, private var homeEvent: IHomeBaseEvent?,
var listenFree: Boolean var listenFree: Boolean
) : LinearLayout(mContext) { ) : LinearLayout(mContext) {
private var buttonParams: LinearLayout.LayoutParams? = null
private var buttonParamsFrame: FrameLayout.LayoutParams? = null
private var buttonParamsFrame2: FrameLayout.LayoutParams? = null
init { init {
initView() initView()
} }
...@@ -59,8 +49,6 @@ class HomeButtonBannerView( ...@@ -59,8 +49,6 @@ class HomeButtonBannerView(
.load(R.drawable.qingsu_new_free_dynamic) .load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE) .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif) .into(qingsuGif)
initButtonView()
homeModuleButtonBannerFirst.setOnClickListener { homeModuleButtonBannerFirst.setOnClickListener {
homeEvent?.reservationExpertsClick() homeEvent?.reservationExpertsClick()
} }
...@@ -74,28 +62,4 @@ class HomeButtonBannerView( ...@@ -74,28 +62,4 @@ class HomeButtonBannerView(
homeEvent?.psychologyTestClick() homeEvent?.psychologyTestClick()
} }
} }
/**
* 初始化四个按钮
*/
private fun initButtonView() {
if (null == buttonParams) {
val screenWidth = RxDeviceTool.getScreenWidth(mContext)
// val viewWidth = ((screenWidth - 2 * 9 * RxDeviceTool.getScreenDensity(mContext)) / 4).toInt()
val viewWidth = screenWidth / 4 - 40
val viewHeight = viewWidth
buttonParams = LinearLayout.LayoutParams(viewWidth, viewHeight)
buttonParams!!.setMargins(0, 0, 20, 0)
buttonParamsFrame = FrameLayout.LayoutParams(viewWidth, viewHeight)
buttonParamsFrame2 =
FrameLayout.LayoutParams((viewWidth / 2.0).toInt(), (viewHeight / 2.3).toInt())
// buttonParamsFrame2!!.setMargins((((viewWidth / 20f).toInt())), 0, 0, 0)
qingsuGif.layoutParams = buttonParamsFrame2
homeModuleButtonBannerFirst.layoutParams = buttonParams
homeModuleButtonBannerFourth.layoutParams = buttonParams
homeModuleButtonBannerSecond.layoutParams = buttonParams
homeModuleButtonBannerThird.layoutParams = buttonParams
homeModuleButtonBannerSecondFrame.layoutParams = buttonParamsFrame
}
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/four_button_constrain" android:id="@+id/four_button_constrain"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -9,16 +8,17 @@ ...@@ -9,16 +8,17 @@
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="@dimen/platform_dp_8" android:paddingLeft="@dimen/platform_dp_8"
android:paddingTop="@dimen/platform_dp_8" android:paddingTop="@dimen/platform_dp_8"
> android:paddingRight="8dp">
<RelativeLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/homeModuleButtonBannerFirst" android:id="@+id/homeModuleButtonBannerFirst"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_button_banner_first_img_new" android:background="@drawable/home_button_banner_first_img_new"
android:gravity="center" android:gravity="center">
android:paddingRight="@dimen/platform_dp_8">
<TextView <TextView
android:id="@+id/homeModuleButtonBannerFirstTitle" android:id="@+id/homeModuleButtonBannerFirstTitle"
...@@ -27,25 +27,36 @@ ...@@ -27,25 +27,36 @@
android:text="心理咨询" android:text="心理咨询"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/homeModuleFirstDec"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView <TextView
android:id="@+id/homeModuleFirstDec"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleButtonBannerFirstTitle" android:layout_below="@+id/homeModuleButtonBannerFirstTitle"
android:text="3W+师资" android:text="3W+师资"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="@dimen/platform_sp_12" /> android:textSize="@dimen/platform_sp_12"
</RelativeLayout> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeModuleButtonBannerFirstTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/homeModuleButtonBannerFourth" android:id="@+id/homeModuleButtonBannerFourth"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_confide_free_icon" android:background="@drawable/home_confide_free_icon"
android:gravity="center" android:gravity="center">
android:paddingRight="@dimen/platform_dp_8">
<TextView <TextView
android:id="@+id/homeModuleButtonBannerFourthTitle" android:id="@+id/homeModuleButtonBannerFourthTitle"
...@@ -54,26 +65,36 @@ ...@@ -54,26 +65,36 @@
android:text="心理测试" android:text="心理测试"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/homeModuleButtonBannerFourthdec"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView <TextView
android:id="@+id/homeModuleButtonBannerFourthdec"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleButtonBannerFourthTitle"
android:text="抑郁测量" android:text="抑郁测量"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="@dimen/platform_sp_12" /> android:textSize="@dimen/platform_sp_12"
</RelativeLayout> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeModuleButtonBannerFourthTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/homeModuleButtonBannerThird" android:id="@+id/homeModuleButtonBannerThird"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_button_banner_third_img_new" android:background="@drawable/home_button_banner_third_img_new"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical">
android:paddingRight="@dimen/platform_dp_8">
<TextView <TextView
android:id="@+id/homeModuleButtonBannerThirdTitle" android:id="@+id/homeModuleButtonBannerThirdTitle"
...@@ -82,53 +103,70 @@ ...@@ -82,53 +103,70 @@
android:text="心理课堂" android:text="心理课堂"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/homeModuleButtonBannerThirdDec"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView <TextView
android:id="@+id/homeModuleButtonBannerThirdDec"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleButtonBannerThirdTitle" android:layout_below="@+id/homeModuleButtonBannerThirdTitle"
android:text="学习与成长" android:text="学习与成长"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="@dimen/platform_sp_12" /> android:textSize="@dimen/platform_sp_12"
</RelativeLayout> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeModuleButtonBannerThirdTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/homeModuleButtonBannerSecond" android:id="@+id/homeModuleButtonBannerSecond"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_button_banner_fourth_img_new"> android:background="@drawable/home_button_banner_fourth_img_new">
<RelativeLayout
android:id="@+id/homeModuleButtonBannerSecondFrame"
android:layout_width="78dp"
android:layout_height="78dp"
android:gravity="center"
android:paddingRight="@dimen/platform_dp_8">
<TextView <TextView
android:id="@+id/homeModuleButtonBannerSecondTitle" android:id="@+id/homeModuleButtonBannerSecondTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="倾诉热线" android:text="倾诉热线"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/homeModuleButtonBannerSecondDec"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/homeModuleButtonBannerSecondDec"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_below="@+id/homeModuleButtonBannerSecondTitle" android:layout_height="wrap_content"
android:text="温暖守护您" android:text="温暖守护您"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:textSize="@dimen/platform_sp_12" /> android:textSize="@dimen/platform_sp_12"
</RelativeLayout> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeModuleButtonBannerSecondTitle" />
<ImageView <ImageView
android:id="@+id/qingsuGif" android:id="@+id/qingsuGif"
android:layout_width="45dp" android:layout_width="45dp"
android:layout_height="@dimen/platform_dp_22" android:layout_height="@dimen/platform_dp_22"
android:visibility="visible" /> android:visibility="visible"
</FrameLayout> android:layout_marginStart="@dimen/platform_dp_8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
...@@ -11,10 +11,12 @@ import com.netease.nimlib.sdk.msg.model.RecentContact; ...@@ -11,10 +11,12 @@ import com.netease.nimlib.sdk.msg.model.RecentContact;
import com.netease.nimlib.sdk.team.model.MemberChangeAttachment; import com.netease.nimlib.sdk.team.model.MemberChangeAttachment;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.im.event.UpdateTabUnreadNumEvent; import com.yidianling.im.event.UpdateTabUnreadNumEvent;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
...@@ -99,28 +101,32 @@ public class MsgReceiveHelper { ...@@ -99,28 +101,32 @@ public class MsgReceiveHelper {
//更新未读数量及最近联系人列表 //更新未读数量及最近联系人列表
public static void reQueryUnreadNumber(MessageRefreshCallback callback) { public static void reQueryUnreadNumber(MessageRefreshCallback callback) {
NIMClient.getService(MsgService.class).queryRecentContacts() try {
.setCallback(new RequestCallbackWrapper<List<RecentContact>>() { NIMClient.getService(MsgService.class).queryRecentContacts()
@Override .setCallback(new RequestCallbackWrapper<List<RecentContact>>() {
public void onResult(int code, List<RecentContact> recentList, Throwable e) { @Override
// recentList参数即为最近联系人列表(最近会话列表) public void onResult(int code, List<RecentContact> recentList, Throwable e) {
if (recentList != null && recentList.size() != 0) { // recentList参数即为最近联系人列表(最近会话列表)
for (RecentContact r : recentList) { if (recentList != null && recentList.size() != 0) {
if (r.getSessionType() == SessionTypeEnum.Team && r.getAttachment() instanceof MemberChangeAttachment) { for (RecentContact r : recentList) {
if (((MemberChangeAttachment) r.getAttachment()).getType() == NotificationType.KickMember) { if (r.getSessionType() == SessionTypeEnum.Team && r.getAttachment() instanceof MemberChangeAttachment) {
//如果是群聊,且有被踢的消息,删除该群聊 if (((MemberChangeAttachment) r.getAttachment()).getType() == NotificationType.KickMember) {
NIMClient.getService(MsgService.class).deleteRecentContact(r); //如果是群聊,且有被踢的消息,删除该群聊
continue; NIMClient.getService(MsgService.class).deleteRecentContact(r);
continue;
}
} }
MsgReceiveHelper.updateNum(r.getContactId(), r.getUnreadCount());
} }
MsgReceiveHelper.updateNum(r.getContactId(), r.getUnreadCount()); }
if (callback != null) {
callback.onSuccess();
} }
} }
if (callback != null) { });
callback.onSuccess(); } catch (Exception e) {
} e.printStackTrace();
} }
});
} }
public static void markAllRead() { public static void markAllRead() {
......
...@@ -9,6 +9,7 @@ import com.ydl.webview.H5Params ...@@ -9,6 +9,7 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.view.dialog.CommonDialog import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.im.R import com.yidianling.im.R
import com.yidianling.im.config.constants.ImConstants import com.yidianling.im.config.constants.ImConstants
...@@ -176,6 +177,12 @@ class ExpertConsultServiceItemView : LinearLayout { ...@@ -176,6 +177,12 @@ class ExpertConsultServiceItemView : LinearLayout {
//新增需求,如果没有绑定手机号,跳转到绑定手机号页面 //新增需求,如果没有绑定手机号,跳转到绑定手机号页面
bindPhoneDialog() bindPhoneDialog()
} }
ActionCountUtils.record(
"ydl_experts_detail",
"booking_product_popup_page_click",
"",
"2"
)
} }
} }
......
...@@ -9,7 +9,6 @@ import android.widget.SeekBar ...@@ -9,7 +9,6 @@ import android.widget.SeekBar
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper import com.ydl.media.view.PlayerFloatHelper
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
...@@ -40,9 +39,6 @@ import io.reactivex.disposables.Disposable ...@@ -40,9 +39,6 @@ import io.reactivex.disposables.Disposable
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.activity_play_meditation.* import kotlinx.android.synthetic.main.activity_play_meditation.*
import kotlinx.android.synthetic.main.activity_play_meditation.iv_close
import kotlinx.android.synthetic.main.activity_play_meditation.tv_title
import kotlinx.android.synthetic.main.layout_meditation_play_float_view.*
import kotlinx.android.synthetic.main.player_control_view.* import kotlinx.android.synthetic.main.player_control_view.*
import java.util.* import java.util.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
...@@ -547,6 +543,8 @@ class PlayMeditationActivity : BaseActivity() { ...@@ -547,6 +543,8 @@ class PlayMeditationActivity : BaseActivity() {
if (duration != null) { if (duration != null) {
seekbar_play_progress.max = duration seekbar_play_progress.max = duration
} }
mTimer.cancel()
mTimer = Timer()
mTimer.schedule(object : TimerTask() { mTimer.schedule(object : TimerTask() {
override fun run() { override fun run() {
if (!isSeekbarChanging) { if (!isSeekbarChanging) {
...@@ -874,6 +872,8 @@ class PlayMeditationActivity : BaseActivity() { ...@@ -874,6 +872,8 @@ class PlayMeditationActivity : BaseActivity() {
exo_duration.text = MediaPlayerTimeUtil.calculateTime(duration / 1000) exo_duration.text = MediaPlayerTimeUtil.calculateTime(duration / 1000)
seekbar_play_progress.max = duration seekbar_play_progress.max = duration
mTimer.cancel()
mTimer = Timer()
mTimer.schedule(object : TimerTask() { mTimer.schedule(object : TimerTask() {
override fun run() { override fun run() {
if (!isSeekbarChanging) { if (!isSeekbarChanging) {
...@@ -909,7 +909,6 @@ class PlayMeditationActivity : BaseActivity() { ...@@ -909,7 +909,6 @@ class PlayMeditationActivity : BaseActivity() {
MediaPlayerTimeUtil.calculateTime(currentPosition / 1000) MediaPlayerTimeUtil.calculateTime(currentPosition / 1000)
} }
exo_duration.text = MediaPlayerTimeUtil.calculateTime(duration / 1000) exo_duration.text = MediaPlayerTimeUtil.calculateTime(duration / 1000)
mTimer.schedule(object : TimerTask() { mTimer.schedule(object : TimerTask() {
override fun run() { override fun run() {
if (!isSeekbarChanging) { if (!isSeekbarChanging) {
......
...@@ -77,7 +77,8 @@ interface IYDLRouterConstant{ ...@@ -77,7 +77,8 @@ interface IYDLRouterConstant{
const val EXTRA_TAB = "tab" const val EXTRA_TAB = "tab"
const val EXTRA_CATEID = "cateId" const val EXTRA_CATEID = "cateId"
const val EXTRA_CATETITLE = "cateTitle" const val EXTRA_CATETITLE = "cateTitle"
const val EXTRA_SHOWTYPE = "showType" const val HASCATEID = "hascateid"
const val EXTRA_SHOWTYPE = "showType"
const val EXTRA_KEYWORD = "keyword" const val EXTRA_KEYWORD = "keyword"
const val EXTRA_RED_PACKET = "by_red_packet" const val EXTRA_RED_PACKET = "by_red_packet"
const val EXTRA_CONFIDEDID = "confidedId" const val EXTRA_CONFIDEDID = "confidedId"
......
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