AutoScrollLayout自动滚动效果实现

AutoScrollLayout 了一些挺实用的滚动效果,像是文字自动横向、竖向滚动,还有仿淘宝首页的热门新闻滚动。挺适合做跑马灯效果,自动滚动文字展示啥的。比如横向滚动就是用 TextView 实现的跑马灯效果,简单又直接。竖向滚动,做了点小技巧,基本就是加了两个 TextView,通过句柄控制显示和隐藏,再配合动画就搞定了。想要做一个类似淘宝首页的竖向新闻滚动,可以用 ViewFlipper 来实现,甚至用 ViewSwitcherHandler 也能搞定效果。代码不复杂,能轻松自定义,效果也蛮好看。

zip
AutoScrollLayout-master.zip 预估大小:66个文件
folder
AutoScrollLayout-master 文件夹
file
.gitignore 92B
folder
app 文件夹
file
.gitignore 7B
file
build.gradle 1KB
folder
src 文件夹
folder
main 文件夹
file
AndroidManifest.xml 717B
folder
res 文件夹
folder
mipmap-xhdpi 文件夹
file
ic_launcher_round.png 6KB
file
ic_launcher.png 5KB
folder
mipmap-mdpi 文件夹
file
ic_launcher_round.png 2KB
file
ic_launcher.png 2KB
folder
anim 文件夹
file
hyperspace_out.xml 2KB
file
push_left_in.xml 912B
file
push_up_in.xml 912B
file
push_left_out.xml 913B
file
anim_scroll_out.xml 329B
file
anim_scroll_in.xml 328B
file
hyperspace_in.xml 840B
file
push_up_out.xml 913B
folder
layout 文件夹
file
fragment_scroll_layout.xml 4KB
file
item_switcher_view.xml 998B
file
fragment_view_flipper.xml 2KB
file
layout_smooth_scroll.xml 1KB
file
activity_main.xml 1KB
file
item_smooth_scroll.xml 1KB
file
item_layout.xml 2KB
file
item_text_view.xml 314B
folder
mipmap-xxhdpi 文件夹
file
ic_launcher_round.png 10KB
file
ic_launcher.png 8KB
folder
menu 文件夹
file
bottom_navigation.xml 394B
folder
drawable 文件夹
file
ic_view_quilt_black_24dp.xml 364B
file
ic_home_black_24dp.xml 325B
file
shape_switcher_item.xml 276B
file
shape_item.xml 278B
file
shape_gradient_white_bottom.xml 233B
file
shape_gradient_white_top.xml 234B
folder
mipmap-hdpi 文件夹
file
ic_launcher_round.png 4KB
file
ic_launcher.png 3KB
folder
mipmap-xxxhdpi 文件夹
file
ic_launcher_round.png 14KB
file
ic_launcher.png 10KB
folder
color 文件夹
file
selector_menu_color.xml 243B
folder
values 文件夹
file
strings.xml 132B
file
attrs.xml 996B
file
colors.xml 252B
file
styles.xml 383B
folder
java 文件夹
folder
com 文件夹
folder
ly 文件夹
folder
autoscrolllayout 文件夹
file
MainActivity.java 2KB
folder
entity 文件夹
file
SwitcherItem.kt 101B
file
Item.java 111B
folder
fragment 文件夹
file
ViewFlipperFragment.kt 4KB
file
ScrollLayoutFragment.kt 3KB
folder
widget 文件夹
file
VerticalScrollLayout.java 3KB
file
ScrollTextView.java 1KB
file
TextSwitcherView.kt 2KB
file
SmoothScrollLayout.java 4KB
file
VerticalScrollTextView.java 8KB
folder
adapter 文件夹
file
TestAdapter.java 2KB
file
MainPagerAdapter.kt 651B
file
proguard-rules.pro 930B
file
settings.gradle 15B
file
build.gradle 687B
file
gradlew 5KB
file
README.md 1KB
file
gradlew.bat 2KB
file
gradle.properties 902B
folder
image 文件夹
file
03.gif 179KB
file
02.gif 1.23MB
file
01.gif 2.09MB
folder
gradle 文件夹
folder
wrapper 文件夹
file
gradle-wrapper.properties 232B
file
gradle-wrapper.jar 53KB
...
zip 文件大小:3.58MB