Commit 06c65bdd by fengquan

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

# Conflicts:
#	m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
parents c6554397 6db9f48f
...@@ -5,12 +5,12 @@ ext { ...@@ -5,12 +5,12 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.94", "m-confide" : "0.0.49.95",
"m-consultant" : "0.0.60.27", "m-consultant" : "0.0.60.27",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.18", "m-user" : "0.0.62.18",
"m-home" : "0.0.23.74", "m-home" : "0.0.23.74",
"m-im" : "0.0.21.46", "m-im" : "0.0.21.47",
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
...@@ -35,7 +35,7 @@ ext { ...@@ -35,7 +35,7 @@ ext {
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.23", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.41.18", "ydl-platform" : "0.0.41.21",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.80", "ydl-webview" : "0.0.38.80",
...@@ -90,12 +90,12 @@ ext { ...@@ -90,12 +90,12 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.94", "m-confide" : "0.0.49.95",
"m-consultant" : "0.0.60.27", "m-consultant" : "0.0.60.27",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.18", "m-user" : "0.0.62.18",
"m-home" : "0.0.23.74", "m-home" : "0.0.23.74",
"m-im" : "0.0.21.46", "m-im" : "0.0.21.47",
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
...@@ -118,7 +118,7 @@ ext { ...@@ -118,7 +118,7 @@ ext {
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.23", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.41.18", "ydl-platform" : "0.0.41.21",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.80", "ydl-webview" : "0.0.38.80",
......
...@@ -12,12 +12,14 @@ import android.hardware.SensorEventListener ...@@ -12,12 +12,14 @@ 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.Handler import android.os.Handler
import android.os.PowerManager import android.os.PowerManager
import android.os.Vibrator 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
import android.view.WindowManager
import android.view.animation.AccelerateInterpolator import android.view.animation.AccelerateInterpolator
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
...@@ -471,7 +473,19 @@ class AudioHomeActivity : ...@@ -471,7 +473,19 @@ class AudioHomeActivity :
private fun setWindowStatusBarColor() { private fun setWindowStatusBarColor() {
StatusBarUtils.setWindowStatusBarColor(this, R.color.audioim_color_40353535) if (Build.VERSION.SDK_INT >= 21) {
val decorView = window.decorView
val option = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE)
decorView.systemUiVisibility = option
window.statusBarColor = Color.TRANSPARENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
window.attributes?.layoutInDisplayCutoutMode =
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
} else {
StatusBarUtils.setWindowStatusBarColor(this, R.color.audioim_color_40353535)
}
} }
@SuppressLint("InvalidWakeLockTag") @SuppressLint("InvalidWakeLockTag")
......
...@@ -11,6 +11,7 @@ import android.view.LayoutInflater ...@@ -11,6 +11,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
...@@ -63,6 +64,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -63,6 +64,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
lateinit var layoutCall: View lateinit var layoutCall: View
lateinit var layoutChange: View lateinit var layoutChange: View
lateinit var tvCall: TextView lateinit var tvCall: TextView
lateinit var ivCall: ImageView
lateinit var tvTime: TextView lateinit var tvTime: TextView
lateinit var first_order: SimpleDraweeView lateinit var first_order: SimpleDraweeView
lateinit var confideProgress: View lateinit var confideProgress: View
...@@ -162,6 +164,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -162,6 +164,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
layout_change_text = itemView.findViewById<View>(R.id.layout_change_text) layout_change_text = itemView.findViewById<View>(R.id.layout_change_text)
layoutBottom = itemView.findViewById<View>(R.id.layoutBottom) layoutBottom = itemView.findViewById<View>(R.id.layoutBottom)
tvCall = itemView.findViewById<TextView>(R.id.tvCall) tvCall = itemView.findViewById<TextView>(R.id.tvCall)
ivCall = itemView.findViewById<ImageView>(R.id.ivCall)
tvTime = itemView.findViewById<TextView>(R.id.tvTime) tvTime = itemView.findViewById<TextView>(R.id.tvTime)
first_order = itemView.findViewById<SimpleDraweeView>(R.id.first_order) first_order = itemView.findViewById<SimpleDraweeView>(R.id.first_order)
val userService = findRouteService(IUserService::class.java) val userService = findRouteService(IUserService::class.java)
...@@ -468,7 +471,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -468,7 +471,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun onLoadDialStatus(doctorId: String) { private fun onLoadDialStatus(doctorId: String, showTip: Boolean = false) {
if (doctorId.isBlank()) return if (doctorId.isBlank()) return
if (doctorId == "0") return if (doctorId == "0") return
val confideApi = YDLHttpUtils.obtainApi(ConfideHomeApi::class.java) val confideApi = YDLHttpUtils.obtainApi(ConfideHomeApi::class.java)
...@@ -486,26 +489,42 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -486,26 +489,42 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
1 -> { 1 -> {
tvCall.text = "立即拨打" tvCall.text = "立即拨打"
tvTime.visibility = View.GONE tvTime.visibility = View.GONE
ivCall.visibility = View.VISIBLE
layoutCall.background = layoutCall.background =
context?.getDrawable(R.drawable.confide_line_bg_1) context?.getDrawable(R.drawable.confide_line_bg_1)
} }
2 -> { 2 -> {
tvCall.text = "已离线" tvCall.text = "已离线"
tvTime.visibility = View.GONE tvTime.visibility = View.VISIBLE
ivCall.visibility = View.GONE
tvTime.text = "(点击喊他上线)"
layoutCall.background = layoutCall.background =
context?.getDrawable(R.drawable.confide_line_bg_2) context?.getDrawable(R.drawable.confide_line_bg_2)
if (showTip) {
if (!uid.isNullOrBlank()) {
findRouteService(IImService::class.java).startChat(requireActivity(), uid!!, 0, 0)
}
}
} }
3 -> { 3 -> {
tvCall.text = "通话中" tvCall.text = "通话中"
tvTime.visibility = View.GONE tvTime.visibility = View.VISIBLE
ivCall.visibility = View.GONE
tvTime.text = "(点击给他留言)"
layoutCall.background = layoutCall.background =
context?.getDrawable(R.drawable.confide_line_bg_3) context?.getDrawable(R.drawable.confide_line_bg_3)
if (showTip) {
ToastUtil.toastShort("对方正在通话中,请稍后拨打")
if (!uid.isNullOrBlank()) {
findRouteService(IImService::class.java).startChat(requireActivity(), uid!!, 0, 0)
}
}
} }
4 -> { 4 -> {
tvCall.text = "继续倾诉" tvCall.text = "继续倾诉"
ivCall.visibility = View.VISIBLE
layoutCall.background = layoutCall.background =
context?.getDrawable(R.drawable.confide_line_bg_1) context?.getDrawable(R.drawable.confide_line_bg_1)
context?.getDrawable(R.drawable.confide_line_bg_1)
val t = resp?.data?.remainingTime?.remainingTime val t = resp?.data?.remainingTime?.remainingTime
if (t != null) { if (t != null) {
tvTime.visibility = View.VISIBLE tvTime.visibility = View.VISIBLE
......
package com.ydl.confide.home package com.ydl.confide.home
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context import android.content.Context
import android.graphics.Color import android.graphics.Color
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.view.View import android.view.View
import android.view.ViewGroup
import android.view.WindowManager import android.view.WindowManager
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
...@@ -28,9 +30,11 @@ import com.ydl.confide.home.event.ConfideHomeEventImpl ...@@ -28,9 +30,11 @@ import com.ydl.confide.home.event.ConfideHomeEventImpl
import com.ydl.confide.home.event.IConfideHomeEvent import com.ydl.confide.home.event.IConfideHomeEvent
import com.ydl.confide.home.listener.ConfideHomeRecycleViewListener import com.ydl.confide.home.listener.ConfideHomeRecycleViewListener
import com.ydl.confide.home.listener.ConfideHomeRecyleSuspendListener import com.ydl.confide.home.listener.ConfideHomeRecyleSuspendListener
import com.ydl.confide.home.modular.service.ConfideWebServiceImpl
import com.ydl.confide.home.presenter.ConfideHomePresenterImpl import com.ydl.confide.home.presenter.ConfideHomePresenterImpl
import com.ydl.confide.home.util.ConfideHomeUtils import com.ydl.confide.home.util.ConfideHomeUtils
import com.ydl.confide.home.widget.FilterItemDecoration import com.ydl.confide.home.widget.FilterItemDecoration
import com.ydl.confide.intro.VideoViewModel
import com.ydl.confide.router.PhoneCallIn import com.ydl.confide.router.PhoneCallIn
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
...@@ -185,6 +189,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -185,6 +189,8 @@ 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 doctorId = intent.getStringExtra(IYDLRouterConstant.EXTRA_DOCTORID)
isSplash = intent.getBooleanExtra("isSplash", false) isSplash = intent.getBooleanExtra("isSplash", false)
//初始化View //初始化View
...@@ -209,6 +215,18 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -209,6 +215,18 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
if (isFromRed){ if (isFromRed){
ToastUtil.toastLong(this@ConfideHomeActivity,"红包已领取成功 可立即点击拨打") ToastUtil.toastLong(this@ConfideHomeActivity,"红包已领取成功 可立即点击拨打")
} }
if (!confidedId.isNullOrBlank() && !doctorId.isNullOrBlank()){
ConfideWebServiceImpl().connectionJava(confidedId.toInt(), 3, this@ConfideHomeActivity, null) {
showDoctorDetail(confidedId,doctorId)
}
}
}
private fun showDoctorDetail(confideId: String,doctorId:String) {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(confideId)
ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(this@ConfideHomeActivity, url, doctorId)
} }
override fun onResume() { override fun onResume() {
...@@ -232,7 +250,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -232,7 +250,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
} }
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 =
if (listenFree) dp48 / 2 else 0
} }
} }
...@@ -376,7 +395,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -376,7 +395,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
* 设置筛选模块悬浮顶部监听数据 * 设置筛选模块悬浮顶部监听数据
*/ */
private fun setSuspendListener() { private fun setSuspendListener() {
listSuspendListener?.setFilterView(v_filterView) listSuspendListener?.setFilterView(v_filterView, vFilterLine)
listSuspendListener?.setSectionAdapter(mConfideAdapter!!) listSuspendListener?.setSectionAdapter(mConfideAdapter!!)
} }
......
...@@ -23,11 +23,13 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -23,11 +23,13 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() {
private var mSuspensionHeight: Int = RxImageTool.dip2px(48f) private var mSuspensionHeight: Int = RxImageTool.dip2px(48f)
private var filterView: ConfideHomeFilterView? = null private var filterView: ConfideHomeFilterView? = null
private var divView: View? = null
private var adapter: ConfideHomeAdapter? = null private var adapter: ConfideHomeAdapter? = null
fun setFilterView(filterView: ConfideHomeFilterView) { fun setFilterView(filterView: ConfideHomeFilterView, divView: View) {
this.filterView = filterView this.filterView = filterView
this.divView = divView
} }
fun setSectionAdapter(adapter: ConfideHomeAdapter) { fun setSectionAdapter(adapter: ConfideHomeAdapter) {
...@@ -56,14 +58,17 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -56,14 +58,17 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() {
if (view != null) { if (view != null) {
if (view.top <= mSuspensionHeight) { if (view.top <= mSuspensionHeight) {
filterView!!.visibility = View.VISIBLE filterView!!.visibility = View.VISIBLE
divView?.visibility = View.VISIBLE
} else { } else {
// filterView!!.visibility = View.INVISIBLE // filterView!!.visibility = View.INVISIBLE
} }
} }
}else if (adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_RECOMMEND || adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_SOUND){ }else if (adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_RECOMMEND || adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_SOUND){
filterView!!.visibility = View.VISIBLE filterView!!.visibility = View.VISIBLE
divView?.visibility = View.VISIBLE
}else { }else {
filterView!!.visibility = View.INVISIBLE filterView!!.visibility = View.INVISIBLE
divView?.visibility = View.INVISIBLE
} }
} }
} }
\ No newline at end of file
...@@ -6,13 +6,14 @@ import android.graphics.Paint ...@@ -6,13 +6,14 @@ import android.graphics.Paint
import android.graphics.Rect import android.graphics.Rect
import android.view.View import android.view.View
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.yidianling.common.tools.RxImageTool
class FilterItemDecoration : RecyclerView.ItemDecoration() { class FilterItemDecoration : RecyclerView.ItemDecoration() {
private val bounds = Rect() private val bounds = Rect()
private val paint = Paint().apply { private val paint = Paint().apply {
color = Color.parseColor("#EFEFF1") color = Color.parseColor("#EFEFF1")
strokeWidth = 1F strokeWidth = 2F
} }
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) { override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
......
...@@ -201,7 +201,7 @@ internal class IntroAdapter( ...@@ -201,7 +201,7 @@ internal class IntroAdapter(
.subscribe({ resp -> .subscribe({ resp ->
if (resp.code == "200") { if (resp.code == "200") {
val lineStatus = resp.data?.confideLine ?: 2 val lineStatus = resp.data?.confideLine ?: 2
if (lineStatus == 4) {//继续倾诉 if (lineStatus == 4) {//继续倾诉4,1在线 2离线 3通话中
val t = resp?.data?.remainingTime?.remainingTime val t = resp?.data?.remainingTime?.remainingTime
if (t != null) { if (t != null) {
val remain = TimeUtil.getElapseTimeForShow(t * 1000) val remain = TimeUtil.getElapseTimeForShow(t * 1000)
...@@ -212,6 +212,10 @@ internal class IntroAdapter( ...@@ -212,6 +212,10 @@ internal class IntroAdapter(
) )
) )
} }
} else if (lineStatus == 3) {
data[position].remainingTime.set("(点击给他留言)")
} else if (lineStatus == 2) {
data[position].remainingTime.set("(点击喊他上线)")
} }
data[position].lineStatus.set(lineStatus) data[position].lineStatus.set(lineStatus)
} else { } else {
......
...@@ -20,6 +20,7 @@ import com.ydl.confide.databinding.ItemExpertIntroBinding ...@@ -20,6 +20,7 @@ import com.ydl.confide.databinding.ItemExpertIntroBinding
import com.ydl.confide.home.ConfideBottomSheetDialogFragment import com.ydl.confide.home.ConfideBottomSheetDialogFragment
import com.ydl.confide.home.bean.ConfideHomeBodyBean import com.ydl.confide.home.bean.ConfideHomeBodyBean
import com.ydl.confide.home.modular.service.ConfideWebServiceImpl import com.ydl.confide.home.modular.service.ConfideWebServiceImpl
import com.ydl.confide.router.PhoneCallIn
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.modular.findRouteService import com.ydl.ydlcommon.modular.findRouteService
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
...@@ -56,6 +57,9 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -56,6 +57,9 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
fun onBind(item: VideoViewModel) { fun onBind(item: VideoViewModel) {
vm = item vm = item
binding.layoutCall.setOnClickListener { binding.layoutCall.setOnClickListener {
if (!PhoneCallIn.loginByOneKeyLogin(itemView.context, true)) {
return@setOnClickListener
}
ActionCountUtils.record( ActionCountUtils.record(
"listen_counselor_content_play_page", "listen_counselor_content_play_page",
"listen_counselor_content_play_icon_click", "listen_counselor_content_play_icon_click",
...@@ -96,7 +100,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -96,7 +100,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
.showBottomSheetDialog( .showBottomSheetDialog(
itemView.context as FragmentActivity, itemView.context as FragmentActivity,
HttpConfig.MH5_URL + ConfideRoute.h5ExpertEval(it, item.confideId ?: ""), HttpConfig.MH5_URL + ConfideRoute.h5ExpertEval(it, item.confideId ?: ""),
it it, uid = item.uid
) )
} }
} }
...@@ -298,7 +302,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -298,7 +302,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId?.let { item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it) val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)
ConfideBottomSheetDialogFragment() ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(itemView.context as FragmentActivity, url, item.doctorId!!) .showBottomSheetDialog(itemView.context as FragmentActivity, url, item.doctorId!!, uid = item.uid)
} }
} }
} }
...@@ -330,7 +334,8 @@ private fun genMinProgramPath(url: String): String { ...@@ -330,7 +334,8 @@ private fun genMinProgramPath(url: String): String {
internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel { internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel {
name.set(bean.confidedName) name.set(bean.confidedName)
avatar.set(bean.confidedIcon) avatar.set(bean.confidedIcon)
count.set("倾听人次 " + bean.confideNum) val num = bean.confideNum?.replace("人", "") ?: "0"
count.set("倾听人次 $num")
intro.set(bean.confideContent) intro.set(bean.confideContent)
title.set(bean.title) title.set(bean.title)
val sb = StringBuilder() val sb = StringBuilder()
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<gradient <gradient
android:endColor="#33000000" android:angle="90"
android:startColor="#00000000" /> android:centerColor="#33000000"
android:endColor="#00000000"
android:startColor="#80000000" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="#00000000"
android:startColor="#66000000" />
</shape>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<shape> <shape>
<corners android:radius="4dp" /> <corners android:radius="4dp" />
<solid android:color="#59FFFFFF" /> <solid android:color="#59FFFFFF" />
<stroke android:width="3dp" android:color="@color/transparent"/> <stroke android:width="5dp" android:color="@color/transparent"/>
</shape> </shape>
</item> </item>
</selector> </selector>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<shape> <shape>
<corners android:radius="4dp" /> <corners android:radius="4dp" />
<solid android:color="@color/white" /> <solid android:color="@color/white" />
<stroke android:width="3dp" android:color="@color/transparent"/> <stroke android:width="5dp" android:color="@color/transparent"/>
</shape> </shape>
</clip> </clip>
</item> </item>
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<ImageView <ImageView
android:id="@+id/ivBack" android:id="@+id/ivBack"
android:layout_width="44dp" android:layout_width="36dp"
android:layout_height="44dp" android:layout_height="36dp"
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:padding="12dp" android:padding="12dp"
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
app:layout_constraintTop_toTopOf="@+id/ivBack" app:layout_constraintTop_toTopOf="@+id/ivBack"
app:shapeBg="@{0x26000000}" app:shapeBg="@{0x26000000}"
app:shapeRadius="@{15}" app:shapeRadius="@{15}"
app:shapeStrokeWidth="@{1}" app:shapeStrokeColor="@{0x69FFFFFF}"
app:shapeStrokeColor="@{0x69FFFFFF}" /> app:shapeStrokeWidth="@{1}" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layoutCall" android:id="@+id/layoutCall"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="44dp" android:layout_height="47dp"
android:layout_marginBottom="32dp" android:layout_marginBottom="28dp"
android:background="@drawable/confide_line_bg_1" android:background="@drawable/confide_line_bg_1"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
android:text="继续倾诉" android:text="继续倾诉"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="17sp" android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/tvTime" app:layout_constraintBottom_toTopOf="@+id/tvTime"
app:layout_constraintLeft_toRightOf="@+id/ivCall" app:layout_constraintLeft_toRightOf="@+id/ivCall"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
...@@ -93,7 +94,7 @@ ...@@ -93,7 +94,7 @@
<LinearLayout <LinearLayout
android:id="@+id/layoutChange" android:id="@+id/layoutChange"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="44dp" android:layout_height="47dp"
android:layout_marginStart="@dimen/platform_dp_23" android:layout_marginStart="@dimen/platform_dp_23"
android:layout_marginBottom="32dp" android:layout_marginBottom="32dp"
android:background="@drawable/confide_line_bg_change" android:background="@drawable/confide_line_bg_change"
...@@ -112,7 +113,8 @@ ...@@ -112,7 +113,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="再换一位" android:text="再换一位"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="17sp" /> android:textSize="17sp"
android:textStyle="bold" />
<ProgressBar <ProgressBar
android:id="@+id/confide_progress" android:id="@+id/confide_progress"
......
...@@ -144,6 +144,14 @@ ...@@ -144,6 +144,14 @@
android:background="@color/white" android:background="@color/white"
android:visibility="gone" /> android:visibility="gone" />
<View
android:id="@+id/vFilterLine"
android:layout_width="match_parent"
android:layout_below="@+id/v_filterView"
android:visibility="gone"
android:layout_height="1px"
android:background="#E1E1E4" />
<com.ydl.ydlcommon.mvp.lce.view.YDLStateView <com.ydl.ydlcommon.mvp.lce.view.YDLStateView
android:id="@+id/lce_state_view" android:id="@+id/lce_state_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardElevation="0dp" app:cardElevation="0dp"
app:cardCornerRadius="6dp" app:cardCornerRadius="6dp"
android:layout_marginTop="@dimen/platform_dp_24" android:layout_marginTop="20dp"
android:layout_marginStart="@dimen/platform_dp_15" android:layout_marginStart="@dimen/platform_dp_15"
android:id="@+id/img_bg" android:id="@+id/img_bg"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -49,15 +49,15 @@ ...@@ -49,15 +49,15 @@
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<TextView <TextView
android:id="@+id/tv_name" android:id="@+id/tv_name"
app:layout_constraintStart_toEndOf="@id/img_bg"
app:layout_constraintTop_toTopOf="@id/img_bg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="14dp" android:layout_marginStart="14dp"
android:textSize="@dimen/platform_sp_16"
android:textColor="@color/platform_color_333333" android:textColor="@color/platform_color_333333"
tools:text="姚雨晴" android:textSize="@dimen/platform_sp_16"
/> android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/img_bg"
app:layout_constraintTop_toTopOf="@id/img_bg"
tools:text="姚雨晴" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:drawableTop="@drawable/ic_action_confide_order" android:drawableTop="@drawable/ic_action_confide_order"
android:drawablePadding="4dp" android:drawablePadding="2dp"
android:gravity="center" android:gravity="center"
android:text="订单" android:text="订单"
android:textColor="@color/_9" android:textColor="@color/_9"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:drawableTop="@drawable/ic_action_confide_customer" android:drawableTop="@drawable/ic_action_confide_customer"
android:drawablePadding="4dp" android:drawablePadding="2dp"
android:gravity="center" android:gravity="center"
android:text="客服" android:text="客服"
android:textColor="@color/_9" android:textColor="@color/_9"
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:drawableTop="@drawable/ic_action_confide_help" android:drawableTop="@drawable/ic_action_confide_help"
android:drawablePadding="4dp" android:drawablePadding="2dp"
android:gravity="center" android:gravity="center"
android:text="帮助" android:text="帮助"
android:textColor="@color/_9" android:textColor="@color/_9"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -24,14 +21,16 @@ ...@@ -24,14 +21,16 @@
> >
</ImageView> </ImageView>
<TextView <TextView
android:id="@+id/text_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=""
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:id="@+id/text_title" android:text=""
android:visibility="gone" android:textColor="@color/black"
> android:textSize="18dp"
android:visibility="gone">
</TextView> </TextView>
<View <View
android:layout_width="@dimen/platform_dp_36" android:layout_width="@dimen/platform_dp_36"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
android:id="@+id/videoView" android:id="@+id/videoView"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toTopOf="@+id/layoutCall"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:imageUrl="@{item.coverUrl}" app:imageUrl="@{item.coverUrl}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@+id/videoView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
android:layout_height="76dp" android:layout_height="76dp"
android:src="@drawable/ic_video_play" android:src="@drawable/ic_video_play"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@+id/videoView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
android:layout_height="76dp" android:layout_height="76dp"
android:padding="24dp" android:padding="24dp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@+id/videoView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
...@@ -77,10 +77,10 @@ ...@@ -77,10 +77,10 @@
android:id="@+id/seekbar" android:id="@+id/seekbar"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="23dp" android:layout_marginBottom="16dp"
android:maxHeight="8dp" android:maxHeight="10dp"
android:paddingTop="4dp" android:paddingTop="8dp"
android:paddingBottom="4dp" android:paddingBottom="8dp"
android:paddingStart="0dp" android:paddingStart="0dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:progressDrawable="@drawable/confide_seekbar_style" android:progressDrawable="@drawable/confide_seekbar_style"
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layoutCall" android:id="@+id/layoutCall"
android:layout_width="160dp" android:layout_width="160dp"
android:layout_height="44dp" android:layout_height="47dp"
android:layout_marginBottom="32dp" android:layout_marginBottom="28dp"
android:background="@{item.lineStatus==3?@drawable/confide_line_bg_3:(item.lineStatus==2?@drawable/confide_line_bg_2:@drawable/confide_line_bg_1)}" android:background="@{item.lineStatus==3?@drawable/confide_line_bg_3:(item.lineStatus==2?@drawable/confide_line_bg_2:@drawable/confide_line_bg_1)}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:src="@drawable/ic_confide_call" android:src="@drawable/ic_confide_call"
android:visibility="@{item.lineStatus==2?View.GONE:View.VISIBLE}" android:visibility="@{item.lineStatus==1?View.VISIBLE:View.GONE}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
android:text="立即拨打" android:text="立即拨打"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"
app:confideLineText="@{item.lineStatus}" app:confideLineText="@{item.lineStatus}"
app:layout_constraintBottom_toTopOf="@+id/tvTime" app:layout_constraintBottom_toTopOf="@+id/tvTime"
app:layout_constraintLeft_toRightOf="@+id/ivCall" app:layout_constraintLeft_toRightOf="@+id/ivCall"
...@@ -224,50 +225,93 @@ ...@@ -224,50 +225,93 @@
app:layout_constraintLeft_toRightOf="@+id/tvName" app:layout_constraintLeft_toRightOf="@+id/tvName"
tools:text="tag|tag|tag" /> tools:text="tag|tag|tag" />
<TextView <LinearLayout
android:id="@+id/btnShare" android:id="@+id/btnShare"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="18dp" android:layout_marginRight="18dp"
android:layout_marginBottom="56dp" android:layout_marginBottom="55dp"
android:drawableTop="@drawable/ic_video_share" android:orientation="vertical"
android:drawablePadding="6dp"
android:gravity="center_horizontal"
android:text="分享"
android:textColor="@color/white"
android:textSize="11sp"
app:layout_constraintBottom_toTopOf="@+id/layoutCall" app:layout_constraintBottom_toTopOf="@+id/layoutCall"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent">
<TextView <ImageView
android:layout_width="29dp"
android:layout_height="29dp"
android:src="@drawable/ic_video_share" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/text_share" />
<!--<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="分享"
android:textColor="@color/white"
android:textSize="11sp" />-->
</LinearLayout>
<LinearLayout
android:id="@+id/btnEvaluate" android:id="@+id/btnEvaluate"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="18dp" android:layout_marginRight="18dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:drawableTop="@drawable/ic_video_eval" android:orientation="vertical"
android:drawablePadding="6dp"
android:gravity="center_horizontal"
android:text="评价"
android:textColor="@color/white"
android:textSize="11sp"
app:layout_constraintBottom_toTopOf="@+id/btnShare" app:layout_constraintBottom_toTopOf="@+id/btnShare"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent">
<TextView <ImageView
android:layout_width="29dp"
android:layout_height="29dp"
android:src="@drawable/ic_video_eval" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/text_eval" />
<!--<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="评价"
android:textColor="@color/white"
android:textSize="11sp" />-->
</LinearLayout>
<LinearLayout
android:id="@+id/btnChat" android:id="@+id/btnChat"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="18dp" android:layout_marginRight="18dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:drawableTop="@drawable/ic_video_chat" android:orientation="vertical"
android:drawablePadding="6dp" android:gravity="center"
android:gravity="center_horizontal"
android:text="私聊"
android:textColor="@color/white"
android:textSize="11sp"
app:layout_constraintBottom_toTopOf="@+id/btnEvaluate" app:layout_constraintBottom_toTopOf="@+id/btnEvaluate"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent">
<ImageView
android:layout_width="29dp"
android:layout_height="29dp"
android:src="@drawable/ic_video_chat" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/text_chat" />
<!--<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="私聊"
android:textColor="@color/white"
android:textSize="11sp" />-->
</LinearLayout>
<ImageView <ImageView
android:id="@+id/ivAvatar" android:id="@+id/ivAvatar"
......
...@@ -26,11 +26,13 @@ ...@@ -26,11 +26,13 @@
app:imageUrl="@{item.videoCoverUrl}" /> app:imageUrl="@{item.videoCoverUrl}" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|left" android:layout_gravity="bottom|left"
android:layout_marginLeft="10dp" android:background="@drawable/bg_expert_video_item"
android:layout_marginBottom="10dp" android:maxLines="1"
android:paddingLeft="10dp"
android:paddingBottom="10dp"
android:text="@{item.name}" android:text="@{item.name}"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="15sp" /> android:textSize="15sp" />
......
...@@ -21,27 +21,29 @@ public class CustomAttachmentShareMsg extends CustomAttachment { ...@@ -21,27 +21,29 @@ public class CustomAttachmentShareMsg extends CustomAttachment {
private final String KEY_SHAREPOPULAR="sharePopular";// 分享的人气 private final String KEY_SHAREPOPULAR="sharePopular";// 分享的人气
private final String KEY_SHARE_JUMP_URL="url";// 分享的跳转链接 private final String KEY_SHARE_JUMP_URL="url";// 分享的跳转链接
private final String KEY_CONFIDEDID="confidedId";//倾诉id
private final String KEY_DOCTORID="doctorId";
private String shareUrl; private String shareUrl;
private String sharePrice; private String sharePrice;
//分享类型,0:测试;1,课程;2,文章;3:倾诉 //分享类型,0:测试;1,课程;2,文章;3:倾诉
private int shareType; private int shareType;
private String confidedId;
private String doctorId;
public CustomAttachmentShareMsg() { public CustomAttachmentShareMsg() {
super(CustomAttachmentType.TYPE_PUSH_SHARE); super(CustomAttachmentType.TYPE_PUSH_SHARE);
} }
public CustomAttachmentShareMsg(String url, String money, ShareMsgTypeEnum typeEnum) {
super(CustomAttachmentType.TYPE_PUSH_SHARE);
this.shareUrl = url;
this.sharePrice = money;
this.shareType = typeEnum.value();
}
@Override @Override
protected void parseData(JSONObject data) { protected void parseData(JSONObject data) {
this.shareUrl=data.getString(KEY_SHARE_JUMP_URL); this.shareUrl=data.getString(KEY_SHARE_JUMP_URL);
this.sharePrice =data.getString(KEY_PRICE); this.sharePrice =data.getString(KEY_PRICE);
this.shareType = data.getInteger(KEY_SHARETYPE); this.shareType = data.getInteger(KEY_SHARETYPE);
this.confidedId = data.getString(KEY_CONFIDEDID);
this.doctorId = data.getString(KEY_DOCTORID);
} }
@Override @Override
...@@ -50,6 +52,8 @@ public class CustomAttachmentShareMsg extends CustomAttachment { ...@@ -50,6 +52,8 @@ public class CustomAttachmentShareMsg extends CustomAttachment {
data.put(KEY_SHARE_JUMP_URL, shareUrl); data.put(KEY_SHARE_JUMP_URL, shareUrl);
data.put(KEY_PRICE, sharePrice); data.put(KEY_PRICE, sharePrice);
data.put(KEY_SHARETYPE, shareType); data.put(KEY_SHARETYPE, shareType);
data.put(KEY_CONFIDEDID, confidedId);
data.put(KEY_DOCTORID, doctorId);
return data; return data;
} }
...@@ -64,4 +68,11 @@ public class CustomAttachmentShareMsg extends CustomAttachment { ...@@ -64,4 +68,11 @@ public class CustomAttachmentShareMsg extends CustomAttachment {
public int getShareType() { public int getShareType() {
return shareType; return shareType;
} }
public String getConfidedId() {
return confidedId;
}
public String getDoctorId() {
return doctorId;
}
} }
...@@ -59,7 +59,9 @@ public class MsgViewHolderReceivedMoney extends MsgViewHolderBase { ...@@ -59,7 +59,9 @@ public class MsgViewHolderReceivedMoney extends MsgViewHolderBase {
num = customAttachReceivedMoney.getNum(); num = customAttachReceivedMoney.getNum();
isNewOrder = customAttachReceivedMoney.getNewOrder(); isNewOrder = customAttachReceivedMoney.getNewOrder();
if (title != null) tit.setText(title); if (title != null) {
tit.setText(title);
}
if (orPay == 1) { if (orPay == 1) {
//支付成功 //支付成功
if (num != null) { if (num != null) {
......
package com.yidianling.im.session.viewholder;
import android.annotation.SuppressLint;
import android.widget.TextView;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.bean.PushConfideStatusBean;
import com.yidianling.im.http.ImRetrofitApi;
import com.yidianling.im.router.ImIn;
import com.yidianling.im.session.extension.CustomAttachmentShareMsg;
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
import com.yidianling.user.api.bean.UserResponseBean;
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* Created by haorui on 2019-11-06 .
* Des: 分享 消息
* 分享的类型,0:测试;1,课程;2,文章;3:倾诉
*/
public class MsgViewHolderShareMsg extends MsgViewHolderBase {
private TextView tv_confide_money;
private TextView tv_confide;
public String mShareUrl;
public String mPrice;
private int mShareType;
private Disposable mSubscribe;
public MsgViewHolderShareMsg(BaseMultiItemFetchLoadAdapter adapter) {
super(adapter);
}
@Override
protected int getContentResId() {
MsgAttachment attachment = message.getAttachment();
if (attachment instanceof CustomAttachmentShareMsg) {
CustomAttachmentShareMsg customMsg = (CustomAttachmentShareMsg) attachment;
switch (customMsg.getShareType()) {
//0:测试;
case 0:
return R.layout.im_ui_message_custom_confide;
//1,课程;
case 1:
return R.layout.im_ui_message_custom_confide;
//2,文章;
case 2:
return R.layout.im_ui_message_custom_confide;
//3:倾诉
case 3:
return R.layout.im_ui_message_custom_confide;
}
}
return R.layout.im_ui_message_custom_confide;
}
@Override
protected void inflateContentView() {
tv_confide_money = view.findViewById(R.id.tv_confide_money);
tv_confide = view.findViewById(R.id.tv_confide);
}
@Override
protected void bindContentView() {
MsgAttachment attachment = message.getAttachment();
if (attachment instanceof CustomAttachmentShareMsg) {
mShareUrl = ((CustomAttachmentShareMsg) attachment).getShareUrl();
mPrice = ((CustomAttachmentShareMsg) attachment).getSharePrice();
mShareType = ((CustomAttachmentShareMsg) attachment).getShareType();
}
if (isReceivedMessage()) {
setAvatarRightInVisibity();
} else {
setAvatarLeftInVisibity();
}
switch (mShareType) {
//0:测试;
case 0:
break;
//1,课程;
case 1:
break;
//2,文章;
case 2:
break;
//3:倾诉
case 3:
tv_confide_money.setText(mPrice);
break;
}
}
@Override
protected void onItemClick() {
super.onItemClick();
if (Utils.isFastClick()) {
//防止连击
return;
}
requestConfideStatus();
}
@SuppressLint("CheckResult")
private void requestConfideStatus() {
if(mSubscribe != null && !mSubscribe.isDisposed()){
mSubscribe.dispose();
}
UserResponseBean userInfo = ImIn.INSTANCE.getUserResponse();
mSubscribe = ImRetrofitApi.Companion.getImJavaApi().getPushConfideStatus(userInfo.getUid(), message.getFromAccount()).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(it -> {
if ("200".equals(it.code)) {
PushConfideStatusBean data = it.data;
if (data.getIsOpen() != 1) {
ToastUtil.toastShort(view.getContext().getString(R.string.im_push_confide_msg_unopened));
return;
}
if (data.getIsOnline() != 1) {
ToastUtil.toastShort(view.getContext().getString(R.string.im_push_confide_msg_offline));
return;
}
if (data.getIsReducible() != 1) {
ToastUtil.toastShort(view.getContext().getString(R.string.im_push_confide_msg_busy));
return;
}
if (data.getIsStatus() != 1) {
ToastUtil.toastShort(view.getContext().getString(R.string.im_push_confide_msg_calling));
return;
}
NewH5Activity.start(view.getContext(), new H5Params(mShareUrl, null));
}
}, t -> {
HttpErrorUtils.Companion.handleError(context, t);
});
}
}
package com.yidianling.im.session.viewholder
import android.annotation.SuppressLint
import android.widget.TextView
import com.ydl.confide.api.ConfideRoute.R_CONFIDE_HOME
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.modular.route
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.im.bean.PushConfideStatusBean
import com.yidianling.im.http.ImRetrofitApi.Companion.getImJavaApi
import com.yidianling.im.router.ImIn.getUserResponse
import com.yidianling.im.session.extension.CustomAttachmentShareMsg
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
/**
* Created by haorui on 2019-11-06 .
* Des: 分享 消息
* 分享的类型,0:测试;1,课程;2,文章;3:倾诉
* 消息由咨询师端触发
*/
class MsgViewHolderShareMsg(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
MsgViewHolderBase(adapter) {
private var tv_confide_money: TextView? = null
private var tv_confide: TextView? = null
var mShareUrl: String? = null
var mPrice: String? = null
private var mShareType = 0
private var mSubscribe: Disposable? = null
private var mConfidedId: String? = null
private var mDoctorId: String? = null
//测试
val Type0 = 0
//课程
private val Type1 = 1
//文章
private val Type2 = 2
//倾诉
private val Type3 = 3
private val SUCCESS_CODE = "200"
override fun getContentResId(): Int {
val attachment = message.attachment
if (attachment is CustomAttachmentShareMsg) {
return when (attachment.shareType) {
Type0 -> R.layout.im_ui_message_custom_confide
Type1 -> R.layout.im_ui_message_custom_confide
Type2 -> R.layout.im_ui_message_custom_confide
Type3 -> R.layout.im_ui_message_custom_confide
else -> R.layout.im_ui_message_custom_confide
}
}
return R.layout.im_ui_message_custom_confide
}
override fun inflateContentView() {
tv_confide_money = view.findViewById(R.id.tv_confide_money)
tv_confide = view.findViewById(R.id.tv_confide)
}
override fun bindContentView() {
val attachment = message.attachment
if (attachment is CustomAttachmentShareMsg) {
mShareUrl = attachment.shareUrl
mPrice = attachment.sharePrice
mShareType = attachment.shareType
mConfidedId = attachment.confidedId
mDoctorId = attachment.doctorId
}
if (isReceivedMessage) {
setAvatarRightInVisibity()
} else {
setAvatarLeftInVisibity()
}
when (mShareType) {
Type0 -> {
}
Type1 -> {
}
Type2 -> {
}
Type3 -> tv_confide_money!!.text = mPrice
else -> {
}
}
}
override fun onItemClick() {
super.onItemClick()
if (Utils.isFastClick()) {
//防止连击
return
}
requestConfideStatus()
}
@SuppressLint("CheckResult")
private fun requestConfideStatus() {
if (mSubscribe != null && !mSubscribe!!.isDisposed) {
mSubscribe!!.dispose()
}
val userInfo = getUserResponse()
mSubscribe = getImJavaApi().getPushConfideStatus(userInfo!!.uid!!, message.fromAccount)
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(
{ it: BaseAPIResponse<PushConfideStatusBean> ->
if (SUCCESS_CODE == it.code) {
val data = it.data
if (data.isOpen != 1) {
ToastUtil.toastShort(view.context.getString(R.string.im_push_confide_msg_unopened))
return@subscribe
}
if (data.isOnline != 1) {
ToastUtil.toastShort(view.context.getString(R.string.im_push_confide_msg_offline))
return@subscribe
}
if (data.isReducible != 1) {
ToastUtil.toastShort(view.context.getString(R.string.im_push_confide_msg_busy))
return@subscribe
}
if (data.isStatus != 1) {
ToastUtil.toastShort(view.context.getString(R.string.im_push_confide_msg_calling))
return@subscribe
}
if (mShareType == Type3 && mConfidedId != null && mDoctorId != null) {
//新版本走倾诉列表逻辑
route(view.context, R_CONFIDE_HOME,
IYDLRouterConstant.EXTRA_CONFIDEDID to mConfidedId,
IYDLRouterConstant.EXTRA_DOCTORID to mDoctorId)
} else {
//老版本去专家主页
NewH5Activity.start(view.context, H5Params(mShareUrl!!, null))
}
}
}) { t: Throwable? -> handleError(context, t!!) }
}
}
\ No newline at end of file
...@@ -342,12 +342,13 @@ object OneKeyLoginHelp { ...@@ -342,12 +342,13 @@ object OneKeyLoginHelp {
.setAppPrivacyTwo("隐私协议", appPrivacyTwo) .setAppPrivacyTwo("隐私协议", appPrivacyTwo)
.setAppPrivacyColor(Color.parseColor("#bfbfbf"), Color.parseColor("#991da1f2")) .setAppPrivacyColor(Color.parseColor("#bfbfbf"), Color.parseColor("#991da1f2"))
.setCheckboxHidden(checkBoxHidden) // 设置是否同意协议的checkbox隐藏 .setCheckboxHidden(checkBoxHidden) // 设置是否同意协议的checkbox隐藏
.setCheckBoxHeight(16) .setCheckBoxHeight(24)
.setCheckBoxWidth(16) .setCheckBoxWidth(24)
.setCheckedImgPath("user_login_protocol_selected_new") .setCheckedImgPath("user_login_protocol_selected_new")
.setUncheckedImgPath("user_login_protocol_unselected_new") .setUncheckedImgPath("user_login_protocol_unselected_new")
.setPrivacyBefore(mPrivacyBeforeText) .setPrivacyBefore(mPrivacyBeforeText)
.setPrivacyMargin(35) .setPrivacyMargin(35)
.setProtocolGravity(Gravity.CENTER_VERTICAL)
.setScreenOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) // 设置竖屏 .setScreenOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) // 设置竖屏
// .setAuthPageActIn("in_activity", "out_activity") // .setAuthPageActIn("in_activity", "out_activity")
// .setAuthPageActOut("in_activity", "out_activity") // .setAuthPageActOut("in_activity", "out_activity")
...@@ -394,12 +395,13 @@ object OneKeyLoginHelp { ...@@ -394,12 +395,13 @@ object OneKeyLoginHelp {
.setAppPrivacyTwo("隐私协议", "https://m.ydl.com/Protol/yinsi") .setAppPrivacyTwo("隐私协议", "https://m.ydl.com/Protol/yinsi")
.setAppPrivacyColor(Color.parseColor("#bfbfbf"), Color.parseColor("#991da1f2")) .setAppPrivacyColor(Color.parseColor("#bfbfbf"), Color.parseColor("#991da1f2"))
.setCheckboxHidden(checkBoxHidden) // 设置是否同意协议的checkbox隐藏 .setCheckboxHidden(checkBoxHidden) // 设置是否同意协议的checkbox隐藏
.setCheckBoxHeight(16) .setCheckBoxHeight(24)
.setCheckBoxWidth(16) .setCheckBoxWidth(24)
.setCheckedImgPath("user_login_protocol_selected_new") .setCheckedImgPath("user_login_protocol_selected_new")
.setUncheckedImgPath("user_login_protocol_unselected_new") .setUncheckedImgPath("user_login_protocol_unselected_new")
.setPrivacyBefore(mPrivacyBeforeText) .setPrivacyBefore(mPrivacyBeforeText)
.setPrivacyMargin(35) .setPrivacyMargin(35)
.setProtocolGravity(Gravity.CENTER_VERTICAL)
.setDialogHeight(dialogHeight) .setDialogHeight(dialogHeight)
.setDialogBottom(true) .setDialogBottom(true)
.setScreenOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) // 设置竖屏 .setScreenOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) // 设置竖屏
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:id="@+id/iv_select_protocol" android:id="@+id/iv_select_protocol"
android:layout_width="wrap_content" android:layout_width="36dp"
android:layout_height="wrap_content" android:layout_height="36dp"
android:src="@drawable/user_login_protocol_unselected_new" /> android:src="@drawable/user_login_protocol_unselected_new" />
<TextView <TextView
......
...@@ -78,6 +78,8 @@ interface IYDLRouterConstant{ ...@@ -78,6 +78,8 @@ interface IYDLRouterConstant{
const val EXTRA_SHOWTYPE = "showType" 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_DOCTORID = "doctorId"
/** /**
* 冥想模块额外参数 * 冥想模块额外参数
......
...@@ -3,6 +3,8 @@ package com.ydl.ydlcommon.ui ...@@ -3,6 +3,8 @@ package com.ydl.ydlcommon.ui
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.view.LayoutInflater import android.view.LayoutInflater
...@@ -55,7 +57,7 @@ class LoadingDialogFragment2 : DialogFragment() { ...@@ -55,7 +57,7 @@ class LoadingDialogFragment2 : DialogFragment() {
dialog?.window?.setBackgroundDrawable(null) dialog?.window?.setBackgroundDrawable(null)
val dp100 = (resources.displayMetrics.density * 100).toInt() val dp100 = (resources.displayMetrics.density * 100).toInt()
dialog?.window?.setLayout(dp100, dp100) dialog?.window?.setLayout(dp100, dp100)
dialog?.window?.setDimAmount(0F) dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
} }
private fun startAnim(view: View) { private fun startAnim(view: View) {
......
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