Commit e7051301 by 刘鹏

Merge remote-tracking branch 'origin/d/v_confide_2.0' into feat/lp/lp_confide_6

parents a002933e 6db9f48f
...@@ -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
...@@ -464,7 +466,19 @@ class AudioHomeActivity : ...@@ -464,7 +466,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
...@@ -62,6 +63,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -62,6 +63,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: View lateinit var first_order: View
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<TextView>(R.id.first_order) first_order = itemView.findViewById<TextView>(R.id.first_order)
val userService = findRouteService(IUserService::class.java) val userService = findRouteService(IUserService::class.java)
...@@ -464,7 +467,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -464,7 +467,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)
...@@ -482,26 +485,42 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -482,26 +485,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
......
...@@ -6,6 +6,7 @@ import android.content.Context ...@@ -6,6 +6,7 @@ import android.content.Context
import android.graphics.Color import android.graphics.Color
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
...@@ -236,6 +237,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -236,6 +237,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
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) {
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
} }
} }
...@@ -378,7 +381,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo ...@@ -378,7 +381,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 {
......
...@@ -16,6 +16,7 @@ import com.ydl.confide.databinding.ItemExpertIntroBinding ...@@ -16,6 +16,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
...@@ -51,6 +52,9 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -51,6 +52,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",
...@@ -91,7 +95,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -91,7 +95,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
) )
} }
} }
...@@ -282,7 +286,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -282,7 +286,7 @@ 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!!) .showBottomSheetDialog(itemView.context as FragmentActivity, url, item.doctorId!!, uid = item.uid)
} }
} }
} }
...@@ -314,7 +318,8 @@ private fun genMinProgramPath(url: String): String { ...@@ -314,7 +318,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"
...@@ -85,7 +86,7 @@ ...@@ -85,7 +86,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"
...@@ -104,7 +105,8 @@ ...@@ -104,7 +105,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"
......
...@@ -131,6 +131,14 @@ ...@@ -131,6 +131,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"
...@@ -215,50 +216,93 @@ ...@@ -215,50 +216,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" />
......
...@@ -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