Commit e3a47371 by 徐健

导医更新

parent ddff9e01
...@@ -44,7 +44,7 @@ ext { ...@@ -44,7 +44,7 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.31.10", "m-confide" : "0.0.31.10",
"m-consultant" : "0.0.44", "m-consultant" : "0.0.44.13",
"m-fm" : "0.0.21", "m-fm" : "0.0.21",
"m-user" : "0.0.37", "m-user" : "0.0.37",
...@@ -71,7 +71,7 @@ ext { ...@@ -71,7 +71,7 @@ ext {
"ydl-webview" : "0.0.28", "ydl-webview" : "0.0.28",
"ydl-media" : "0.0.14", "ydl-media" : "0.0.14",
"ydl-pay" : "0.0.11", "ydl-pay" : "0.0.11",
"m-audioim" : "0.0.31.11", "m-audioim" : "0.0.31.12",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
......
...@@ -162,6 +162,8 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi ...@@ -162,6 +162,8 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
//频道管理器 //频道管理器
private var channelManager : ChannelManager? = null private var channelManager : ChannelManager? = null
private var isLeavelChannel:Boolean = false
/** /**
* 声网事件回调 (SDK 通过指定的事件通知应用程序 SDK 的运行事件,如: 加入或离开频道,新用户加入频道等) * 声网事件回调 (SDK 通过指定的事件通知应用程序 SDK 的运行事件,如: 加入或离开频道,新用户加入频道等)
...@@ -932,11 +934,14 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi ...@@ -932,11 +934,14 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
* 声网离开频道 * 声网离开频道
*/ */
private fun leaveChannel() { private fun leaveChannel() {
//刷新h5页面 if (!isLeavelChannel) {
EventBus.getDefault().post(RefreshWebEvent(false)) isLeavelChannel = true
stopPlaying() //刷新h5页面
//播放结束音频 EventBus.getDefault().post(RefreshWebEvent(false))
playFinishMusic() stopPlaying()
//播放结束音频
playFinishMusic()
}
} }
override fun onResume() { override fun onResume() {
......
package com.yidianling.consultant.dialog package com.yidianling.consultant.dialog
import android.animation.Animator
import android.animation.ObjectAnimator
import android.app.Dialog import android.app.Dialog
import android.content.Context import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.view.Gravity import android.view.Gravity
import android.view.View
import android.view.ViewTreeObserver
import android.view.WindowManager import android.view.WindowManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_window.* import kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_window.*
/** /**
...@@ -14,7 +20,12 @@ import kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_ ...@@ -14,7 +20,12 @@ import kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_
* Created by xj on 2019/10/30. * Created by xj on 2019/10/30.
*/ */
class ConsultAssistantDialog(context: Context, val consultAssistantClickListener: OnConsultAssistantClickListener?) : Dialog(context, R.style.consultant_expert_dialog_default_style) { class ConsultAssistantDialog(
context: Context,
val consultAssistantClickListener: OnConsultAssistantClickListener?
) : Dialog(context, R.style.consultant_expert_dialog_default_style) {
private var animate: ObjectAnimator? = null
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
...@@ -31,14 +42,55 @@ class ConsultAssistantDialog(context: Context, val consultAssistantClickListener ...@@ -31,14 +42,55 @@ class ConsultAssistantDialog(context: Context, val consultAssistantClickListener
window.setWindowAnimations(R.style.consultant_expert_consult_assistant_dialog_animate) window.setWindowAnimations(R.style.consultant_expert_consult_assistant_dialog_animate)
consult_assistant.setOnClickListener { if (!ConsultAssistantDialogUtils.INSTANCE.canShowDesc()) {
consultant_assistant_dialog_desc_ll.visibility =View.GONE
}
consultant_assistant_dialog_close.setOnClickListener {
//一个dialog关闭左侧desc,所有导医左侧desc都关闭
SharedPreferencesEditor.putString(
ConsultAssistantDialogUtils.INSTANCE.ASSISTANT_DIALOG_SP_TAG,
System.currentTimeMillis().toString()
)
animate = ObjectAnimator.ofFloat(
consultant_assistant_dialog_desc_ll,
"translationX",
0.0f,
consultant_assistant_dialog_desc_ll.measuredWidth.toFloat()
)
animate?.setDuration(700)?.start()
animate?.addListener(object : Animator.AnimatorListener {
override fun onAnimationRepeat(animation: Animator?) {
}
override fun onAnimationEnd(animation: Animator?) {
ConsultAssistantDialogUtils.INSTANCE.setDescHide()
}
override fun onAnimationCancel(animation: Animator?) {
}
override fun onAnimationStart(animation: Animator?) {
}
})
}
consultant_assistant.setOnClickListener {
consultAssistantClickListener?.onClickAction() consultAssistantClickListener?.onClickAction()
} }
setCanceledOnTouchOutside(false) setCanceledOnTouchOutside(false)
} }
public fun setDescHide() {
if(null != consultant_assistant_dialog_desc_ll) {
consultant_assistant_dialog_desc_ll.visibility = View.GONE
consultant_assistant_dialog_desc_outside_ll.visibility = View.GONE
}
}
interface OnConsultAssistantClickListener { interface OnConsultAssistantClickListener {
fun onClickAction() //隐私设置 fun onClickAction()
} }
} }
\ 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">
<corners android:topLeftRadius="22dp"
android:bottomLeftRadius="22dp"/>
<gradient
android:angle="0"
android:startColor="#DDFF7A5C"
android:endColor="#DDFF406C"/>
</shape>
\ No newline at end of file
<?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"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="wrap_content"
android:paddingBottom="60dp" android:layout_height="wrap_content"
android:paddingRight="11dp"> android:paddingRight="11dp">
<LinearLayout
android:id="@+id/consultant_assistant_dialog_desc_outside_ll"
android:layout_width="wrap_content"
android:layout_height="84dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="25dp"
android:clipChildren="true"
android:gravity="center"
android:orientation="horizontal"
android:paddingRight="25dp"
android:paddingBottom="40dp">
<LinearLayout
android:id="@+id/consultant_assistant_dialog_desc_ll"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/consultant_assistant_dialog_text_bg"
android:gravity="center">
<ImageView
android:id="@+id/consultant_assistant_dialog_close"
android:layout_width="35dp"
android:layout_height="30dp"
android:paddingLeft="15dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="10dp"
android:src="@drawable/consultant_assistant_dialog_close_icon" />
<View
android:layout_width="0.5dp"
android:layout_height="26dp"
android:layout_marginRight="8dp"
android:background="#ffffff" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不知道如何选择?"
android:textColor="#ffffff"
android:textSize="12dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="为你精准匹配咨询师 "
android:textColor="#ffffff"
android:textSize="12dp" />
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:src="@drawable/consultant_assistant_dialog_go_icon" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<ImageView <ImageView
android:id="@+id/consult_assistant" android:id="@+id/consultant_assistant"
android:layout_width="66dp" android:layout_width="61dp"
android:layout_height="68dp" android:layout_height="101dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/consultant_expert_consult_assistant_img"/> android:src="@drawable/consultant_assistant_dialog_img"
android:paddingBottom="40dp" />
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
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