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
75ddb555
Commit
75ddb555
authored
Dec 06, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加下拉刷新
parent
914ebf42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
VipEnjoyFragment.kt
...va/com/duben/speedplaylet/ui/fragment/VipEnjoyFragment.kt
+11
-4
fragment_vip_enjoy.xml
video/app/src/main/res/layout/fragment_vip_enjoy.xml
+4
-0
No files found.
video/app/src/main/java/com/duben/speedplaylet/ui/fragment/VipEnjoyFragment.kt
View file @
75ddb555
...
...
@@ -17,6 +17,7 @@ import com.duben.speedplaylet.ui.adapter.VipEnjoyAdapter
import
com.duben.speedplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
kotlinx.android.synthetic.main.fragment_vip_enjoy.*
/**
...
...
@@ -24,7 +25,8 @@ import kotlinx.android.synthetic.main.fragment_vip_enjoy.*
* @date 2023/12/5
* @desc VIP尊享页面
*/
class
VipEnjoyFragment
:
LazyLoadBaseFragment
(),
OnLoadMoreListener
,
VipEnjoyView
{
class
VipEnjoyFragment
:
LazyLoadBaseFragment
(),
OnLoadMoreListener
,
VipEnjoyView
,
OnRefreshListener
{
companion
object
{
fun
newInstance
():
Fragment
{
...
...
@@ -50,7 +52,7 @@ class VipEnjoyFragment : LazyLoadBaseFragment(), OnLoadMoreListener, VipEnjoyVie
override
fun
onResume
()
{
super
.
onResume
()
on
Refresh
()
my
Refresh
()
}
override
fun
onDetach
()
{
...
...
@@ -80,11 +82,12 @@ class VipEnjoyFragment : LazyLoadBaseFragment(), OnLoadMoreListener, VipEnjoyVie
}
private
fun
initListener
()
{
srl_enjoy
.
setEnableRefresh
(
fals
e
)
srl_enjoy
.
setEnableRefresh
(
tru
e
)
srl_enjoy
.
setOnLoadMoreListener
(
this
)
srl_enjoy
.
setOnRefreshListener
(
this
)
}
private
fun
on
Refresh
()
{
private
fun
my
Refresh
()
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_THREE
)
{
page
=
1
srl_enjoy
.
resetNoMoreData
()
...
...
@@ -92,6 +95,10 @@ class VipEnjoyFragment : LazyLoadBaseFragment(), OnLoadMoreListener, VipEnjoyVie
}
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
myRefresh
()
}
override
fun
onLoadMore
(
refreshLayout
:
RefreshLayout
)
{
page
=
++
page
vipEnjoyPresenter
.
getVedio4List
(
page
,
pageSize
)
...
...
video/app/src/main/res/layout/fragment_vip_enjoy.xml
View file @
75ddb555
...
...
@@ -26,6 +26,10 @@
app:srlAccentColor=
"@color/black"
app:srlPrimaryColor=
"#f0f2f5"
>
<com.scwang.smartrefresh.header.MaterialHeader
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
...
...
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