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
cbf4e55e
Commit
cbf4e55e
authored
Dec 05, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导医更新
parent
e3a47371
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
14 deletions
+33
-14
config.gradle
config.gradle
+1
-1
ConsultAssistantDialog.kt
m-consultant/src/main/java/com/yidianling/consultant/dialog/ConsultAssistantDialog.kt
+32
-3
ConsultAssistantDialogUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
+0
-10
No files found.
config.gradle
View file @
cbf4e55e
...
...
@@ -44,7 +44,7 @@ ext {
//第三步 若干
"m-confide"
:
"0.0.31.10"
,
"m-consultant"
:
"0.0.44.1
3
"
,
"m-consultant"
:
"0.0.44.1
9
"
,
"m-fm"
:
"0.0.21"
,
"m-user"
:
"0.0.37"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/dialog/ConsultAssistantDialog.kt
View file @
cbf4e55e
...
...
@@ -6,6 +6,7 @@ import android.animation.ObjectAnimator
import
android.app.Dialog
import
android.content.Context
import
android.os.Bundle
import
android.os.Handler
import
android.view.Gravity
import
android.view.View
import
android.view.ViewTreeObserver
...
...
@@ -21,11 +22,12 @@ import kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_
*/
class
ConsultAssistantDialog
(
c
ontext
:
Context
,
mC
ontext
:
Context
,
val
consultAssistantClickListener
:
OnConsultAssistantClickListener
?
)
:
Dialog
(
c
ontext
,
R
.
style
.
consultant_expert_dialog_default_style
)
{
)
:
Dialog
(
mC
ontext
,
R
.
style
.
consultant_expert_dialog_default_style
)
{
private
var
animate
:
ObjectAnimator
?
=
null
private
var
minWidth
:
Int
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
@@ -44,9 +46,14 @@ class ConsultAssistantDialog(
if
(!
ConsultAssistantDialogUtils
.
INSTANCE
.
canShowDesc
())
{
consultant_assistant_dialog_desc_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_outside_ll
.
visibility
=
View
.
GONE
// refreshDialogLayout()
}
consultant_assistant_dialog_close
.
setOnClickListener
{
if
(
minWidth
==
null
)
{
minWidth
=
(
consultant_assistant
.
measuredWidth
*
1.5
).
toInt
()
}
//一个dialog关闭左侧desc,所有导医左侧desc都关闭
SharedPreferencesEditor
.
putString
(
ConsultAssistantDialogUtils
.
INSTANCE
.
ASSISTANT_DIALOG_SP_TAG
,
...
...
@@ -59,13 +66,19 @@ class ConsultAssistantDialog(
consultant_assistant_dialog_desc_ll
.
measuredWidth
.
toFloat
()
)
animate
?.
setDuration
(
7
00
)
?.
start
()
animate
?.
setDuration
(
9
00
)
?.
start
()
animate
?.
addListener
(
object
:
Animator
.
AnimatorListener
{
override
fun
onAnimationRepeat
(
animation
:
Animator
?)
{
}
override
fun
onAnimationEnd
(
animation
:
Animator
?)
{
ConsultAssistantDialogUtils
.
INSTANCE
.
setDescHide
()
hide
()
// show()
Handler
().
postDelayed
({
show
()
},
10
)
}
override
fun
onAnimationCancel
(
animation
:
Animator
?)
{
...
...
@@ -87,7 +100,23 @@ class ConsultAssistantDialog(
if
(
null
!=
consultant_assistant_dialog_desc_ll
)
{
consultant_assistant_dialog_desc_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_outside_ll
.
visibility
=
View
.
GONE
refreshDialogLayout
()
}
}
// 刷新dialog布局,减小拦截点击区域
fun
refreshDialogLayout
()
{
val
params
=
window
.
attributes
if
(
minWidth
==
null
)
{
minWidth
=
(
consultant_assistant
.
measuredWidth
*
1.5
).
toInt
()
}
params
.
width
=
minWidth
!!
params
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
params
.
gravity
=
Gravity
.
RIGHT
+
Gravity
.
BOTTOM
params
.
verticalMargin
=
0.07f
params
.
horizontalMargin
=
0.01f
window
.
setWindowAnimations
(
0
)
window
.
attributes
=
params
}
interface
OnConsultAssistantClickListener
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
View file @
cbf4e55e
...
...
@@ -105,10 +105,6 @@ class ConsultAssistantDialogUtils private constructor() {
})
}
if
(!
canShowDesc
())
{
consultAssistantDialogFromHomePage
?.
setDescHide
()
}
consultAssistantDialogFromHomePage
?.
show
()
}
}
...
...
@@ -168,9 +164,6 @@ class ConsultAssistantDialogUtils private constructor() {
})
}
if
(!
canShowDesc
())
{
consultAssistantFragmentDialog
?.
setDescHide
()
}
consultAssistantFragmentDialog
?.
show
()
}
}
else
{
...
...
@@ -192,9 +185,6 @@ class ConsultAssistantDialogUtils private constructor() {
})
}
if
(!
canShowDesc
())
{
consultAssistantActivityDialog
?.
setDescHide
()
}
consultAssistantActivityDialog
?.
show
()
}
}
...
...
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