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
e31b306e
Commit
e31b306e
authored
Jul 08, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: im咨询服务弹框样式调整
parent
e0a4873f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
221 additions
and
168 deletions
+221
-168
ExpertConsultServiceItemView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceItemView.kt
+10
-5
ExpertConsultServiceView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
+1
-1
im_expert_service_list_btn_bg.xml
m-im/src/main/res/drawable/im_expert_service_list_btn_bg.xml
+1
-1
im_expert_service_list_busy_btn_bg.xml
m-im/src/main/res/drawable/im_expert_service_list_busy_btn_bg.xml
+9
-0
im_expert_consult_service_item_view.xml
m-im/src/main/res/layout/im_expert_consult_service_item_view.xml
+197
-158
im_expert_consult_service_view.xml
m-im/src/main/res/layout/im_expert_consult_service_view.xml
+3
-3
No files found.
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceItemView.kt
View file @
e31b306e
...
@@ -61,14 +61,15 @@ class ExpertConsultServiceItemView : LinearLayout {
...
@@ -61,14 +61,15 @@ class ExpertConsultServiceItemView : LinearLayout {
@SuppressLint
(
"SetTextI18n"
)
@SuppressLint
(
"SetTextI18n"
)
fun
setData
(
bean
:
ServiceItemBean
.
ProductsBean
)
{
fun
setData
(
bean
:
ServiceItemBean
.
ProductsBean
)
{
if
(
mIsBusy
)
{
// 是否繁忙 true繁忙
if
(
mIsBusy
)
{
// 是否繁忙 true繁忙
ll_not_busy
.
visibility
=
View
.
GONE
im_expert_service_list_btn
.
visibility
=
View
.
GONE
ll_busy
.
visibility
=
View
.
VISIBLE
tv_add
.
visibility
=
View
.
VISIBLE
tv_add
.
setOnClickListener
{
tv_add
.
setOnClickListener
{
mListener
?.
addTime
()
mListener
?.
addTime
()
}
}
}
else
{
}
else
{
ll_not_busy
.
visibility
=
View
.
VISIBLE
im_expert_service_list_btn
.
visibility
=
View
.
VISIBLE
ll_busy
.
visibility
=
View
.
GONE
tv_add
.
visibility
=
View
.
GONE
}
}
//是否是套餐
//是否是套餐
if
(
bean
.
productDto
.
isPackage
==
2
)
{
if
(
bean
.
productDto
.
isPackage
==
2
)
{
...
@@ -87,6 +88,7 @@ class ExpertConsultServiceItemView : LinearLayout {
...
@@ -87,6 +88,7 @@ class ExpertConsultServiceItemView : LinearLayout {
//隐藏起售次数限制
//隐藏起售次数限制
service_item_low_buy_time
.
visibility
=
View
.
GONE
service_item_low_buy_time
.
visibility
=
View
.
GONE
}
}
val
mCompare
:
Comparator
<
ServiceItemBean
.
ProductsBean
.
ProductSpecDtosBean
>
=
val
mCompare
:
Comparator
<
ServiceItemBean
.
ProductsBean
.
ProductSpecDtosBean
>
=
Comparator
{
o1
,
o2
->
Comparator
{
o1
,
o2
->
val
res
=
o1
.
price
.
compareTo
(
o2
.
price
)
val
res
=
o1
.
price
.
compareTo
(
o2
.
price
)
...
@@ -105,6 +107,8 @@ class ExpertConsultServiceItemView : LinearLayout {
...
@@ -105,6 +107,8 @@ class ExpertConsultServiceItemView : LinearLayout {
mBean
.
price
mBean
.
price
)
)
service_item_price
.
paint
.
isFakeBoldText
=
true
//时间,取productSpecDtos数组最后一个的时间
//时间,取productSpecDtos数组最后一个的时间
// service_item_time.text = "/${bean.productDto.minOrderTime}分钟"
// service_item_time.text = "/${bean.productDto.minOrderTime}分钟"
}
}
...
@@ -129,7 +133,8 @@ class ExpertConsultServiceItemView : LinearLayout {
...
@@ -129,7 +133,8 @@ class ExpertConsultServiceItemView : LinearLayout {
//销量
//销量
service_item_saleout_num
.
text
=
"销量${bean.productDto.saleAmount}"
// service_item_saleout_num.text = "销量${bean.productDto.saleAmount}"
service_item_saleout_num
.
text
=
"${bean.productDto.saleAmount}"
setOnClickListener
{
setOnClickListener
{
mListener
?.
onItemClick
(
bean
)
mListener
?.
onItemClick
(
bean
)
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
View file @
e31b306e
...
@@ -101,7 +101,7 @@ class ExpertConsultServiceView : LinearLayout {
...
@@ -101,7 +101,7 @@ class ExpertConsultServiceView : LinearLayout {
}
}
}
}
}
}
tv_title
.
paint
.
isFakeBoldText
=
true
typeSelectedIndex
=
0
// 初始化为全部选中
typeSelectedIndex
=
0
// 初始化为全部选中
mServiceList
.
clear
()
mServiceList
.
clear
()
mServiceList
.
addAll
(
allServiceList
)
mServiceList
.
addAll
(
allServiceList
)
...
...
m-im/src/main/res/drawable/im_expert_service_list_btn_bg.xml
View file @
e31b306e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<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"
>
<corners
android:radius=
"
14dp
"
/>
<corners
android:radius=
"
@dimen/platform_dp_18
"
/>
<gradient
android:startColor=
"#FF7A5C"
<gradient
android:startColor=
"#FF7A5C"
android:endColor=
"#FF406C"
/>
android:endColor=
"#FF406C"
/>
...
...
m-im/src/main/res/drawable/im_expert_service_list_busy_btn_bg.xml
0 → 100644
View file @
e31b306e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/platform_dp_18"
/>
<solid
android:color=
"#1DA1F2"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/layout/im_expert_consult_service_item_view.xml
View file @
e31b306e
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"horizontal"
>
android:layout_width=
"match_parent"
android:layout_height=
"112dp"
>
<LinearLayout
<LinearLayout
android:layout_width=
"0dp"
android:layout_width=
"match_parent"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:layout_marginLeft=
"18dp"
android:orientation=
"vertical"
android:paddingTop=
"10dp"
android:paddingBottom=
"18dp"
>
<RelativeLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
>
android:layout_marginLeft=
"18dp"
<TextView
android:layout_weight=
"1"
android:id=
"@+id/service_item_title"
android:orientation=
"vertical"
android:paddingTop=
"@dimen/platform_dp_19"
android:paddingBottom=
"18dp"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
>
tools:text=
" 调节孕期情绪烦躁,建立积极心态面对新生活"
android:textColor=
"#1A1A1A"
android:textSize=
"16dp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/service_item_package"
android:layout_width=
"24dp"
android:layout_height=
"14dp"
android:gravity=
"center"
android:text=
"套餐"
android:visibility=
"gone"
android:layout_marginTop=
"3dp"
android:textColor=
"#ffffff"
android:textSize=
"10dp"
android:background=
"@drawable/im_service_package_bg"
/>
</RelativeLayout>
<LinearLayout
<TextView
android:layout_width=
"match_parent"
android:id=
"@+id/service_item_title"
android:layout_height=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_marginTop=
"8dp"
android:layout_height=
"@dimen/platform_dp_48"
android:gravity=
"center_vertical"
android:textColor=
"#1C1F28"
android:orientation=
"horizontal"
>
android:textFontWeight=
"500"
android:textSize=
"17sp"
android:textStyle=
"normal"
tools:text=
" 调节孕期情绪烦躁,建立积极心态面对新生活"
/>
<TextView
android:id=
"@+id/service_item_package"
android:layout_width=
"24dp"
android:layout_height=
"14dp"
android:layout_marginTop=
"3dp"
android:background=
"@drawable/im_service_package_bg"
android:gravity=
"center"
android:text=
"套餐"
android:textColor=
"#ffffff"
android:textSize=
"10dp"
android:visibility=
"gone"
/>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"top"
android:layout_marginTop=
"@dimen/platform_dp_8"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"¥"
android:text=
"咨询人数"
android:textColor=
"#FF5040"
android:textColor=
"#9D9EA7"
android:textSize=
"12sp"
android:textSize=
"@dimen/platform_sp_12"
/>
android:textStyle=
"bold"
android:gravity=
"bottom"
android:paddingBottom=
"4dp"
/>
<TextView
<TextView
android:id=
"@+id/service_item_
price
"
android:id=
"@+id/service_item_
saleout_num
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"0"
android:layout_marginLeft=
"2dp"
android:textColor=
"#FF5040"
android:text=
"9833"
android:textSize=
"18sp"
android:textColor=
"#1A1A1A"
android:textStyle=
"bold"
android:textSize=
"@dimen/platform_sp_12"
/>
android:layout_marginBottom=
"1dp"
/>
<TextView
<TextView
android:id=
"@+id/service_item_time"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"
match_par
ent"
android:layout_height=
"
wrap_cont
ent"
android:
gravity=
"bottom
"
android:
text=
"/0分钟
"
android:textColor=
"#999999"
android:textColor=
"#999999"
android:textSize=
"12sp"
android:textSize=
"12dp"
android:paddingBottom=
"4dp"
android:visibility=
"gone"
/>
android:text=
"起"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/service_item_time"
android:id=
"@+id/tv_feedbackRate"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"/0分钟"
android:layout_marginLeft=
"10dp"
android:textColor=
"#999999"
android:text=
"好评率"
android:visibility=
"gone"
android:textColor=
"#9D9EA7"
android:textSize=
"12dp"
/>
android:textSize=
"@dimen/platform_sp_12"
/>
<TextView
android:id=
"@+id/service_item_low_buy_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
tools:text=
"(几次起售)"
android:visibility=
"gone"
android:textColor=
"#999999"
android:textSize=
"12dp"
/>
<TextView
android:id=
"@+id/tv_feedbackRate"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"好评率"
android:layout_marginLeft=
"10dp"
android:textColor=
"#999999"
android:textSize=
"12dp"
/>
<TextView
<TextView
android:id=
"@+id/service_item_feddbackrate"
android:id=
"@+id/service_item_feddbackrate"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"0%
"
android:layout_marginLeft=
"2dp
"
android:layout_marginLeft=
"1dp
"
android:text=
"0%
"
android:textColor=
"#1A1A1A"
android:textColor=
"#1A1A1A"
android:textSize=
"12dp
"
/>
android:textSize=
"@dimen/platform_sp_12
"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
>
<LinearLayout
<RelativeLayout
android:id=
"@+id/ll_not_busy"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
android:gravity=
"center_vertical|center"
android:paddingLeft=
"31dp"
android:paddingRight=
"18dp"
android:visibility=
"gone"
tools:visibility=
"visible"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/im_expert_service_list_btn"
android:layout_width=
"68dp"
android:layout_height=
"27dp"
android:background=
"@drawable/im_expert_service_list_btn_bg"
android:gravity=
"center"
android:text=
"预约"
android:textColor=
"#ffffff"
android:textSize=
"14dp"
android:textStyle=
"bold"
/>
<
TextView
<
LinearLayout
android:id=
"@+id/
service_item_saleout_num
"
android:id=
"@+id/
ll_busy
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginTop=
"2dp"
android:gravity=
"center"
android:text=
"销量0"
android:orientation=
"vertical"
android:textColor=
"#999999"
android:paddingLeft=
"20dp"
android:textSize=
"10dp"
/>
android:paddingRight=
"18dp"
</LinearLayout>
tools:visibility=
"visible"
>
<LinearLayout
android:id=
"@+id/ll_busy"
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_width=
"74dp"
android:layout_height=
"match_parent"
android:layout_height=
"@dimen/platform_dp_32"
>
android:gravity=
"center"
<TextView
android:orientation=
"vertical"
android:id=
"@+id/im_expert_service_list_btn"
android:paddingLeft=
"20dp"
android:layout_width=
"74dp"
android:paddingRight=
"18dp"
android:layout_height=
"@dimen/platform_dp_32"
android:visibility=
"gone"
android:background=
"@drawable/im_expert_service_list_btn_bg"
tools:visibility=
"visible"
>
android:gravity=
"center"
android:text=
"预约"
android:textColor=
"#ffffff"
android:textSize=
"14dp"
android:textStyle=
"bold"
/>
<LinearLayout
android:id=
"@+id/tv_add"
android:layout_width=
"74dp"
android:layout_height=
"@dimen/platform_dp_32"
android:background=
"@drawable/im_expert_service_list_busy_btn_bg"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"@dimen/platform_dp_2"
android:includeFontPadding=
"false"
android:text=
"已约满"
android:textColor=
"#ffffff"
android:textFontWeight=
"800"
android:textSize=
"@dimen/im_text_size_13"
android:textStyle=
"normal"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginBottom=
"@dimen/platform_dp_2"
android:includeFontPadding=
"false"
android:text=
"发送提醒"
android:textColor=
"#ffffff"
android:textSize=
"9sp"
/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_14"
android:gravity=
"top"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:text=
"¥"
android:textFontWeight=
"800"
android:textColor=
"#EB892C"
android:textSize=
"12sp"
android:layout_marginBottom=
"1dp"
/>
<TextView
android:id=
"@+id/service_item_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"bottom"
android:textStyle=
"normal"
android:textFontWeight=
"1500"
android:text=
"0"
android:textColor=
"#EB892C"
android:textSize=
"@dimen/im_text_size_18"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/platform_dp_3"
android:gravity=
"bottom"
android:layout_gravity=
"bottom"
android:text=
"起"
android:textColor=
"#9D9EA7"
android:layout_marginBottom=
"@dimen/platform_dp_1"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/service_item_low_buy_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#9D9EA7"
android:textSize=
"@dimen/sp_12"
android:visibility=
"gone"
android:layout_gravity=
"bottom"
android:layout_marginBottom=
"@dimen/platform_dp_1"
android:text=
"(8次起售)"
/>
</LinearLayout>
<TextView
</LinearLayout>
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"预约时间已满"
/>
<TextView
</RelativeLayout>
android:id=
"@+id/tv_add"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:baselineAligned=
"false"
android:drawableRight=
"@drawable/right_triangle"
android:padding=
"5dp"
android:text=
"提醒添加"
android:drawablePadding=
"2dp"
android:textColor=
"@color/platform_color_1DA1F2"
/>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
</LinearLayout>
<View
\ No newline at end of file
android:layout_width=
"match_parent"
android:layout_height=
"1px"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"@dimen/platform_dp_16"
android:layout_marginRight=
"@dimen/platform_dp_16"
android:background=
"@color/im_divide_color"
/>
</RelativeLayout>
\ No newline at end of file
m-im/src/main/res/layout/im_expert_consult_service_view.xml
View file @
e31b306e
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
android:layout_height=
"24dp"
android:layout_height=
"24dp"
android:layout_marginTop=
"@dimen/platform_dp_5"
>
android:layout_marginTop=
"@dimen/platform_dp_5"
>
<TextView
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"选择服务主题"
android:text=
"选择服务主题"
android:textColor=
"#242424"
android:textColor=
"#1C1F28"
android:textSize=
"18dp"
android:textSize=
"18sp"
android:textStyle=
"bold"
android:layout_centerInParent=
"true"
/>
android:layout_centerInParent=
"true"
/>
</RelativeLayout>
</RelativeLayout>
...
...
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