GithubHelp home page GithubHelp logo

carouselview's Introduction

CarouselView

This library is updated version of Android 3D Carousel.

Alt text

List of changes:

  • Fixed touch gesture
  • Improved performance
  • Closed issue with battery life
  • Added opportunity to add layout content
  • New parameters for carousel view.

Optional for widget view:

/**
 * Default min quantity of views.
 */
static final int MIN_QUANTITY = 3;

/**
 * Default max quantity of views.
 */
static final int MAX_QUANTITY = 12;

/**
 * Set diameter distortion, 1.0 = perfect circle
 */
static final float DIAMETER_SCALE = 0.4f;

/**
 * Rate to shrink objects as they appear further back in the depth field. Typical values 1.0,
 * linear, 2.0 twice as fast.
 */
static  final float DEPTH_SCALE = 0.8f;

/**
 * Tilt angle, negative lifts up back, positive lowers back.
 */
static float TILT = -0.3f;  

/**
 * Limit depth scale used to shrink far objects to not fall below this minimum scale.
 */
static final float MIN_SCALE = 0.4f;        

/**
 * Max velocity for scrolling.
 */
static final int MAX_SCROLLING_VELOCITY = 16000;

/**
 * Max scrolling distance.
 */
static final int MAX_SCROLLING_DISTANCE = 13;

/**
 * Duration in milliseconds from the start of a scroll during which we're
 * unsure whether the user is scrolling or flinging.
 */
static final int SCROLL_TO_FLING_UNCERTAINTY_TIMEOUT = 100;

/**
 * Duration in milliseconds from the start of animation to end.
 */
static final int ANIMATION_DURATION = 200;

/**
 * Default value for rotation scroll threshold.
 */
static final int SCROLLING_THRESHOLD = 150;

/**
 * Default min alpha value.
 */
static final int MIN_ALPHA = 30;  

/**
 * Defines default selected item.
 */
static final int DEFAULT_SELECTED_ITEM = 0;

/**
 * Configures size of items which are not in front.
 */
static final int CAROUSEL_ITEM_Z_POSITION = 1;

/**
 * Configures vertical shift of non-front items.
 */
static final float CAROUSEL_ITEM_Y_POSITION= 1.0f;

carouselview's People

Contributors

binaryroot avatar

Watchers

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