GithubHelp home page GithubHelp logo

muxi166 / easyflipviewpager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wajahatkarim3/easyflipviewpager

0.0 1.0 0.0 15.33 MB

๐Ÿ“– The library for creating book and card flip animations in ViewPager in Android

Home Page: https://android.jlelse.eu/easyflipviewpager-the-flip-animations-for-your-viewpager-fd66b34f4703

License: Apache License 2.0

Kotlin 56.06% Java 43.94%

easyflipviewpager's Introduction

New in the EasyFlipViewPagerย  The article on how this library was created is now published. You can read it on this link here. โ†’.


Built with โค๏ธŽ by Wajahat Karim and contributors


๐Ÿ“– Full Demo Video

Demo Video

๐Ÿ“ฑ Download Demo on Android

Download the APK file from here on your Android phone and enjoy the Demo App :)

๐Ÿ’ฅ Achievements

๐Ÿ’ป Installation

Add EasyFlipViewPager in app's build.gradle file:

   implementation 'com.wajahatkarim3.easyflipviewpager:easyflipviewpager:1.0.0'

Or add EasyFlipViewPager as a new dependency inside your pom.xml

<dependency>
  <groupId>com.wajahatkarim3.easyflipviewpager</groupId>
  <artifactId>easyflipviewpager</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

โ“ Usage

Just create an object of either BookFlipPageTransformer or CardFlipPageTransformer and assign it to your ViewPager object by calling ViewPager#setPageTransformer(true, myTransformerObject).

๐Ÿ’ณ Card Flip Example

// Get ViewPager and Set Adapter
myViewPager = findViewById(R.id.myViewPager);
pagerAdapter = new MyPagerAdapter(this);
myViewPager.setAdapter(pagerAdapter);

// Create an object of page transformer
CardFlipPageTransformer cardFlipPageTransformer = new CardFlipPageTransformer();

// Enable / Disable scaling while flipping. If false, then card will only flip as in Poker card example. 
// Otherwise card will also scale like in Gallery demo. By default, its true.
cardFlipPageTransformer.setScalable(false);

// Set orientation. Either horizontal or vertical. By default, its vertical.
cardFlipPageTransformer.setFlipOrientation(CardFlipPageTransformer.VERTICAL);

// Assign the page transformer to the ViewPager.
myViewPager.setPageTransformer(true, cardFlipPageTransformer);

๐Ÿ“„ Book Flip Example

// Get ViewPager and Set Adapter        
myViewPager = findViewById(R.id.myViewPager);
pagerAdapter = new MyPagerAdapter(this);
myViewPager.setAdapter(pagerAdapter);

// Create an object of page transformer
BookFlipPageTransformer bookFlipPageTransformer = new BookFlipPageTransformer();

// Enable / Disable scaling while flipping. If true, then next page will scale in (zoom in). By default, its true.
bookFlipPageTransformer.setEnableScale(true);

// The amount of scale the page will zoom. By default, its 5 percent.
bookFlipPageTransformer.setScaleAmountPercent(10f);

// Assign the page transformer to the ViewPager.
myViewPager.setPageTransformer(true, bookFlipPageTransformer);

๐Ÿ’ฐ Donations

This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!

PayPal

  • Donate $5: Thank's for creating this project, here's a tea (or some juice) for you!
  • Donate $10: Wow, I am stunned. Let me take you to the movies!
  • Donate $15: I really appreciate your work, let's grab some lunch!
  • Donate $25: That's some awesome stuff you did right there, dinner is on me!
  • Donate $50: I really really want to support this project, great job!
  • Donate $100: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!
  • Donate $2799: Go buddy, buy Macbook Pro for yourself!

Of course, you can also choose what you want to donate, all donations are awesome!

๐Ÿ‘จ Developed By

Wajahat Karim

๐Ÿ‘ How to Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

๐Ÿ“ƒ License

Copyright 2018 Wajahat Karim

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

easyflipviewpager's People

Contributors

wajahatkarim3 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.