-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
85 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
# AutoScrollTextView | ||
# [AutoScrollTextView](https://github.com/ronghao/FrameAnimationView) [![](https://jitpack.io/v/ronghao/AutoScrollTextView.svg)](https://jitpack.io/#ronghao/AutoScrollTextView) [![](https://travis-ci.org/ronghao/AutoScrollTextView.svg?branch=master)](https://travis-ci.org/ronghao/AutoScrollTextView) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/ronghao/CacheManage/master/LICENSE) | ||
android 上下滚动播放与走马灯效果结合 | ||
|
||
### 实现原理 | ||
+ 实现上下滚动 | ||
+ 使用[ViewSwitcher](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/ViewSwitcher.java) | ||
+ 使用scrollTo(x,y)和runable循环调用,移动textview,形成走马灯效果 | ||
|
||
# 使用方法 | ||
|
||
+ 使用FrameAnimView控件,继承RecyclingImageView | ||
+ FrameAnimView:animSrc="@drawable/anim_loading" | ||
+ 自定义RecyclingImageView控件 | ||
+ 参见MyFrameAnimView | ||
|
||
|
||
# 项目添加方法 | ||
在根 build.gradle中添加 | ||
|
||
allprojects { | ||
repositories { | ||
... | ||
maven { url 'https://jitpack.io' } | ||
} | ||
} | ||
在项目build.gradle中添加 | ||
|
||
dependencies { | ||
compile 'com.github.ronghao:AutoScrollTextView:1.0.0'//版本号参见 | ||
} | ||
|
||
版本号参见![](https://jitpack.io/v/ronghao/AutoScrollTextView.svg) |
2 changes: 1 addition & 1 deletion
2
...xtviewsample/ExampleInstrumentedTest.java → ...xtviewsample/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...scrolltextviewsample/ExampleUnitTest.java → ...scrolltextviewsample/ExampleUnitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...utoscrolltextview/AutoScrollTextView.java → ...utoscrolltextview/AutoScrollTextView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../autoscrolltextview/IMarqueeListener.java → .../autoscrolltextview/IMarqueeListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.haohahu.autoscrolltextview; | ||
package com.haohaohu.autoscrolltextview; | ||
|
||
/** | ||
* 走马灯监听 | ||
|
2 changes: 1 addition & 1 deletion
2
...u/autoscrolltextview/MarqueeSwitcher.java → ...u/autoscrolltextview/MarqueeSwitcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters