Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
e6ac82fb
Commit
e6ac82fb
authored
Mar 31, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化banner轮播展示
parent
fb3732b2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
16 deletions
+5
-16
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+2
-2
BannerView.java
.../main/java/com/mints/goodmoney/ui/widgets/BannerView.java
+3
-13
settings.gradle
GoodMoney/settings.gradle
+0
-1
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
e6ac82fb
...
...
@@ -163,8 +163,6 @@ class MyFragment : BaseFragment(),
myPresenter
.
userLogin
()
}
banner_view
.
startAutoScroll
()
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
}
...
...
@@ -364,6 +362,7 @@ class MyFragment : BaseFragment(),
fl_my_banner
.
visibility
=
View
.
VISIBLE
LogUtil
.
d
(
"TAG"
,
"getMyRotationChartSuc"
)
banner_view
.
visibility
=
View
.
GONE
banner_view
.
stopAutoScroll
()
BannerManager
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
fl_my_banner
)
}
else
{
...
...
@@ -380,6 +379,7 @@ class MyFragment : BaseFragment(),
it
.
setAdPosition
(
data
.
position
)
banner_view
.
setAdapter
(
it
)
}
banner_view
.
startAutoScroll
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/BannerView.java
View file @
e6ac82fb
...
...
@@ -64,8 +64,6 @@ public class BannerView extends FrameLayout {
private
boolean
isAnimScroll
;
private
boolean
isAutoScroll
;
private
boolean
isStopScroll
=
false
;
private
View
mRootView
;
private
Handler
mHandler
=
new
Handler
(
Looper
.
getMainLooper
());
private
AutoScrollTask
mScrollTask
;
...
...
@@ -173,16 +171,12 @@ public class BannerView extends FrameLayout {
}
}
// 一直给自己发消息
if
(!
isStopScroll
)
{
mHandler
.
postDelayed
(
this
,
mScrollDuration
);
}
}
void
start
()
{
if
(!
isStopScroll
)
{
mHandler
.
removeCallbacks
(
this
);
mHandler
.
postDelayed
(
this
,
mScrollDuration
);
}
}
...
...
@@ -369,8 +363,4 @@ public class BannerView extends FrameLayout {
mViewPager
.
setCurrentItem
(
position
);
}
public
void
setStopScroll
(
boolean
stopScroll
)
{
isStopScroll
=
stopScroll
;
}
}
GoodMoney/settings.gradle
View file @
e6ac82fb
include
':demo'
include
':app'
include
':shareSdkLib'
\ 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