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
b90ec82e
Commit
b90ec82e
authored
May 23, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/zl/confide2' into 'd/v_confide_2.0'
UI修改 See merge request app_android_lib/YDL-Component!33
parents
1cae80b1
b6b0ab62
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
203 additions
and
63 deletions
+203
-63
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+142
-41
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+3
-3
VideoShowAdapter.kt
m-confide/src/main/java/com/ydl/confide/home/adapter/VideoShowAdapter.kt
+3
-1
ConfideHomeEventImpl.kt
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
+2
-2
IConfideHomeEvent.kt
m-confide/src/main/java/com/ydl/confide/home/event/IConfideHomeEvent.kt
+1
-1
ConfideHomeRecommendExpertItemView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendExpertItemView.kt
+1
-1
ConfideHomeRecommendView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendView.kt
+2
-2
ItemIntroHolder.kt
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
+2
-2
confide_bottom_two.xml
m-confide/src/main/res/layout/confide_bottom_two.xml
+47
-10
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
b90ec82e
...
...
@@ -6,31 +6,63 @@ import android.app.Dialog
import
android.os.Bundle
import
android.view.*
import
android.widget.FrameLayout
import
android.widget.TextView
import
androidx.fragment.app.FragmentActivity
import
com.blankj.utilcode.util.LogUtils
import
com.google.android.material.bottomsheet.BottomSheetBehavior
import
com.google.android.material.bottomsheet.BottomSheetDialog
import
com.google.android.material.bottomsheet.BottomSheetDialogFragment
import
com.tencent.smtt.sdk.WebSettings
import
com.ydl.confide.R
import
com.ydl.confide.home.http.ConfideHomeApi
import
com.ydl.utils.WebUrlParamsUtils
import
com.ydl.webview.ProgressWebView
import
com.ydl.webview.TellData
import
com.ydl.webview.WebModularServiceUtils
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.TimeUtil
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.api.service.IUserService
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.item_expert_intro.*
class
ConfideBottomSheetDialogFragment
:
BottomSheetDialogFragment
()
{
companion
object
{
private
const
val
KEY_JUMP_URL
=
"jumpUrl"
private
const
val
KEY_DOCTOR_ID
=
"doctor_id"
private
const
val
KEY_SHOULD_SHOW
=
"should_show"
}
lateinit
var
wv_content
:
ProgressWebView
;
lateinit
var
text_title
:
View
;
lateinit
var
line
:
View
;
lateinit
var
rl_title
:
View
;
lateinit
var
close_webview_Icon
:
View
lateinit
var
jumpUrl
:
String
fun
showBottomSheetDialog
(
activity
:
FragmentActivity
,
jumpUrl
:
String
)
{
lateinit
var
wv_content
:
ProgressWebView
lateinit
var
text_title
:
View
lateinit
var
line
:
View
lateinit
var
rl_title
:
View
lateinit
var
close_webview_Icon
:
View
lateinit
var
layoutCall
:
View
lateinit
var
layoutChange
:
View
lateinit
var
tvCall
:
TextView
lateinit
var
tvTime
:
TextView
lateinit
var
first_order
:
View
lateinit
var
jumpUrl
:
String
lateinit
var
doctorId
:
String
var
shouldShow
:
Boolean
?
=
false
fun
showBottomSheetDialog
(
activity
:
FragmentActivity
,
jumpUrl
:
String
,
doctorId
:
String
,
shouldShow
:
Boolean
?
=
false
)
{
arguments
=
Bundle
().
apply
{
putString
(
KEY_JUMP_URL
,
jumpUrl
)
putString
(
KEY_DOCTOR_ID
,
doctorId
)
shouldShow
?.
let
{
putBoolean
(
KEY_SHOULD_SHOW
,
it
)
}
}
show
(
activity
.
supportFragmentManager
,
"confide_bottom_showdialog"
)
}
...
...
@@ -38,8 +70,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
@SuppressLint
(
"WrongConstant"
)
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setStyle
(
STYLE_NORMAL
,
R
.
style
.
AppBottomSheet
)
setStyle
(
STYLE_NORMAL
,
R
.
style
.
AppBottomSheet
)
}
override
fun
onCreateView
(
...
...
@@ -49,9 +80,13 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
):
View
?
{
return
inflater
.
inflate
(
R
.
layout
.
confide_webview
,
container
,
false
)
}
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
jumpUrl
=
arguments
?.
getString
(
KEY_JUMP_URL
)
?:
""
doctorId
=
arguments
?.
getString
(
KEY_DOCTOR_ID
)
?:
""
shouldShow
=
arguments
?.
getBoolean
(
KEY_SHOULD_SHOW
)
?:
false
onLoadDialStatus
()
if
(
jumpUrl
.
isBlank
())
{
dismiss
()
return
...
...
@@ -68,6 +103,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
webViewInit
(
wv_content
)
}
override
fun
setCancelable
(
cancelable
:
Boolean
)
{
val
dialog
=
dialog
val
touchOutsideView
=
...
...
@@ -75,8 +111,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
val
bottomSheetView
=
dialog
?.
window
?.
decorView
?.
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
if
(
cancelable
)
{
touchOutsideView
?.
setOnClickListener
(
View
.
OnClickListener
{
if
(
dialog
.
isShowing
)
{
...
...
@@ -92,52 +126,63 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
}
override
fun
onCreateDialog
(
savedInstanceState
:
Bundle
?):
Dialog
{
override
fun
onCreateDialog
(
savedInstanceState
:
Bundle
?):
Dialog
{
val
dialog
=
super
.
onCreateDialog
(
savedInstanceState
)
as
BottomSheetDialog
dialog
.
setOnShowListener
{
val
itemView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
confide_bottom_two
,
null
,
false
)
val
layoutCall
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutCall
)
val
layoutChange
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutChange
)
val
layout_change_text
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layout_change_text
)
val
confide_progress
=
itemView
.
findViewById
<
View
>(
R
.
id
.
confide_progress
)
val
itemView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
confide_bottom_two
,
null
,
false
)
layoutCall
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutCall
)
layoutChange
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutChange
)
tvCall
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tvCall
)
tvTime
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tvTime
)
first_order
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
first_order
)
val
isLogin
=
findRouteService
(
IUserService
::
class
.
java
)
?.
isLogin
()
?:
false
first_order
.
visibility
=
if
(
isLogin
)
View
.
GONE
else
View
.
VISIBLE
val
layout_change_text
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layout_change_text
)
val
confide_progress
=
itemView
.
findViewById
<
View
>(
R
.
id
.
confide_progress
)
if
(
shouldShow
==
true
)
{
layoutChange
.
visibility
=
View
.
VISIBLE
}
else
{
layoutChange
.
visibility
=
View
.
GONE
}
layoutCall
.
setOnClickListener
{
callJsFun
(
wv_content
,
"layoutCall
()"
)
callJsFun
(
wv_content
,
"listenCallClick
()"
)
}
layoutChange
.
setOnClickListener
{
layout_change_text
.
visibility
=
View
.
GONE
confide_progress
.
visibility
=
View
.
VISIBLE
callJsFun
(
wv_content
,
"layoutCall
()"
)
layout_change_text
.
visibility
=
View
.
GONE
confide_progress
.
visibility
=
View
.
VISIBLE
callJsFun
(
wv_content
,
"handleNext
()"
)
}
val
layoutParams
=
FrameLayout
.
LayoutParams
(
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
,
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
).
apply
{
gravity
=
Gravity
.
BOTTOM
or
Gravity
.
CENTER_HORIZONTAL
}
dialog
?.
window
?.
addContentView
(
itemView
,
layoutParams
)
val
bottomSheet
=
(
it
as
BottomSheetDialog
).
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
as
FrameLayout
?
).
apply
{
gravity
=
Gravity
.
BOTTOM
or
Gravity
.
CENTER_HORIZONTAL
}
dialog
?.
window
?.
addContentView
(
itemView
,
layoutParams
)
val
bottomSheet
=
(
it
as
BottomSheetDialog
).
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
as
FrameLayout
?
val
behavior
=
BottomSheetBehavior
.
from
(
bottomSheet
!!
)
behavior
.
peekHeight
=
RxImageTool
.
dp2px
(
600f
)
behavior
.
peekHeight
=
RxImageTool
.
dp2px
(
600f
)
//true是跳过peekHeight,直接滑下去,false是可以滑动到顶部还可以保持peekHeight在滑下去
// behavior?.skipCollapsed=true
behavior
.
addBottomSheetCallback
(
object
:
BottomSheetBehavior
.
BottomSheetCallback
()
{
override
fun
onStateChanged
(
bottomSheet
:
View
,
newState
:
Int
)
{
when
(
newState
)
{
3
->
{
rl_title
.
visibility
=
View
.
VISIBLE
close_webview_Icon
.
visibility
=
View
.
VISIBLE
text_title
.
visibility
=
View
.
VISIBLE
line
.
visibility
=
View
.
GONE
rl_title
.
visibility
=
View
.
VISIBLE
close_webview_Icon
.
visibility
=
View
.
VISIBLE
text_title
.
visibility
=
View
.
VISIBLE
line
.
visibility
=
View
.
GONE
}
1
->
{
rl_title
.
visibility
=
View
.
VISIBLE
close_webview_Icon
.
visibility
=
View
.
GONE
text_title
.
visibility
=
View
.
GONE
line
.
visibility
=
View
.
VISIBLE
rl_title
.
visibility
=
View
.
VISIBLE
close_webview_Icon
.
visibility
=
View
.
GONE
text_title
.
visibility
=
View
.
GONE
line
.
visibility
=
View
.
VISIBLE
}
4
->
{
rl_title
.
visibility
=
View
.
VISIBLE
line
.
visibility
=
View
.
VISIBLE
rl_title
.
visibility
=
View
.
VISIBLE
line
.
visibility
=
View
.
VISIBLE
}
}
}
...
...
@@ -147,7 +192,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
return
dialog
}
private
fun
callJsFun
(
wv_content
:
ProgressWebView
,
funcName
:
String
)
{
private
fun
callJsFun
(
wv_content
:
ProgressWebView
,
funcName
:
String
)
{
val
sb
=
StringBuffer
(
"javascript:"
)
sb
.
append
(
funcName
)
wv_content
.
post
{
...
...
@@ -158,6 +204,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
}
}
@SuppressLint
(
"ClickableViewAccessibility"
)
private
fun
webViewInit
(
wv_content
:
ProgressWebView
)
{
val
setting
:
WebSettings
=
wv_content
?.
settings
!!
...
...
@@ -182,10 +229,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
.
getJavascripHandler
(
requireActivity
(),
tellData
=
TellData
())
wv_content
!!
.
addJavascriptInterface
(
jtoJHandle
,
"javascriptHandler"
)
wv_content
.
loadUrl
(
"https://m.ydl.com/jy/experts/23035?v=4.0.99&uid=9404770&ts=1652787528&toConfide=1&"
+
"platform_main_theme_light=00D4DF&platform_main_theme_bright=EAFAFC&platform_main_theme=00C9E2&isFromApp=1&"
+
"id=1927&ffrom=android_zhuzhan&barHeight=81&accessToken=87cba5b57f9bb196856ade3522805c11MjIwMw&sign="
+
"6ce496690d7d5a184935f986c3631cc2"
)
var
jumpurl
=
"http://192.168.210.152/jy/listenMask?listenerId=257&isFromApp=1"
var
url
=
WebUrlParamsUtils
.
getSuffix
(
jumpurl
,
jtoJHandle
.
getUriAppendSuffix
())
LogUtil
.
e
(
"AAA"
+
url
)
wv_content
.
loadUrl
(
url
)
// wv_content.loadUrl(jumpUrl)
wv_content
.
setOnTouchListener
{
p0
,
p1
->
//canScrollVertically(-1)的值表示是否能向下滚动,false表示已经滚动到顶部
if
(!
wv_content
.
canScrollVertically
(-
1
))
{
...
...
@@ -196,4 +243,57 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
false
;
}
}
@SuppressLint
(
"CheckResult"
)
private
fun
onLoadDialStatus
()
{
val
confideApi
=
YDLHttpUtils
.
obtainApi
(
ConfideHomeApi
::
class
.
java
)
confideApi
.
getDialStatus
(
doctorId
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
resp
->
if
(
resp
.
code
==
"200"
)
{
layoutCall
.
visibility
=
View
.
VISIBLE
val
lineStatus
=
resp
.
data
?.
confideLine
?:
2
/*
* 1在线 2离线 3通话中 4 继续倾诉
*
*
* */
when
(
lineStatus
)
{
1
->
{
tvCall
.
text
=
"立即拨打"
layoutCall
.
background
=
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_1
)
}
2
->
{
tvCall
.
text
=
"已离线"
layoutCall
.
background
=
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_2
)
}
3
->
{
tvCall
.
text
=
"通话中"
layoutCall
.
background
=
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_3
)
}
4
->
{
tvCall
.
text
=
"继续倾诉"
layoutCall
.
background
=
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_1
)
val
t
=
resp
?.
data
?.
remainingTime
?.
remainingTime
if
(
t
!=
null
)
{
tvTime
.
visibility
=
View
.
VISIBLE
val
remain
=
TimeUtil
.
getElapseTimeForShow
(
t
*
1000
)
tvTime
.
text
=
"(剩余"
+
remain
+
")"
}
}
}
}
else
{
if
(!
resp
.
msg
.
isNullOrEmpty
())
{
ToastUtil
.
toastShort
(
resp
.
msg
)
}
}
},
{
throwable
->
throwable
.
printStackTrace
()
})
}
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
b90ec82e
...
...
@@ -6,6 +6,7 @@ import android.graphics.Color
import
android.os.Build
import
android.view.View
import
android.view.WindowManager
import
androidx.fragment.app.FragmentActivity
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.SimpleItemAnimator
import
com.alibaba.android.arouter.facade.annotation.Route
...
...
@@ -251,9 +252,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
*/
private
fun
initClick
()
{
quick_consult_card
.
setOnClickListener
{
quickConsultUrl
?.
let
{
mConfideEvent
?.
categoryClick
(
quickConsultUrl
)
}
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
this
as
FragmentActivity
,
""
,
""
,
true
)
}
}
...
...
m-confide/src/main/java/com/ydl/confide/home/adapter/VideoShowAdapter.kt
View file @
b90ec82e
...
...
@@ -56,7 +56,7 @@ class RecentConfideAdapter(val data: List<ItemVideoShowViewModel>, private val e
override
fun
onBindViewHolder
(
holder
:
BindingViewHolder
<
ItemConfideHomeRecentBinding
>,
position
:
Int
)
{
val
itemVideoShowViewModel
=
data
[
position
]
holder
.
binding
.
item
=
itemVideoShowViewModel
holder
.
itemView
.
setOnClickListener
{
event
.
consultantClick
(
itemVideoShowViewModel
.
linkUrl
)
}
holder
.
itemView
.
setOnClickListener
{
event
.
consultantClick
(
itemVideoShowViewModel
.
linkUrl
,
itemVideoShowViewModel
.
doctorId
)
}
}
override
fun
getItemCount
()
=
data
.
size
...
...
@@ -68,6 +68,7 @@ class ItemVideoShowViewModel {
val
coverUrl
=
ObservableField
<
String
>(
""
)
val
videoCoverUrl
=
ObservableField
<
String
>(
""
)
val
state
=
ObservableInt
()
var
doctorId
:
String
?
=
null
}
internal
fun
ItemVideoShowViewModel
.
mapOf
(
bean
:
ConfideHomeBodyBean
):
ItemVideoShowViewModel
{
...
...
@@ -76,6 +77,7 @@ internal fun ItemVideoShowViewModel.mapOf(bean: ConfideHomeBodyBean): ItemVideoS
videoCoverUrl
.
set
(
bean
.
coverVideoPicture
)
state
.
set
(
bean
.
confideLine
?:
0
)
linkUrl
=
bean
.
linkUrl
doctorId
=
bean
.
doctorId
return
this
}
...
...
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
View file @
b90ec82e
...
...
@@ -144,9 +144,9 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* @param linkUrl 跳转地址
*/
@SuppressLint
(
"JavascriptInterface"
,
"ClickableViewAccessibility"
)
override
fun
consultantClick
(
linkUrl
:
String
?)
{
override
fun
consultantClick
(
linkUrl
:
String
?
,
doctorId
:
String
?
)
{
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
mContext
as
BaseActivity
,
linkUrl
!!
)
.
showBottomSheetDialog
(
mContext
as
BaseActivity
,
linkUrl
!!
,
doctorId
!!
)
// link(linkUrl)
}
...
...
m-confide/src/main/java/com/ydl/confide/home/event/IConfideHomeEvent.kt
View file @
b90ec82e
...
...
@@ -73,7 +73,7 @@ interface IConfideHomeEvent {
* 咨询师推荐--点我倾诉
* @param linkUrl 跳转地址
*/
fun
consultantClick
(
linkUrl
:
String
?)
fun
consultantClick
(
linkUrl
:
String
?
,
doctorId
:
String
?
)
fun
videoShowClick
(
index
:
Int
,
data
:
List
<
ConfideHomeBodyBean
>?)
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendExpertItemView.kt
View file @
b90ec82e
...
...
@@ -243,7 +243,7 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH
private
fun
click
(
bodyBean
:
ConfideHomeBodyBean
)
{
when
(
bodyBean
.
confideLine
)
{
//1在线 2离线 3通话中
1
,
3
,
4
->
{
confideHomeEvent
.
consultantClick
(
bodyBean
.
linkUrl
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
linkUrl
,
bodyBean
.
doctorId
)
}
2
->
{
//跳转私聊 并发送自定义消息
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendView.kt
View file @
b90ec82e
...
...
@@ -85,7 +85,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
//设置页面点击事件
this
.
setOnClickListener
{
confideHomeEvent
.
consultantClick
(
bodyBean
.
linkUrl
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
linkUrl
,
bodyBean
.
doctorId
)
}
}
...
...
@@ -323,7 +323,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
if
(
bodyBean
.
confideLine
==
3
)
{
}
confideHomeEvent
.
consultantClick
(
bodyBean
.
linkUrl
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
linkUrl
,
bodyBean
.
doctorId
)
}
2
->
{
//跳转私聊 并发送自定义消息
...
...
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
View file @
b90ec82e
...
...
@@ -49,7 +49,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
vm
=
item
binding
.
layoutCall
.
setOnClickListener
{
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
itemView
.
context
as
FragmentActivity
,
item
.
linkUrl
!!
)
.
showBottomSheetDialog
(
itemView
.
context
as
FragmentActivity
,
item
.
linkUrl
!!
,
item
.
doctorId
!!
)
}
binding
.
btnChat
.
setOnClickListener
{
val
aty
=
it
.
context
as
?
Activity
...
...
@@ -59,7 +59,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
}
binding
.
btnEvaluate
.
setOnClickListener
{
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
itemView
.
context
as
FragmentActivity
,
item
.
linkUrl
!!
)
.
showBottomSheetDialog
(
itemView
.
context
as
FragmentActivity
,
item
.
linkUrl
!!
,
item
.
doctorId
!!
)
}
binding
.
vDisableClick
.
setOnClickListener
{
}
binding
.
btnShare
.
setOnClickListener
{
...
...
m-confide/src/main/res/layout/confide_bottom_two.xml
View file @
b90ec82e
<?xml version="1.0" encoding="utf-8"?>
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_marginStart=
"@dimen/platform_dp_15"
android:layout_marginEnd=
"@dimen/platform_dp_15"
android:background=
"@color/transparent"
android:gravity=
"center_horizontal"
android:orientation=
"horizontal"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/layoutCall"
android:layout_width=
"150dp"
android:layout_height=
"42dp"
android:layout_marginBottom=
"32dp"
android:background=
"@drawable/confide_line_bg_1"
android:paddingLeft=
"28dp
"
android:paddingRight=
"28dp
"
android:visibility=
"gone
"
tools:visibility=
"visible
"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
>
app:layout_constraintRight_toLeftOf=
"@id/layoutChange"
>
<ImageView
android:id=
"@+id/ivCall"
...
...
@@ -28,6 +29,7 @@
android:layout_marginRight=
"4dp"
android:src=
"@drawable/ic_confide_call"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/tvCall"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -37,14 +39,44 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"通话中
"
android:text=
"继续倾诉
"
android:textColor=
"@color/white"
android:textSize=
"17sp"
app:layout_constraintBottom_toBottomOf=
"parent
"
app:layout_constraintBottom_toTopOf=
"@+id/tvTime
"
app:layout_constraintLeft_toRightOf=
"@+id/ivCall"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tvTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:textColor=
"@color/white"
android:textSize=
"10sp"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"@+id/tvCall"
app:layout_constraintRight_toRightOf=
"@+id/tvCall"
app:layout_constraintTop_toBottomOf=
"@+id/tvCall"
tools:text=
"剩余1分40秒"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_confide_free"
android:paddingLeft=
"5dp"
android:paddingTop=
"2dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"2dp"
android:text=
"首单免费"
android:textColor=
"@color/white"
android:textSize=
"11sp"
android:id=
"@+id/first_order"
android:visibility=
"gone"
app:layout_constraintCircle=
"@+id/layoutCall"
app:layout_constraintCircleAngle=
"70"
app:layout_constraintCircleRadius=
"70dp"
/>
<LinearLayout
android:id=
"@+id/layoutChange"
...
...
@@ -52,7 +84,12 @@
android:layout_height=
"42dp"
android:layout_marginStart=
"@dimen/platform_dp_23"
android:layout_marginBottom=
"32dp"
android:visibility=
"gone"
tools:visibility=
"visible"
android:background=
"@drawable/confide_line_bg_change"
app:layout_constraintTop_toTopOf=
"@id/layoutCall"
app:layout_constraintLeft_toRightOf=
"@id/layoutCall"
app:layout_constraintRight_toRightOf=
"parent"
android:gravity=
"center"
android:paddingLeft=
"28dp"
android:paddingRight=
"28dp"
>
...
...
@@ -74,4 +111,4 @@
>
</ProgressBar>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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