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
d1a46f59
Commit
d1a46f59
authored
May 19, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:bottomSheet改为bottomSheetDialogFragment
parent
acdb275d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+16
-14
ConfideHomeEventImpl.kt
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
+1
-1
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
d1a46f59
...
...
@@ -23,9 +23,11 @@ class ConfideBottomSheetDialogFragment:BottomSheetDialogFragment() {
lateinit
var
text_title
:
View
;
lateinit
var
line
:
View
;
lateinit
var
rl_title
:
View
;
lateinit
var
close_webview_Icon
:
View
;
fun
showBottomSheetDialog
(
activity
:
BaseActivity
)
{
lateinit
var
close_webview_Icon
:
View
lateinit
var
jumpUrl
:
String
fun
showBottomSheetDialog
(
activity
:
BaseActivity
,
jumpUrl
:
String
)
{
this
.
activity
=
activity
this
.
jumpUrl
=
jumpUrl
show
(
activity
.
supportFragmentManager
,
"confide_bottom_showdialog"
)
}
...
...
@@ -102,27 +104,27 @@ class ConfideBottomSheetDialogFragment:BottomSheetDialogFragment() {
dialog
.
setOnShowListener
{
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
(
8
00f
)
behavior
.
peekHeight
=
RxImageTool
.
dp2px
(
6
00f
)
//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
}
}
}
...
...
@@ -171,7 +173,7 @@ class ConfideBottomSheetDialogFragment:BottomSheetDialogFragment() {
"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"
)
// wv_content.loadUrl(jumpUrl)
wv_content
.
setOnTouchListener
{
p0
,
p1
->
//canScrollVertically(-1)的值表示是否能向下滚动,false表示已经滚动到顶部
if
(!
wv_content
.
canScrollVertically
(-
1
))
{
wv_content
.
requestDisallowInterceptTouchEvent
(
false
);
...
...
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
View file @
d1a46f59
...
...
@@ -146,7 +146,7 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
@SuppressLint
(
"JavascriptInterface"
,
"ClickableViewAccessibility"
)
override
fun
consultantClick
(
linkUrl
:
String
?)
{
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
mContext
as
BaseActivity
)
.
showBottomSheetDialog
(
mContext
as
BaseActivity
,
linkUrl
!!
)
// link(linkUrl)
}
...
...
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