Giter Site home page Giter Site logo

scviewpager's Introduction

Android Arsenal

SCViewPager

Jazz for android

A simple ViewPager extends that provide scroll based animation like Jazz Hands for iOS. Jazz Hands library provided by IFTTT : https://github.com/IFTTT/JazzHands

alt tag

Install

With Gradle (JCenter):

compile "com.dev.sacot41:scviewpager:0.0.4"

Start

First, add SCViewPager to your project. Create an activity with the viewPage and the views you want to animate.

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
	android:layout_height="match_parent"
	tools:context=".MainActivity">

	<com.dev.sacot41.myresume.SCViewPager
        android:id="@+id/viewpager_main_activity"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
	</com.dev.sacot41.myresume.SCViewPager>

	<TextView
        android:id="@+id/textview_to_animate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:text="@string/textview_bonjour"/>

Retrieve view and add animation after you have set viewPager and his adapter.

Point size = SCViewAnimationUtil.getDisplaySize(this);

View view = findViewById(R.id.textview_to_animate);
SCViewAnimation viewAnimation = new SCViewAnimation(view);
viewAnimation.startToPosition((int)(size.x*1.5), null);
viewAnimation.addPageAnimation(new SCPositionAnimation(this, 0, -(int)(size.x*1.5), 0));
mViewPager.addAnimation(viewAnimation);

Disclaimer

This project is not yet implemented in a real app and it's hasn't the pretension to implement all feature provided by JazzHand on IOS; this projects is a pretext to me to better understand animation based on scrollview (viewpager) and publish my first library on Jcenter.

If you want a more complete library, heck Nightonke library, he add more animation and correct some bug : https://github.com/Nightonke/WoWoViewPager.

scviewpager's People

Contributors

johnjohndoe avatar sacot41 avatar

Watchers

 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.