Commit b537cadc by 万齐军

Merge branch 'darren_confide_2.0' into 'd/v_confide_2.0'

fix bug mr改动

See merge request app_android_lib/YDL-Component!93
parents d4370995 d7f9853a
...@@ -12,10 +12,7 @@ import android.hardware.SensorEventListener ...@@ -12,10 +12,7 @@ import android.hardware.SensorEventListener
import android.hardware.SensorManager import android.hardware.SensorManager
import android.media.MediaPlayer import android.media.MediaPlayer
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.*
import android.os.Handler
import android.os.PowerManager
import android.os.Vibrator
import android.provider.Settings import android.provider.Settings
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
...@@ -189,7 +186,7 @@ class AudioHomeActivity : ...@@ -189,7 +186,7 @@ class AudioHomeActivity :
private var mPlayer: AudioPlayer? = null private var mPlayer: AudioPlayer? = null
private var vibrator: Vibrator? = null private var vibrator: Vibrator? = null
private var handler: Handler? = null private var handler: Handler? = null
private var phone_handler: Handler? = null private var phoneHandler: Handler? = Handler(Looper.getMainLooper())
//声网 //声网
private var voiceManage: YDLVoiceManager? = null private var voiceManage: YDLVoiceManager? = null
...@@ -547,21 +544,19 @@ class AudioHomeActivity : ...@@ -547,21 +544,19 @@ class AudioHomeActivity :
.sendRichLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content") .sendRichLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content")
localRemainTime = (totalDuration?:1500).minus(remainTime?.toInt()?:1500) localRemainTime = (totalDuration?:1500).minus(remainTime?.toInt()?:1500)
handler = Handler() handler = Handler()
phone_handler = Handler()
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
var count = 0 var count = 0
phone_handler!!.postDelayed(object : Runnable { phoneHandler?.postDelayed(object : Runnable {
override fun run() { override fun run() {
if(count % 2 == 0){ if(count % 2 == 0){
tv_tips.text = "正在发送倾诉请求…" tv_tips.text = "正在发送倾诉请求…"
}else{ }else{
tv_tips.text = "正在等待聆听者接受邀请…" tv_tips.text = "正在等待聆听者接受邀请…"
} }
count++ count++
phone_handler!!.postDelayed({ this.run() }, 3000) phoneHandler?.postDelayed({ this.run() }, 3000)
} }
}, 3000) }, 3000)
...@@ -1109,7 +1104,7 @@ class AudioHomeActivity : ...@@ -1109,7 +1104,7 @@ class AudioHomeActivity :
*/ */
private fun connectSuccess() { private fun connectSuccess() {
isConnectSuccess = true isConnectSuccess = true
handler!!.removeCallbacksAndMessages(null) phoneHandler?.removeCallbacksAndMessages(null)
//通知服务端,此次通话已经接通,服务端开始订单 //通知服务端,此次通话已经接通,服务端开始订单
updateExpertStatus(false, 0) updateExpertStatus(false, 0)
...@@ -1385,7 +1380,7 @@ class AudioHomeActivity : ...@@ -1385,7 +1380,7 @@ class AudioHomeActivity :
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
uploadLog() uploadLog()
phone_handler?.removeCallbacksAndMessages(null) phoneHandler?.removeCallbacksAndMessages(null)
if (isConnectSuccess) { if (isConnectSuccess) {
uploadException("", "zhu", "108", callback = null) uploadException("", "zhu", "108", callback = null)
} }
...@@ -1393,8 +1388,8 @@ class AudioHomeActivity : ...@@ -1393,8 +1388,8 @@ class AudioHomeActivity :
handler = null handler = null
} }
if (phone_handler != null){ if (phoneHandler != null){
phone_handler = null phoneHandler = null
} }
hasUpLoadLog = false hasUpLoadLog = false
......
...@@ -63,7 +63,9 @@ import kotlinx.android.synthetic.main.confide_title_bar.* ...@@ -63,7 +63,9 @@ import kotlinx.android.synthetic.main.confide_title_bar.*
* @date 2018/8/10 * @date 2018/8/10
*/ */
@Route(path = ConfideRoute.R_CONFIDE_HOME) @Route(path = ConfideRoute.R_CONFIDE_HOME)
class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHomeContract.Presenter>(),IConfideHomeContract.View,XRecyclerView.LoadingListener { class ConfideHomeActivity :
BaseLceActivity<IConfideHomeContract.View, IConfideHomeContract.Presenter>(),
IConfideHomeContract.View, XRecyclerView.LoadingListener {
private var listenFree = false private var listenFree = false
...@@ -82,10 +84,12 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -82,10 +84,12 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
//是否从启动页直接进入 //是否从启动页直接进入
var isSplash: Boolean = false var isSplash: Boolean = false
/** /**
* 倾诉首页适配器 * 倾诉首页适配器
*/ */
private var mConfideAdapter: ConfideHomeAdapter? = null private var mConfideAdapter: ConfideHomeAdapter? = null
/** /**
* 倾诉首页事件处理类 * 倾诉首页事件处理类
*/ */
...@@ -103,16 +107,21 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -103,16 +107,21 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
* 页(从第二页开始) * 页(从第二页开始)
*/ */
private var page: Int = 1 private var page: Int = 1
//筛选参数bean //筛选参数bean
private var allFiltersBean: ConfideHomeAllFiltersBean? = null private var allFiltersBean: ConfideHomeAllFiltersBean? = null
//用于置顶筛选模块监听 //用于置顶筛选模块监听
private var listScrollListener: ConfideHomeRecycleViewListener? = null private var listScrollListener: ConfideHomeRecycleViewListener? = null
//用于显示筛选悬浮View //用于显示筛选悬浮View
private var listSuspendListener: ConfideHomeRecyleSuspendListener? = null private var listSuspendListener: ConfideHomeRecyleSuspendListener? = null
//是否有下一页(用于判断为你推荐条数,如果首页返回少于10条 那么就可以认为没有下一页了) 默认有下一页 //是否有下一页(用于判断为你推荐条数,如果首页返回少于10条 那么就可以认为没有下一页了) 默认有下一页
private var hasMore = true private var hasMore = true
private var dp48 = 0 private var dp48 = 0
private var bottomSheetDialogFragment: ConfideBottomSheetDialogFragment? = null private var bottomSheetDialogFragment: ConfideBottomSheetDialogFragment? = null
init { init {
//初始化参数 //初始化参数
initParam() initParam()
...@@ -121,11 +130,12 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -121,11 +130,12 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
private fun initParam() { private fun initParam() {
allFiltersBean = ConfideHomeAllFiltersBean( allFiltersBean = ConfideHomeAllFiltersBean(
page, page,
ConfideHomeFiterItemBean("1", ""), ConfideHomeFiterItemBean("1", ""),
ConfideHomeFiterItemBean("-1", ""), ConfideHomeFiterItemBean("-1", ""),
ArrayList(), ArrayList(),
ArrayList()) ArrayList()
)
} }
override fun getContext(): Context { override fun getContext(): Context {
...@@ -171,12 +181,12 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -171,12 +181,12 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
} else if (page > 1) { } else if (page > 1) {
var listData = mConfideAdapter?.getList() var listData = mConfideAdapter?.getList()
var notUidList = ArrayList<Int>() var notUidList = ArrayList<Int>()
if (listData!=null){ if (listData != null) {
for (bean in listData){ for (bean in listData) {
//列表类型数组 //列表类型数组
if (bean.type==5 && bean.body!=null){ if (bean.type == 5 && bean.body != null) {
for (bean in bean.body){ for (bean in bean.body) {
notUidList.add(bean.uid?:0) notUidList.add(bean.uid ?: 0)
} }
} }
} }
...@@ -188,7 +198,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -188,7 +198,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
override fun initDataAndEvent() { override fun initDataAndEvent() {
//来自首页倾诉红包入口 //来自首页倾诉红包入口
val isFromRed = intent.getBooleanExtra(IYDLRouterConstant.EXTRA_RED_PACKET,false) val isFromRed = intent.getBooleanExtra(IYDLRouterConstant.EXTRA_RED_PACKET, false)
val confidedId = intent.getStringExtra(IYDLRouterConstant.EXTRA_CONFIDEDID) val confidedId = intent.getStringExtra(IYDLRouterConstant.EXTRA_CONFIDEDID)
val doctorId = intent.getStringExtra(IYDLRouterConstant.EXTRA_DOCTORID) val doctorId = intent.getStringExtra(IYDLRouterConstant.EXTRA_DOCTORID)
...@@ -212,18 +222,23 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -212,18 +222,23 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
// .load(R.drawable.confide__free) // .load(R.drawable.confide__free)
// .diskCacheStrategy(DiskCacheStrategy.RESOURCE) // .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
// .into(confide_Free) // .into(confide_Free)
if (isFromRed){ if (isFromRed) {
ToastUtil.toastLong(this@ConfideHomeActivity,"红包已领取成功 可立即点击拨打") ToastUtil.toastLong(this@ConfideHomeActivity, "红包已领取成功 可立即点击拨打")
} }
if (!confidedId.isNullOrBlank() && !doctorId.isNullOrBlank()){ if (!confidedId.isNullOrBlank() && !doctorId.isNullOrBlank()) {
ConfideWebServiceImpl().connectionJava(confidedId.toInt(), 3, this@ConfideHomeActivity, null) { ConfideWebServiceImpl().connectionJava(
showDoctorDetail(confidedId,doctorId) confidedId.toInt(),
3,
this@ConfideHomeActivity,
null
) {
showDoctorDetail(confidedId, doctorId)
} }
} }
} }
private fun showDoctorDetail(confideId: String,doctorId:String) { private fun showDoctorDetail(confideId: String, doctorId: String) {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(confideId)+"&payPage=1" val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(confideId)+"&payPage=1"
ConfideBottomSheetDialogFragment() ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(this@ConfideHomeActivity, url, doctorId) .showBottomSheetDialog(this@ConfideHomeActivity, url, doctorId)
...@@ -237,19 +252,18 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -237,19 +252,18 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
private fun handleFree() { private fun handleFree() {
//登录了回来之后就不显示了 //登录了回来之后就不显示了
val isLogin = (findRouteService(IUserService::class.java).isLogin()) val isLogin = (findRouteService(IUserService::class.java).isLogin())
findViewById<View>(R.id.confide_Free).visibility = if (isLogin) View.GONE else View.VISIBLE findViewById<View>(R.id.confide_Free).visibility = if (isLogin) View.GONE else View.VISIBLE
if (!isLogin) {
if (!isLogin){
val controller: DraweeController = Fresco.newDraweeControllerBuilder() val controller: DraweeController = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse("res://drawable/"+R.drawable.first_order)) .setUri(Uri.parse("res://drawable/" + R.drawable.first_order))
.setOldController(confide_Free.controller) .setOldController(confide_Free.controller)
.setAutoPlayAnimations(true) // 是否自动播放Gif动画 .setAutoPlayAnimations(true) // 是否自动播放Gif动画
.build() .build()
confide_Free.controller = controller confide_Free.controller = controller
} }
if (isLogin) { if (isLogin) {
findViewById<View>(R.id.confideRed).visibility = if (listenFree) View.VISIBLE else View.GONE findViewById<View>(R.id.confideRed).visibility =
if (listenFree) View.VISIBLE else View.GONE
(quick_consult_btn.layoutParams as? ViewGroup.MarginLayoutParams)?.rightMargin = (quick_consult_btn.layoutParams as? ViewGroup.MarginLayoutParams)?.rightMargin =
if (listenFree) dp48 / 2 else 0 if (listenFree) dp48 / 2 else 0
} }
...@@ -275,7 +289,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -275,7 +289,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
rv_list.addOnScrollListener(object : RecyclerView.OnScrollListener() { rv_list.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState) super.onScrollStateChanged(recyclerView, newState)
if (newState==RecyclerView.SCROLL_STATE_IDLE){ if (newState == RecyclerView.SCROLL_STATE_IDLE) {
quick_consult_card.visibility = View.VISIBLE quick_consult_card.visibility = View.VISIBLE
} }
// val layoutManager: RecyclerView.LayoutManager = recyclerView?.layoutManager!! // val layoutManager: RecyclerView.LayoutManager = recyclerView?.layoutManager!!
...@@ -292,10 +306,10 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -292,10 +306,10 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy) super.onScrolled(recyclerView, dx, dy)
if (dy<=0){ if (dy <= 0) {
//向上滚动恢复显示 //向上滚动恢复显示
quick_consult_card.visibility = View.VISIBLE quick_consult_card.visibility = View.VISIBLE
}else{ } else {
//向下滚动隐藏 //向下滚动隐藏
quick_consult_card.visibility = View.GONE quick_consult_card.visibility = View.GONE
} }
...@@ -309,11 +323,16 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -309,11 +323,16 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
private fun initClick() { private fun initClick() {
quick_consult_card.setOnClickListener { quick_consult_card.setOnClickListener {
ActionCountUtils.record("listen_counselor_list_page", "akey_consult_icon_click") ActionCountUtils.record("listen_counselor_list_page", "akey_consult_icon_click")
if (!PhoneCallIn.loginByOneKeyLogin(this,true)) { if (!PhoneCallIn.loginByOneKeyLogin(this, true)) {
return@setOnClickListener return@setOnClickListener
} }
bottomSheetDialogFragment=ConfideBottomSheetDialogFragment() bottomSheetDialogFragment = ConfideBottomSheetDialogFragment()
bottomSheetDialogFragment?.showBottomSheetDialog(this as FragmentActivity, HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro("0"),"0",true) bottomSheetDialogFragment?.showBottomSheetDialog(
this as FragmentActivity,
HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro("0"),
"0",
true
)
} }
...@@ -324,21 +343,21 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -324,21 +343,21 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
finish() finish()
} }
img_mine.setOnClickListener { img_mine.setOnClickListener {
//跳转倾诉列表 //跳转倾诉列表
ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click","1") ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click", "1")
if (!PhoneCallIn.loginByOneKeyLogin(this,true)) { if (!PhoneCallIn.loginByOneKeyLogin(this, true)) {
return@setOnClickListener return@setOnClickListener
} }
val h5Paramsqing = H5Params(YDL_H5 + "confideOrderList", null) val h5Paramsqing = H5Params(YDL_H5 + "confideOrderList", null)
NewH5Activity.start(this, h5Paramsqing) NewH5Activity.start(this, h5Paramsqing)
} }
findViewById<View>(R.id.img_customer)?.setOnClickListener { findViewById<View>(R.id.img_customer)?.setOnClickListener {
ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click","2") ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click", "2")
val imService = findRouteService(IImService::class.java) val imService = findRouteService(IImService::class.java)
imService.startP2PXiaoYi(this) imService.startP2PXiaoYi(this)
} }
findViewById<View>(R.id.img_help)?.setOnClickListener { findViewById<View>(R.id.img_help)?.setOnClickListener {
ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click","3") ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click", "3")
val params = H5Params("https://activity.yidianling.com/activity/qs", "")//倾诉指南 val params = H5Params("https://activity.yidianling.com/activity/qs", "")//倾诉指南
params.isShowMenu = true params.isShowMenu = true
NewH5Activity.start(this, params) NewH5Activity.start(this, params)
...@@ -370,7 +389,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -370,7 +389,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
mConfideAdapter = ConfideHomeAdapter(ConfideHomeActivity@ this, mConfideEvent!!, this) mConfideAdapter = ConfideHomeAdapter(ConfideHomeActivity@ this, mConfideEvent!!, this)
} }
rv_list.addItemDecoration(FilterItemDecoration()) rv_list.addItemDecoration(FilterItemDecoration())
val layoutManager = WrapContentLinearLayoutManager(this, WrapContentLinearLayoutManager.VERTICAL, false) val layoutManager =
WrapContentLinearLayoutManager(this, WrapContentLinearLayoutManager.VERTICAL, false)
rv_list.layoutManager = layoutManager rv_list.layoutManager = layoutManager
rv_list.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader) rv_list.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader)
rv_list.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader) rv_list.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader)
...@@ -480,7 +500,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -480,7 +500,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
dismissProgressDialog() dismissProgressDialog()
rv_list.loadMoreComplete() rv_list.loadMoreComplete()
bean.recommendId = page bean.recommendId = page
if(bean.body?.size?:0==0) { if (bean.body?.size ?: 0 == 0) {
rv_list.loadMoreComplete() rv_list.loadMoreComplete()
mConfideAdapter!!.notifyDataSetChanged() mConfideAdapter!!.notifyDataSetChanged()
return return
...@@ -538,7 +558,11 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -538,7 +558,11 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
listScrollListener?.moveToPosition(rv_list) listScrollListener?.moveToPosition(rv_list)
} }
override fun showSortPopupWindow(v_line_top: View, tvSort: DrawableRightTextView, bodyBean: ConfideHomeBodyBean?) { override fun showSortPopupWindow(
v_line_top: View,
tvSort: DrawableRightTextView,
bodyBean: ConfideHomeBodyBean?
) {
ActionCountUtils.record("listen_counselor_list_page", "choice_filter_click") ActionCountUtils.record("listen_counselor_list_page", "choice_filter_click")
if (null == allFiltersBean) { if (null == allFiltersBean) {
return return
...@@ -546,10 +570,20 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -546,10 +570,20 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
if (v_filterView.visibility == View.GONE || v_filterView.visibility == View.INVISIBLE) { if (v_filterView.visibility == View.GONE || v_filterView.visibility == View.INVISIBLE) {
listScrollListener?.moveToPosition(rv_list) listScrollListener?.moveToPosition(rv_list)
} }
mConfideEvent?.showSortPopupWindow(v_line_top, v_filterView, bodyBean, allFiltersBean!!, mConfideAdapter!!) mConfideEvent?.showSortPopupWindow(
v_line_top,
v_filterView,
bodyBean,
allFiltersBean!!,
mConfideAdapter!!
)
} }
override fun showSexAgePopupWindow(v_line_top: View, tvSexAge: DrawableRightTextView, bodyBean: ConfideHomeBodyBean?) { override fun showSexAgePopupWindow(
v_line_top: View,
tvSexAge: DrawableRightTextView,
bodyBean: ConfideHomeBodyBean?
) {
ActionCountUtils.record("listen_counselor_list_page", "choice_filter_click") ActionCountUtils.record("listen_counselor_list_page", "choice_filter_click")
if (null == allFiltersBean) { if (null == allFiltersBean) {
return return
...@@ -557,10 +591,20 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -557,10 +591,20 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
if (v_filterView.visibility == View.GONE || v_filterView.visibility == View.INVISIBLE) { if (v_filterView.visibility == View.GONE || v_filterView.visibility == View.INVISIBLE) {
listScrollListener?.moveToPosition(rv_list) listScrollListener?.moveToPosition(rv_list)
} }
mConfideEvent?.showSexAgePopupWindow(v_line_top, v_filterView, bodyBean, allFiltersBean!!, mConfideAdapter!!) mConfideEvent?.showSexAgePopupWindow(
v_line_top,
v_filterView,
bodyBean,
allFiltersBean!!,
mConfideAdapter!!
)
} }
override fun showGoodPopupWindow(v_line_top: View, tvGood: DrawableRightTextView, bodyBean: ConfideHomeBodyBean?) { override fun showGoodPopupWindow(
v_line_top: View,
tvGood: DrawableRightTextView,
bodyBean: ConfideHomeBodyBean?
) {
ActionCountUtils.record("listen_counselor_list_page", "choice_filter_click") ActionCountUtils.record("listen_counselor_list_page", "choice_filter_click")
if (null == allFiltersBean) { if (null == allFiltersBean) {
return return
...@@ -568,7 +612,13 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -568,7 +612,13 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
if (v_filterView.visibility == View.GONE || v_filterView.visibility == View.INVISIBLE) { if (v_filterView.visibility == View.GONE || v_filterView.visibility == View.INVISIBLE) {
listScrollListener?.moveToPosition(rv_list) listScrollListener?.moveToPosition(rv_list)
} }
mConfideEvent?.showGoodPopupWindow(v_line_top, v_filterView, bodyBean, allFiltersBean!!, mConfideAdapter!!) mConfideEvent?.showGoodPopupWindow(
v_line_top,
v_filterView,
bodyBean,
allFiltersBean!!,
mConfideAdapter!!
)
} }
private fun showError() { private fun showError() {
...@@ -580,7 +630,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -580,7 +630,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
rv_list.visibility = View.VISIBLE rv_list.visibility = View.VISIBLE
} }
override fun showError1(msg: String?){ override fun showError1(msg: String?) {
rv_list.loadMoreComplete() rv_list.loadMoreComplete()
msg?.let { msg?.let {
......
...@@ -145,8 +145,13 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -145,8 +145,13 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
shareUrl += "?id=${item.confideId}" shareUrl += "?id=${item.confideId}"
} }
val dialog = YDLShareDialog.style8( val dialog = YDLShareDialog.style8(
aty, "${item.name.get()}_${item.title.get()}", shareUrl, "壹点灵心理服务平台让天下人更快乐", item.avatar.get(), aty,
genMinProgramPath(shareUrl), "gh_25b90294ddcc" "${item.name.get()}_${item.title.get()}",
shareUrl,
"壹点灵心理服务平台让天下人更快乐",
item.avatar.get(),
genMinProgramPath(shareUrl),
"gh_25b90294ddcc"
) )
dialog.show(aty.fragmentManager, "share") dialog.show(aty.fragmentManager, "share")
} }
...@@ -201,13 +206,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -201,13 +206,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
} }
val controller: DraweeController = Fresco.newDraweeControllerBuilder() val controller: DraweeController = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse("res://drawable/"+ R.drawable.first_order)) .setUri(Uri.parse("res://drawable/" + R.drawable.first_order))
.setOldController(binding.confideFirstFree.controller) .setOldController(binding.confideFirstFree.controller)
.setAutoPlayAnimations(true) // 是否自动播放Gif动画 .setAutoPlayAnimations(true) // 是否自动播放Gif动画
.build() .build()
binding.confideFirstFree.controller = controller binding.confideFirstFree.controller = controller
binding.seekbar.progress = 0 binding.seekbar.progress = 0
binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener { binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
...@@ -302,7 +306,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -302,7 +306,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId?.let { item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)+ if(toPay) "&payPage=1" else "" val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)+ if(toPay) "&payPage=1" else ""
ConfideBottomSheetDialogFragment() ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(itemView.context as FragmentActivity, url, item.doctorId!!, uid = item.uid) .showBottomSheetDialog(
itemView.context as FragmentActivity,
url,
item.doctorId!!,
uid = item.uid
)
} }
} }
} }
......
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