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
bbdbf5a5
Commit
bbdbf5a5
authored
Dec 05, 2019
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询师列表页弹窗隐藏与显示
parent
1976718f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
config.gradle
config.gradle
+2
-2
ConsultAssistantDialog.kt
m-consultant/src/main/java/com/yidianling/consultant/dialog/ConsultAssistantDialog.kt
+13
-8
ConsultAssistantDialogUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
+1
-0
No files found.
config.gradle
View file @
bbdbf5a5
...
@@ -44,7 +44,7 @@ ext {
...
@@ -44,7 +44,7 @@ ext {
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.35"
,
"m-confide"
:
"0.0.35"
,
"m-consultant"
:
"0.0.4
6
"
,
"m-consultant"
:
"0.0.4
8
"
,
"m-fm"
:
"0.0.23"
,
"m-fm"
:
"0.0.23"
,
"m-user"
:
"0.0.39"
,
"m-user"
:
"0.0.39"
,
...
@@ -84,7 +84,7 @@ ext {
...
@@ -84,7 +84,7 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.27.1"
,
"m-confide"
:
"0.0.27.1"
,
"m-consultant"
:
"0.0.2
6
"
,
"m-consultant"
:
"0.0.2
7
"
,
"m-course"
:
"0.0.22"
,
"m-course"
:
"0.0.22"
,
"m-fm"
:
"0.0.15"
,
"m-fm"
:
"0.0.15"
,
"m-tests"
:
"0.0.4"
,
"m-tests"
:
"0.0.4"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/dialog/ConsultAssistantDialog.kt
View file @
bbdbf5a5
...
@@ -9,9 +9,9 @@ import android.os.Bundle
...
@@ -9,9 +9,9 @@ import android.os.Bundle
import
android.os.Handler
import
android.os.Handler
import
android.view.Gravity
import
android.view.Gravity
import
android.view.View
import
android.view.View
import
android.view.ViewTreeObserver
import
android.view.WindowManager
import
android.view.WindowManager
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.consultant.R
import
com.yidianling.consultant.R
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_window.*
import
kotlinx.android.synthetic.main.consultant_expert_consult_assistant_popup_window.*
...
@@ -45,15 +45,16 @@ class ConsultAssistantDialog(
...
@@ -45,15 +45,16 @@ class ConsultAssistantDialog(
window
.
setWindowAnimations
(
R
.
style
.
consultant_expert_consult_assistant_dialog_animate
)
window
.
setWindowAnimations
(
R
.
style
.
consultant_expert_consult_assistant_dialog_animate
)
if
(!
ConsultAssistantDialogUtils
.
INSTANCE
.
canShowDesc
())
{
if
(!
ConsultAssistantDialogUtils
.
INSTANCE
.
canShowDesc
())
{
consultant_assistant_dialog_desc_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_outside_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_outside_ll
.
visibility
=
View
.
GONE
// refreshDialogLayout(
)
refreshDialogLayout
(
ConsultAssistantDialogUtils
.
INSTANCE
.
minWidth
)
}
}
consultant_assistant_dialog_close
.
setOnClickListener
{
consultant_assistant_dialog_close
.
setOnClickListener
{
if
(
minWidth
==
null
)
{
if
(
minWidth
==
null
)
{
minWidth
=
(
consultant_assistant
.
measuredWidth
*
1.5
).
toInt
()
minWidth
=
(
consultant_assistant
.
measuredWidth
*
1.5
).
toInt
()
}
}
ConsultAssistantDialogUtils
.
INSTANCE
.
minWidth
=
minWidth
!!
//一个dialog关闭左侧desc,所有导医左侧desc都关闭
//一个dialog关闭左侧desc,所有导医左侧desc都关闭
SharedPreferencesEditor
.
putString
(
SharedPreferencesEditor
.
putString
(
ConsultAssistantDialogUtils
.
INSTANCE
.
ASSISTANT_DIALOG_SP_TAG
,
ConsultAssistantDialogUtils
.
INSTANCE
.
ASSISTANT_DIALOG_SP_TAG
,
...
@@ -97,19 +98,23 @@ class ConsultAssistantDialog(
...
@@ -97,19 +98,23 @@ class ConsultAssistantDialog(
}
}
public
fun
setDescHide
()
{
public
fun
setDescHide
()
{
if
(
null
!=
consultant_assistant_dialog_desc_ll
)
{
if
(
null
!=
consultant_assistant_dialog_desc_ll
)
{
consultant_assistant_dialog_desc_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_outside_ll
.
visibility
=
View
.
GONE
consultant_assistant_dialog_desc_outside_ll
.
visibility
=
View
.
GONE
refreshDialogLayout
()
refreshDialogLayout
(
ConsultAssistantDialogUtils
.
INSTANCE
.
minWidth
)
}
}
}
}
// 刷新dialog布局,减小拦截点击区域
// 刷新dialog布局,减小拦截点击区域
fun
refreshDialogLayout
()
{
fun
refreshDialogLayout
(
width
:
Int
)
{
val
params
=
window
.
attributes
val
params
=
window
.
attributes
if
(
minWidth
==
null
)
{
minWidth
=
(
consultant_assistant
.
measuredWidth
*
1.5
).
toInt
()
if
(
width
!=
0
)
{
minWidth
=
width
}
else
{
minWidth
=
(
RxImageTool
.
dp2px
(
60f
)
*
1.5
)
as
Int
}
}
params
.
width
=
minWidth
!!
params
.
width
=
minWidth
!!
params
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
params
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
params
.
gravity
=
Gravity
.
RIGHT
+
Gravity
.
BOTTOM
params
.
gravity
=
Gravity
.
RIGHT
+
Gravity
.
BOTTOM
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
View file @
bbdbf5a5
...
@@ -30,6 +30,7 @@ class ConsultAssistantDialogUtils private constructor() {
...
@@ -30,6 +30,7 @@ class ConsultAssistantDialogUtils private constructor() {
var
consultAssistantActivityDialog
:
ConsultAssistantDialog
?
=
null
//咨询师列表activity页面展示的dialog
var
consultAssistantActivityDialog
:
ConsultAssistantDialog
?
=
null
//咨询师列表activity页面展示的dialog
var
expertSearchActivityPageHasShown
:
Boolean
=
false
// 专家咨询列表activity页面是否已经展示
var
expertSearchActivityPageHasShown
:
Boolean
=
false
// 专家咨询列表activity页面是否已经展示
var
ASSISTANT_DIALOG_SP_TAG
=
"assistant_dialog_sp_tag"
// 是否展示左侧文本的缓存key
var
ASSISTANT_DIALOG_SP_TAG
=
"assistant_dialog_sp_tag"
// 是否展示左侧文本的缓存key
var
minWidth
=
0
// 最小宽度
/**
/**
...
...
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