Commit 1502ff1e by 霍志良

feat:倾诉底部播放布局调整

parent 7dcfd45a
...@@ -218,10 +218,11 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo ...@@ -218,10 +218,11 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
initConfidePlayerListener() initConfidePlayerListener()
} }
override fun playVoice(type: Int?, index: Int?, recommendId: Int, playUrl: String?, name: String?) { override fun playVoice(type: Int?, index: Int?, recommendId: Int, playUrl: String?, name: String?,confideIcon:String?) {
val mu = Music() val mu = Music()
mu.title = name mu.title = name
mu.path = playUrl mu.path = playUrl
mu.coverPath=confideIcon
AudioPlayer.get().singlePlay(mu) AudioPlayer.get().singlePlay(mu)
if (PlayerFloatHelper.isShow(mContext!!)) { if (PlayerFloatHelper.isShow(mContext!!)) {
if (AudioPlayer.get().playMode.value() == 1) { if (AudioPlayer.get().playMode.value() == 1) {
......
...@@ -99,7 +99,7 @@ interface IConfideHomeEvent { ...@@ -99,7 +99,7 @@ interface IConfideHomeEvent {
* @param playUrl 播放地址 * @param playUrl 播放地址
* @param name 咨询师姓名 * @param name 咨询师姓名
*/ */
fun playVoice(type: Int?, index: Int?, recommendId: Int, playUrl: String?, name: String?) fun playVoice(type: Int?, index: Int?, recommendId: Int, playUrl: String?, name: String?,confideIcon:String?)
/** /**
* 重播 * 重播
......
...@@ -165,7 +165,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con ...@@ -165,7 +165,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
if (bodyBean.confideIsPlay!!) { if (bodyBean.confideIsPlay!!) {
confideHomeEvent.pauseVoice() confideHomeEvent.pauseVoice()
} else { } else {
confideHomeEvent.playVoice(IConfideHomeConfig.TYPE_RECOMMEND, position, recommendId, bodyBean.confideVoice, bodyBean.confidedName) confideHomeEvent.playVoice(IConfideHomeConfig.TYPE_RECOMMEND, position, recommendId, bodyBean.confideVoice, bodyBean.confidedName,bodyBean.confidedIcon)
} }
} }
} }
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<corners android:radius="10dp" /> <corners android:radius="10dp" />
<solid android:color="#99000000" /> <solid android:color="#60000000" />
</shape> </shape>
\ No newline at end of file
...@@ -20,13 +20,14 @@ ...@@ -20,13 +20,14 @@
android:layout_height="20dp" android:layout_height="20dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="12.5dp" android:layout_marginLeft="12.5dp"
android:layout_marginRight="@dimen/platform_dp_25"
android:padding="2.5dp" android:padding="2.5dp"
android:src="@drawable/ico_play_float_pause" android:src="@drawable/ico_play_float_pause"
android:visibility="visible" /> android:visibility="visible" />
<ImageView <ImageView
android:id="@+id/play_head" android:id="@+id/play_head"
android:layout_width="66dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_marginLeft="12.5dp" android:layout_marginLeft="12.5dp"
android:src="@drawable/ico_play_float_pic" /> android:src="@drawable/ico_play_float_pic" />
...@@ -35,7 +36,8 @@ ...@@ -35,7 +36,8 @@
android:id="@+id/rl_info" android:id="@+id/rl_info"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="6dp" android:layout_marginLeft="@dimen/platform_dp_18"
android:layout_marginRight="@dimen/platform_dp_18"
android:layout_weight="1"> android:layout_weight="1">
<TextView <TextView
......
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