GithubHelp home page GithubHelp logo

supermarslee / autoscrolllayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leiyun1993/autoscrolllayout

0.0 1.0 0.0 6.14 MB

仿淘宝首页热点新闻滚动,类中奖滚动,自动滚动文字、View、跑马灯

Java 66.18% Kotlin 33.82%

autoscrolllayout's Introduction

一些常见的切换效果

这是一个小demo展示文字自动横向滚动、竖向滚动和View竖向滚动。

自定义+动画控制

1、文字横向滚动只是直接用TextView实现跑马灯效果

2、文字竖向滚动实际上是在布局中加入了两个TextView使用,使用handler控制显示和隐藏,加上动画实现的竖向滚动。

3、竖向的View滚动可实现类似淘宝首页的效果,通过继承ViewFlipper实现,这里用Adapter控制数据实际上是复杂的做法, 实际上传入一个List即可简单实现,可自行修改;

4、实现自动滚动的View,仿中奖缓慢滚动效果

5、ViewSwitcher+Handler实现切换

image

ViewFlipper实现

以下是使用ViewFlipper实现的几种不同的切换效果

image

有需要的自己扣源码。

更新说明

2020-1-16

1、更新为androidX版本,老版本在support分支

2、用ViewSwitcher模拟了新的淘宝头条滚动效果

autoscrolllayout's People

Contributors

leiyun1993 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.