Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
c6554397
Commit
c6554397
authored
May 30, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 通话界面UI调整&svga
parent
cdd11a9a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
18 deletions
+139
-18
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+32
-3
audioim_activity_audio_home.xml
m-audioim/src/main/res/layout/audioim_activity_audio_home.xml
+22
-6
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+17
-2
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+15
-0
ItemIntroHolder.kt
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
+16
-0
first_order.webp
m-confide/src/main/res/drawable-xhdpi/first_order.webp
+0
-0
confide_bottom_two.xml
m-confide/src/main/res/layout/confide_bottom_two.xml
+11
-3
confide_home_activity.xml
m-confide/src/main/res/layout/confide_home_activity.xml
+15
-2
item_expert_intro.xml
m-confide/src/main/res/layout/item_expert_intro.xml
+11
-2
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
c6554397
...
...
@@ -187,10 +187,13 @@ class AudioHomeActivity :
private
var
mPlayer
:
AudioPlayer
?
=
null
private
var
vibrator
:
Vibrator
?
=
null
private
var
handler
:
Handler
?
=
null
private
var
phone_handler
:
Handler
?
=
null
//声网
private
var
voiceManage
:
YDLVoiceManager
?
=
null
//频道管理器
// private var channelManager: ChannelManager? = null
...
...
@@ -379,8 +382,12 @@ class AudioHomeActivity :
//另一方离开频道
updateExpertStatus
(
false
,
1
)
},
500
)
}
//本地音频状态变化
override
fun
onLocalAudioStateChanged
(
localVideoState
:
Int
,
error
:
Int
)
{
super
.
onLocalAudioStateChanged
(
localVideoState
,
error
)
...
...
@@ -526,7 +533,24 @@ class AudioHomeActivity :
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"主叫方发送的邀请通话消息内容:$content"
)
localRemainTime
=
(
totalDuration
?:
1500
).
minus
(
remainTime
?.
toInt
()
?:
1500
)
handler
=
Handler
()
phone_handler
=
Handler
()
vibrator
=
getSystemService
(
Service
.
VIBRATOR_SERVICE
)
as
Vibrator
?
var
count
=
0
phone_handler
!!
.
postDelayed
(
object
:
Runnable
{
override
fun
run
()
{
if
(
count
%
2
==
0
){
tv_tips
.
text
=
"正在发送倾诉请求…"
}
else
{
tv_tips
.
text
=
"正在等待聆听者接受邀请…"
}
count
++
phone_handler
!!
.
postDelayed
({
this
.
run
()
},
3000
)
}
},
3000
)
}
private
fun
reLoginRTM
()
{
...
...
@@ -563,7 +587,7 @@ class AudioHomeActivity :
iv_hands_free
.
isSelected
=
false
tv_name
.
text
=
expertName
tv_tips
.
text
=
expertTips
//
tv_tips.text = expertTips
var
time
=
totalDuration
?.
minus
(
remainTime
!!
.
toInt
())
tv_remain_time
.
text
=
DateUtils
.
formatTime
((
time
).
toString
())
...
...
@@ -1071,7 +1095,7 @@ class AudioHomeActivity :
*/
private
fun
connectSuccess
()
{
isConnectSuccess
=
true
handler
!!
.
removeCallbacksAndMessages
(
null
)
//通知服务端,此次通话已经接通,服务端开始订单
updateExpertStatus
(
false
,
0
)
...
...
@@ -1091,7 +1115,7 @@ class AudioHomeActivity :
//等待状态的相关ui隐藏(挂断按钮的倒计时不清除,挂断按钮必须在30s后才能点击)
tv_change_doctor
.
visibility
=
View
.
GONE
tv_
waiting
.
visibility
=
View
.
GONE
tv_
tips
.
visibility
=
View
.
GONE
//显示通话相关ui
rl_remain_time
.
visibility
=
View
.
VISIBLE
...
...
@@ -1347,6 +1371,7 @@ class AudioHomeActivity :
override
fun
onDestroy
()
{
super
.
onDestroy
()
uploadLog
()
phone_handler
?.
removeCallbacksAndMessages
(
null
)
if
(
isConnectSuccess
)
{
uploadException
(
""
,
"zhu"
,
"108"
,
callback
=
null
)
}
...
...
@@ -1354,6 +1379,10 @@ class AudioHomeActivity :
handler
=
null
}
if
(
phone_handler
!=
null
){
phone_handler
=
null
}
hasUpLoadLog
=
false
if
(
waitDisposable
!=
null
)
{
...
...
m-audioim/src/main/res/layout/audioim_activity_audio_home.xml
View file @
c6554397
...
...
@@ -30,7 +30,7 @@
<RelativeLayout
android:id=
"@+id/rl_head"
android:layout_width=
"250dp"
android:layout_height=
"2
5
0dp"
android:layout_height=
"2
7
0dp"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"60dp"
>
...
...
@@ -65,6 +65,22 @@
android:textSize=
"22sp"
tools:text=
"留意"
/>
<TextView
android:id=
"@+id/tv_tips"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_name"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"25dp"
android:layout_marginTop=
"@dimen/platform_dp_10"
android:layout_marginRight=
"25dp"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLines=
"2"
android:textColor=
"@color/platform_color_70FFFFFF"
android:textSize=
"12sp"
android:text=
"正在等待聆听者接受邀请…"
/>
</RelativeLayout>
<!-- 倾诉剩余时间-->
<androidx.constraintlayout.widget.ConstraintLayout
...
...
@@ -114,7 +130,7 @@
<TextView
android:id=
"@+id/tv_tips"
android:id=
"@+id/tv_tips
1
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/rl_remain_time"
...
...
@@ -127,7 +143,7 @@
android:maxLines=
"2"
android:textColor=
"@color/white"
android:textSize=
"15sp"
tools:text=
"你存在的本身就是值得被爱的你存在的本身就是值得被爱的"
/>
/>
...
...
@@ -153,7 +169,7 @@
android:text=
"正在等待聆听者接受邀请…"
android:textColor=
"@color/platform_color_70FFFFFF"
android:textSize=
"12sp"
android:visibility=
"
visibl
e"
android:visibility=
"
gon
e"
tools:visibility=
"gone"
/>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
@@ -290,7 +306,7 @@
android:id=
"@+id/tv_toast"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_tips"
android:layout_below=
"@+id/tv_tips
1
"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"34dp"
android:background=
"@drawable/audioim_toast_view_background"
...
...
@@ -309,7 +325,7 @@
android:id=
"@+id/tv_nte_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_tips"
android:layout_below=
"@+id/tv_tips
1
"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"70dp"
android:background=
"@drawable/audioim_toast_view_background"
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
c6554397
...
...
@@ -14,6 +14,9 @@ import android.widget.FrameLayout
import
android.widget.TextView
import
androidx.fragment.app.FragmentActivity
import
com.alibaba.android.arouter.launcher.ARouter
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.interfaces.DraweeController
import
com.facebook.drawee.view.SimpleDraweeView
import
com.google.android.material.bottomsheet.BottomSheetBehavior
import
com.google.android.material.bottomsheet.BottomSheetDialog
import
com.google.android.material.bottomsheet.BottomSheetDialogFragment
...
...
@@ -61,7 +64,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
lateinit
var
layoutChange
:
View
lateinit
var
tvCall
:
TextView
lateinit
var
tvTime
:
TextView
lateinit
var
first_order
:
View
lateinit
var
first_order
:
SimpleDrawee
View
lateinit
var
confideProgress
:
View
lateinit
var
layout_change_text
:
View
lateinit
var
layoutBottom
:
View
...
...
@@ -94,6 +97,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
super
.
onCreate
(
savedInstanceState
)
setStyle
(
STYLE_NORMAL
,
R
.
style
.
AppBottomSheet
)
EventBus
.
getDefault
().
register
(
this
)
}
override
fun
onCreateView
(
...
...
@@ -159,10 +163,21 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
layoutBottom
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutBottom
)
tvCall
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tvCall
)
tvTime
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tvTime
)
first_order
=
itemView
.
findViewById
<
Text
View
>(
R
.
id
.
first_order
)
first_order
=
itemView
.
findViewById
<
SimpleDrawee
View
>(
R
.
id
.
first_order
)
val
userService
=
findRouteService
(
IUserService
::
class
.
java
)
val
isLogin
=
userService
.
isLogin
()
first_order
.
visibility
=
if
(
isLogin
)
View
.
GONE
else
View
.
VISIBLE
val
controller
:
DraweeController
=
Fresco
.
newDraweeControllerBuilder
()
.
setUri
(
Uri
.
parse
(
"res://drawable/"
+
R
.
drawable
.
first_order
))
.
setOldController
(
first_order
.
controller
)
.
setAutoPlayAnimations
(
true
)
// 是否自动播放Gif动画
.
build
()
first_order
.
controller
=
controller
layoutCall
.
setOnClickListener
{
ActionCountUtils
.
record
(
"ydl_experts_detail_popupwindows_page"
,
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
c6554397
...
...
@@ -3,6 +3,7 @@ package com.ydl.confide.home
import
android.annotation.SuppressLint
import
android.content.Context
import
android.graphics.Color
import
android.net.Uri
import
android.os.Build
import
android.view.View
import
android.view.WindowManager
...
...
@@ -10,6 +11,8 @@ import androidx.fragment.app.FragmentActivity
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.SimpleItemAnimator
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.interfaces.DraweeController
import
com.jcodecraeer.xrecyclerview.ProgressStyle
import
com.jcodecraeer.xrecyclerview.XRecyclerView
import
com.ydl.confide.R
...
...
@@ -216,10 +219,22 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
private
fun
handleFree
()
{
//登录了回来之后就不显示了
val
isLogin
=
(
findRouteService
(
IUserService
::
class
.
java
).
isLogin
())
findViewById
<
View
>(
R
.
id
.
confide_Free
).
visibility
=
if
(
isLogin
)
View
.
GONE
else
View
.
VISIBLE
if
(!
isLogin
){
val
controller
:
DraweeController
=
Fresco
.
newDraweeControllerBuilder
()
.
setUri
(
Uri
.
parse
(
"res://drawable/"
+
R
.
drawable
.
first_order
))
.
setOldController
(
confide_Free
.
controller
)
.
setAutoPlayAnimations
(
true
)
// 是否自动播放Gif动画
.
build
()
confide_Free
.
controller
=
controller
}
if
(
isLogin
)
{
findViewById
<
View
>(
R
.
id
.
confideRed
).
visibility
=
if
(
listenFree
)
View
.
VISIBLE
else
View
.
GONE
}
}
/**
...
...
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
View file @
c6554397
package
com.ydl.confide.intro
import
android.app.Activity
import
android.net.Uri
import
android.util.Log
import
android.view.View
import
android.widget.SeekBar
...
...
@@ -11,6 +12,9 @@ import androidx.databinding.ViewDataBinding
import
androidx.fragment.app.FragmentActivity
import
androidx.recyclerview.widget.RecyclerView
import
com.dou361.ijkplayer.widget.IjkVideoView
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.interfaces.DraweeController
import
com.ydl.confide.R
import
com.ydl.confide.api.ConfideRoute
import
com.ydl.confide.databinding.ItemExpertIntroBinding
import
com.ydl.confide.home.ConfideBottomSheetDialogFragment
...
...
@@ -26,6 +30,7 @@ import io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.disposables.Disposable
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.confide_home_activity.*
import
tv.danmaku.ijk.media.player.IjkMediaPlayer
import
java.net.URLEncoder
import
java.util.concurrent.TimeUnit
...
...
@@ -190,6 +195,15 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
binding
.
voicePlay
.
start
()
}
}
val
controller
:
DraweeController
=
Fresco
.
newDraweeControllerBuilder
()
.
setUri
(
Uri
.
parse
(
"res://drawable/"
+
R
.
drawable
.
first_order
))
.
setOldController
(
binding
.
confideFirstFree
.
controller
)
.
setAutoPlayAnimations
(
true
)
// 是否自动播放Gif动画
.
build
()
binding
.
confideFirstFree
.
controller
=
controller
binding
.
seekbar
.
progress
=
0
binding
.
seekbar
.
setOnSeekBarChangeListener
(
object
:
SeekBar
.
OnSeekBarChangeListener
{
override
fun
onProgressChanged
(
seekBar
:
SeekBar
?,
progress
:
Int
,
fromUser
:
Boolean
)
{
...
...
@@ -245,6 +259,8 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
if
(
vm
?.
isVideo
==
false
&&
!
vm
?.
playUrl
.
isNullOrBlank
())
{
binding
.
voicePlay
.
start
()
}
}
private
fun
startTiming
()
{
...
...
m-confide/src/main/res/drawable-xhdpi/first_order.webp
0 → 100644
View file @
c6554397
File added
m-confide/src/main/res/layout/confide_bottom_two.xml
View file @
c6554397
...
...
@@ -64,7 +64,7 @@
tools:text=
"剩余1分40秒"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
<
!--<
TextView
android:id="@+id/first_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...
...
@@ -73,13 +73,21 @@
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text=
"首单免费"
android:text="首单免费
1111111
"
android:textColor="@color/white"
android:textSize="11sp"
android:visibility="gone"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius=
"70dp"
/>
app:layout_constraintCircleRadius="70dp" />-->
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/first_order"
android:layout_width=
"@dimen/platform_dp_64"
android:layout_height=
"@dimen/platform_dp_34"
app:layout_constraintCircle=
"@+id/layoutCall"
app:layout_constraintCircleAngle=
"70"
app:layout_constraintCircleRadius=
"70dp"
/>
<LinearLayout
...
...
m-confide/src/main/res/layout/confide_home_activity.xml
View file @
c6554397
...
...
@@ -98,7 +98,7 @@
android:layout_marginEnd=
"10dp"
android:src=
"@drawable/confide__free"
/>
<TextView
<
!--<
TextView
android:id="@+id/confide_Free"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...
...
@@ -111,7 +111,20 @@
android:text="首单免费"
android:visibility="gone"
android:textColor="@color/white"
android:textSize=
"11sp"
/>
android:textSize="11sp" />-->
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/confide_Free"
android:layout_width=
"@dimen/platform_dp_64"
android:layout_height=
"@dimen/platform_dp_34"
app:layout_constraintCircle=
"@+id/layoutCall"
android:paddingLeft=
"5dp"
android:layout_marginTop=
"-7dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2dp"
android:layout_gravity=
"right|top"
android:visibility=
"gone"
/>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
m-confide/src/main/res/layout/item_expert_intro.xml
View file @
c6554397
...
...
@@ -143,7 +143,7 @@
tools:text=
"剩余1分40秒"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
<
!--<
TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_confide_free"
...
...
@@ -157,7 +157,16 @@
android:visibility="@{item.showFreeTag?View.VISIBLE:View.GONE}"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius=
"70dp"
/>
app:layout_constraintCircleRadius="70dp" />-->
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/confide_first_free"
android:layout_width=
"@dimen/platform_dp_64"
android:layout_height=
"@dimen/platform_dp_34"
app:layout_constraintCircle=
"@+id/layoutCall"
app:layout_constraintCircleAngle=
"70"
android:visibility=
"@{item.showFreeTag?View.VISIBLE:View.GONE}"
app:layout_constraintCircleRadius=
"70dp"
/>
<TextView
android:id=
"@+id/tvTag"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment