Giter Club home page Giter Club logo

viewpager3d's Introduction

ViewPager 3D

Screenshot 1 Screenshot 1 Screenshot 1

This project aims to provide a reusable ViewPager widget for Android. It is based on the ViewPager class from Androids V4 compatibility package. Because of that android-support-v4.jar needs to be included in the build path.

Dependencies

Features

  • 3D overscroll effect
  • 3D swipe effect
  • subtle fade out during swipe and over scroll

Usage

Layout

<!--
  The ViewPager3d replaces a standard android.support.v4.view.ViewPager widget.
-->
<de.inovex.android.widgets.ViewPager3D
    android:id="@+id/view_pager"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

You can control the 3D effect with XML attributes:

<de.inovex.android.widgets.ViewPager3D
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/view_pager"
    app:overscroll_rotation ="1.75"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

All attributes are optional.

  • overscroll_rotation (float): Determines the amount of rotation during over scroll. Maximum rotation angle is 90 degrees divided by this value. Default is 2
  • overscroll_translation (integer): determines the maximum amount of translation along the z-axis during the overscroll. Default is 150.
  • swipe_rotation (float). Controls maximum rotation during swipe. Maximum rotation angle is 90 degrees divided by this value. Default is 3.
  • swipe_translation (integer): Maximum z-translation during swipe. Default = 100.
  • overscroll_animation_duration (integer): Duration of animation when user releases the over scroll. Default is 400 ms.
  • animate_alpha (boolean): if true the alpha value of the children views is decreased as they scroll out of the screen. Default is false because of performance issues.

Activity

ViewPager3D is used like the standard ViewPager widget. http://developer.android.com/reference/android/support/v4/view/ViewPager.html

License

Licensed under the Apache License, Version 2.0

viewpager3d's People

Contributors

renard314 avatar

Watchers

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