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
1386b39b
Commit
1386b39b
authored
Jul 01, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:m-consultant组件升级
parent
99494151
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
35 deletions
+92
-35
config.gradle
config.gradle
+2
-2
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+24
-17
EnquiryItem.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/EnquiryItem.kt
+8
-4
FilterPopupWindow.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
+25
-11
consultant_layout_search_content.xml
m-consultant/src/main/res/layout/consultant_layout_search_content.xml
+1
-1
consultant_method_item_filter.xml
m-consultant/src/main/res/layout/consultant_method_item_filter.xml
+32
-0
No files found.
config.gradle
View file @
1386b39b
...
...
@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.09"
,
"m-consultant"
:
"0.0.59.8
6
"
,
"m-consultant"
:
"0.0.59.8
7
"
,
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.36"
,
"m-home"
:
"0.0.22.66"
,
...
...
@@ -89,7 +89,7 @@ ext {
//第三步 若干
"m-confide"
:
"0.0.49.09"
,
"m-consultant"
:
"0.0.59.8
6
"
,
"m-consultant"
:
"0.0.59.8
7
"
,
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.36"
,
"m-home"
:
"0.0.22.66"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
1386b39b
...
...
@@ -599,7 +599,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
}
}
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
>
0
)
{
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
...
...
@@ -619,7 +619,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
}
}
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
>
0
)
{
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
...
...
@@ -639,7 +639,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
}
}
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
>
0
)
{
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
...
...
@@ -659,7 +659,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
}
}
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
>
0
)
{
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
...
...
@@ -975,7 +975,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
filterPopupWindow
.
setOnDismissListener
{
viewDim
.
visibility
=
View
.
INVISIBLE
viewDim_filter
.
visibility
=
View
.
GONE
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
>
0
||
!
TextUtils
.
isEmpty
(
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
minPrice
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
maxPrice
)
)
{
...
...
@@ -1134,18 +1134,25 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
private
fun
filterLabelSet
()
{
if
((
allFilter
.
others
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
)
==
1
)
{
var
text
:
String
?
=
""
if
(
allFilter
.
others
.
size
==
1
)
{
text
=
allFilter
.
others
[
0
].
value
}
else
if
(
allFilter
.
ages
.
size
==
1
)
{
text
=
allFilter
.
ages
[
0
].
value
}
else
if
(
allFilter
.
enquiries
.
size
==
1
)
{
text
=
allFilter
.
enquiries
[
0
].
value
}
else
if
(
allFilter
.
title
.
size
==
1
)
{
text
=
allFilter
.
title
[
0
].
value
}
else
if
(
allFilter
.
specialityCrowd
.
size
==
1
){
text
=
allFilter
.
specialityCrowd
[
0
].
value
}
else
{
text
=
"筛选"
when
{
allFilter
.
others
.
size
==
1
->
{
text
=
allFilter
.
others
[
0
].
value
}
allFilter
.
ages
.
size
==
1
->
{
text
=
allFilter
.
ages
[
0
].
value
}
allFilter
.
enquiries
.
size
==
1
->
{
text
=
allFilter
.
enquiries
[
0
].
value
}
allFilter
.
title
.
size
==
1
->
{
text
=
allFilter
.
title
[
0
].
value
}
allFilter
.
specialityCrowd
.
size
==
1
->
{
text
=
allFilter
.
specialityCrowd
[
0
].
value
}
else
->
{
text
=
"筛选"
}
}
if
(
text
?.
length
?:
0
>
4
)
{
tvFilter
.
text
=
text
?.
substring
(
0
,
3
)
+
"..."
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/bean/EnquiryItem.kt
View file @
1386b39b
...
...
@@ -4,9 +4,12 @@ import com.google.gson.annotations.SerializedName
data class
EnquiryItem
(
@field
:
SerializedName
(
"value"
)
val
value
:
String
?
=
null
,
@field
:
SerializedName
(
"value"
)
val
value
:
String
?
=
null
,
@field
:
SerializedName
(
"key"
)
val
key
:
Int
?
=
null
@field
:
SerializedName
(
"key"
)
val
key
:
Int
?
=
null
,
val
checkRrl
:
String
?,
val
unCheckUrl
:
String
?
)
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
View file @
1386b39b
...
...
@@ -13,6 +13,7 @@ import android.view.*
import
android.view.inputmethod.EditorInfo
import
android.view.inputmethod.InputMethodManager
import
android.widget.*
import
com.bumptech.glide.Glide
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
...
...
@@ -57,7 +58,7 @@ class FilterPopupWindow(
var
onFilterConfirmListener
:
OnFilterConfirmListener
?
=
null
/**筛选咨询方式一行数量*/
private
val
enquirySize
=
4
;
private
val
enquirySize
=
4
private
var
dp5
=
0
private
var
dp10
=
0
...
...
@@ -496,7 +497,9 @@ class FilterPopupWindow(
private
fun
initEnquiryViews
(
view
:
View
)
{
val
mWidth
=
(
popWidth
-
RxImageTool
.
dp2px
(
52f
))
/
enquirySize
for
((
index
,
enquiry
)
in
filterData
.
enquiry
.
withIndex
())
{
val
textView
=
View
.
inflate
(
context
,
R
.
layout
.
consultant_item_filter
,
null
)
as
TextView
val
llLayout
=
View
.
inflate
(
context
,
R
.
layout
.
consultant_method_item_filter
,
null
)
val
textView
:
TextView
=
llLayout
.
findViewById
(
R
.
id
.
tvFilterName
)
val
ivIcon
:
ImageView
=
llLayout
.
findViewById
(
R
.
id
.
iv_consultant_method
)
val
params
=
FrameLayout
.
LayoutParams
(
mWidth
,
RxImageTool
.
dp2px
(
36f
))
val
marginNum
=
RxImageTool
.
dp2px
(
5f
)
params
.
setMargins
(
...
...
@@ -505,28 +508,39 @@ class FilterPopupWindow(
marginNum
,
0
)
textView
.
layoutParams
=
params
llLayout
.
layoutParams
=
params
textView
.
text
=
enquiry
.
value
Glide
.
with
(
context
)
.
load
(
enquiry
.
unCheckUrl
)
.
into
(
ivIcon
)
enquiryViews
.
add
(
textV
iew
)
enquiryViews
.
add
(
v
iew
)
if
(
tempFilter
.
enquiries
.
contains
(
enquiry
))
{
textView
.
isSelected
=
true
llLayout
.
isSelected
=
true
textView
.
paint
.
isFakeBoldText
=
true
Glide
.
with
(
context
)
.
load
(
enquiry
.
checkRrl
)
.
into
(
ivIcon
)
}
textView
.
setOnClickListener
{
if
(
textView
.
isSelected
)
{
llLayout
.
setOnClickListener
{
if
(
llLayout
.
isSelected
)
{
tempFilter
.
enquiries
.
remove
(
enquiry
)
textView
.
isSelected
=
false
llLayout
.
isSelected
=
false
textView
.
paint
.
isFakeBoldText
=
false
Glide
.
with
(
context
)
.
load
(
enquiry
.
unCheckUrl
)
.
into
(
ivIcon
)
}
else
{
tempFilter
.
enquiries
.
add
(
enquiry
)
textView
.
isSelected
=
true
llLayout
.
isSelected
=
true
textView
.
paint
.
isFakeBoldText
=
true
Glide
.
with
(
context
)
.
load
(
enquiry
.
checkRrl
)
.
into
(
ivIcon
)
}
updateCount
(
ConsultBIConstants
.
POSITION_CONSULT_TYPE_CLICK
)
}
view
.
flEnquiryType
.
addView
(
textView
)
view
.
flEnquiryType
.
addView
(
llLayout
)
}
}
...
...
m-consultant/src/main/res/layout/consultant_layout_search_content.xml
View file @
1386b39b
...
...
@@ -75,7 +75,7 @@
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:paddingLeft=
"10dp"
android:paddingBottom=
"10dp"
></LinearLayout
>
android:paddingBottom=
"10dp"
/
>
<View
android:layout_width=
"match_parent"
...
...
m-consultant/src/main/res/layout/consultant_method_item_filter.xml
0 → 100644
View file @
1386b39b
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"4dp"
android:background=
"@drawable/consultant_bg_search_filter_selector"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/iv_consultant_method"
android:layout_width=
"@dimen/platform_dp_18"
android:layout_height=
"@dimen/platform_dp_18"
/>
<TextView
android:id=
"@+id/tvFilterName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLines=
"1"
android:orientation=
"vertical"
android:paddingTop=
"6dp"
android:paddingBottom=
"6dp"
android:layout_marginStart=
"@dimen/platform_dp_4"
android:textColor=
"@color/consultant_color_search_filter_selector"
android:textSize=
"13sp"
tools:text=
"当面"
/>
</LinearLayout>
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