Skip to content
No description or website provided.
Branch: master
Clone or download
sacot41 Merge pull request #8 from YuToo/master
1.Solving the problem of rapid sliding may cause the control position to become confused
Latest commit 6d134f3 Nov 6, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea 1.解决快速滑动可能引起控件位置错乱问题 Aug 25, 2017
example 1.解决快速滑动可能引起控件位置错乱问题 Aug 25, 2017
gradle/wrapper separation between the example and library module Jul 7, 2015
scviewpager 1.解决快速滑动可能引起控件位置错乱问题 Aug 25, 2017
.gitignore apk for example Aug 14, 2015
LICENSE Initial commit Jun 13, 2015
README.md update Mar 9, 2017
SCViewPager.iml 1.解决快速滑动可能引起控件位置错乱问题 Aug 25, 2017
build.gradle apk for example Aug 14, 2015
design.psd
example_2.gif change example gif Aug 10, 2015
gradle.properties separation between the example and library module Jul 7, 2015
gradlew separation between the example and library module Jul 7, 2015
gradlew.bat separation between the example and library module Jul 7, 2015
settings.gradle separation between the example and library module Jul 7, 2015

README.md

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.scviewpager.SCViewPager
        android:id="@+id/viewpager_main_activity"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
	</com.dev.sacot41.scviewpager.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.

You can’t perform that action at this time.