Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-android
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
云深项目组
beyond-clouds-android
Commits
fb6a1389
Commit
fb6a1389
authored
Mar 16, 2020
by
段启岩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重复点击底部导航后滚动到第一项
parent
3fe7234a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
app/src/main/java/cn/yunliyunwai/beyondclouds/ui/common/RefreshableFragment.java
+5
-0
app/src/main/java/cn/yunliyunwai/beyondclouds/util/CategoryViewpagerUtils.java
+1
-0
No files found.
app/src/main/java/cn/yunliyunwai/beyondclouds/ui/common/RefreshableFragment.java
View file @
fb6a1389
...
...
@@ -113,5 +113,9 @@ public abstract class RefreshableFragment<T, VM extends PageableViewModel<T>> ex
viewModel
.
loadFirstPage
(
category
);
}
public
void
scrollToTop
()
{
binding
.
recyclerView
.
scrollToPosition
(
0
);
}
protected
abstract
BaseQuickAdapter
<
T
,
BaseViewHolder
>
createAdapter
();
}
\ No newline at end of file
app/src/main/java/cn/yunliyunwai/beyondclouds/util/CategoryViewpagerUtils.java
View file @
fb6a1389
...
...
@@ -56,6 +56,7 @@ public class CategoryViewpagerUtils {
if
(
adapter
instanceof
CategoryFragmentPagerAdapter
)
{
Fragment
fragment
=
((
CategoryFragmentPagerAdapter
)
adapter
).
getCurrentFragment
();
if
(
null
!=
fragment
&&
fragment
instanceof
RefreshableFragment
)
{
((
RefreshableFragment
)
fragment
).
scrollToTop
();
((
RefreshableFragment
)
fragment
).
onRefresh
();
}
}
...
...
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