GithubHelp home page GithubHelp logo

andvisions / roll3dimageview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhangyuchen1991/roll3dimageview

0.0 2.0 0.0 1.09 MB

一个实现图片花式3D翻转效果的自定义View

License: Apache License 2.0

Java 100.00%

roll3dimageview's Introduction

Roll3DImageView

#####简介

这是一个实现图片3D翻转的自定义view,包含四种3D翻转的效果以及一种2D平移效果。

####效果 2D平移:

3D翻转:

3D开合翻转:

百叶窗:

轮转效果:

####使用

你可能乍一看以为它是一个ViewGroup的子类,其实不然,它是继承View实现的。并且,只有一个类, 类的名字叫:Roll3DView。在你想要使用的地方把它拷贝过去,调用API使用就行。

####API

  • addImageBitmap(Bitmap bitmap) 添加bitmap

  • removeBitmapAt(int index) 删除在index位置上的bitmap

  • setRollMode(RollMode rollMode) 设置滚动模式

  • setRollDirection(int direction) 设置滚动方向:1为竖直方向,其他为水平方向;

  • toPre() 播放前一张

  • toNext() 播放后一张

  • setRollDuration(int rollDuration) 自动滚动设置单次滚动的时间

  • setPartNumber(int partNumber) 在百叶窗、轮转、3D开合模式时设置分割的块数

####实现原理

相关原理和实现过程请参见这里

####补充说明

知识都是不断学习积累来的,做这个效果的时候参考了一个很棒的库,从中也学习到了很多。感谢原作者的开源精神, 项目地址在这里:传送门,大家可以移步过去学习。

最后,如果有相关问题需要详细讨论,也欢迎加群430352053,方便交流,谢谢!

roll3dimageview's People

Contributors

zhangyuchen1991 avatar

Watchers

James Cloos avatar hossein 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.