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
6e6fe841
Commit
6e6fe841
authored
May 19, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:bottomSheet改为bottomSheetDialogFragment
parent
d1a46f59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+26
-18
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
6e6fe841
...
...
@@ -38,6 +38,10 @@ class ConfideBottomSheetDialogFragment:BottomSheetDialogFragment() {
}
override
fun
onStart
()
{
super
.
onStart
()
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
...
...
@@ -65,25 +69,9 @@ class ConfideBottomSheetDialogFragment:BottomSheetDialogFragment() {
dialog
?.
window
?.
decorView
?.
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
touch_outside
)
val
bottomSheetView
=
dialog
?.
window
?.
decorView
?.
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
val
itemView
=
LayoutInflater
.
from
(
activity
).
inflate
(
R
.
layout
.
confide_bottom_two
,
null
,
false
)
val
layoutCall
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutCall
)
val
layoutChange
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutChange
)
val
layout_change_text
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layout_change_text
)
val
confide_progress
=
itemView
.
findViewById
<
View
>(
R
.
id
.
confide_progress
)
layoutCall
.
setOnClickListener
{
callJsFun
(
wv_content
,
"layoutCall()"
)
}
layoutChange
.
setOnClickListener
{
layout_change_text
.
visibility
=
View
.
GONE
confide_progress
.
visibility
=
View
.
VISIBLE
callJsFun
(
wv_content
,
"layoutCall()"
)
}
val
layoutParams
=
FrameLayout
.
LayoutParams
(
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
,
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
).
apply
{
gravity
=
Gravity
.
BOTTOM
or
Gravity
.
CENTER_HORIZONTAL
}
dialog
?.
window
?.
addContentView
(
itemView
,
layoutParams
)
if
(
cancelable
)
{
touchOutsideView
?.
setOnClickListener
(
View
.
OnClickListener
{
if
(
dialog
.
isShowing
)
{
...
...
@@ -100,8 +88,28 @@ class ConfideBottomSheetDialogFragment:BottomSheetDialogFragment() {
}
override
fun
onCreateDialog
(
savedInstanceState
:
Bundle
?):
Dialog
{
val
dialog
=
super
.
onCreateDialog
(
savedInstanceState
)
as
BottomSheetDialog
dialog
.
setOnShowListener
{
val
itemView
=
LayoutInflater
.
from
(
activity
).
inflate
(
R
.
layout
.
confide_bottom_two
,
null
,
false
)
val
layoutCall
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutCall
)
val
layoutChange
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutChange
)
val
layout_change_text
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layout_change_text
)
val
confide_progress
=
itemView
.
findViewById
<
View
>(
R
.
id
.
confide_progress
)
layoutCall
.
setOnClickListener
{
callJsFun
(
wv_content
,
"layoutCall()"
)
}
layoutChange
.
setOnClickListener
{
layout_change_text
.
visibility
=
View
.
GONE
confide_progress
.
visibility
=
View
.
VISIBLE
callJsFun
(
wv_content
,
"layoutCall()"
)
}
val
layoutParams
=
FrameLayout
.
LayoutParams
(
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
,
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
).
apply
{
gravity
=
Gravity
.
BOTTOM
or
Gravity
.
CENTER_HORIZONTAL
}
dialog
?.
window
?.
addContentView
(
itemView
,
layoutParams
)
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
(
600f
)
...
...
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