Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
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
android
android_vedio
Commits
0c88bda6
Commit
0c88bda6
authored
Sep 26, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e6050513
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
RedpkgFragment.kt
...n/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
+19
-2
No files found.
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
View file @
0c88bda6
...
...
@@ -8,7 +8,6 @@ import android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.view.View
import
android.widget.ImageView
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.SimpleItemAnimator
import
com.duben.dayplaylet.R
...
...
@@ -34,7 +33,6 @@ import com.duben.dayplaylet.ui.widgets.DialogListener
import
com.duben.dayplaylet.ui.widgets.RedPkgAwardDialog
import
com.duben.dayplaylet.ui.widgets.WithDrawSucDialog
import
com.duben.dayplaylet.utils.UIUtils
import
com.duben.library.utils.GlideUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.fragment_redpkg.*
import
net.yslibrary.android.keyboardvisibilityevent.KeyboardVisibilityEvent
...
...
@@ -451,5 +449,24 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
mWithDrawSucDialog
?.
show
()
}
// 滚动到未领取的红包位置
private
fun
scrollToRedpkg
()
{
mMsgAdapter
?.
let
{
if
(
it
.
data
.
size
<=
0
)
return
var
scrollPosition
=
0
for
(
i
in
it
.
data
.
size
-
1
downTo
0
)
{
if
(
it
.
data
[
i
].
itemType
==
2
&&
!
it
.
data
[
i
].
data
.
isGetRedpkg
)
{
scrollPosition
=
i
break
}
}
ry_redpkg
.
smoothScrollToPosition
(
scrollPosition
)
}
}
override
fun
onResume
()
{
super
.
onResume
()
scrollToRedpkg
()
}
}
\ No newline at end of file
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