All Projects → blipinsk → Flippablestackview

blipinsk / Flippablestackview

Licence: apache-2.0
An Android library introducing a stack of Views with the first item being flippable.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Flippablestackview

Stackpagetransformer
A PageTransformer for ViewPager to show as stack!!!
Stars: ✭ 67 (-91.7%)
Mutual labels:  stack, viewpager
Easyflipviewpager
📖 The library for creating book and card flip animations in ViewPager in Android
Stars: ✭ 698 (-13.51%)
Mutual labels:  viewpager
Ultraviewpager
UltraViewPager is an extension for ViewPager to provide multiple features in a single ViewPager.
Stars: ✭ 5,030 (+523.3%)
Mutual labels:  viewpager
Iruka
A collection of classical data structures ⛩ and algorithms 🏃‍♂️ implemented in Typescript with video lectures 📹.
Stars: ✭ 625 (-22.55%)
Mutual labels:  stack
Sublimehaskell
A Sublime Text 3 plugin for Haskell. Features cabal building, error and warning highlighting, smart completion and ghc-mod integration.
Stars: ✭ 574 (-28.87%)
Mutual labels:  stack
Infinitecycleviewpager
Infinite cycle ViewPager with two-way orientation and interactive effect.
Stars: ✭ 5,720 (+608.8%)
Mutual labels:  viewpager
Snaptablayout
Android library for fluid tablayout animation as seen on Snapchat.
Stars: ✭ 547 (-32.22%)
Mutual labels:  viewpager
Algorithm
Algorithm is a library of tools that is used to create intelligent applications.
Stars: ✭ 787 (-2.48%)
Mutual labels:  stack
Gallerylayoutmanager
New way to implements ViewPager/Gallery in Android with RecycleView
Stars: ✭ 684 (-15.24%)
Mutual labels:  viewpager
Learningmasteringalgorithms C
Mastering Algorithms with C 《算法精解:C语言描述》源码及Xcode工程、Linux工程
Stars: ✭ 615 (-23.79%)
Mutual labels:  stack
Qlibc
qLibc is a simple and yet powerful C library providing generic data structures and algorithms
Stars: ✭ 614 (-23.92%)
Mutual labels:  stack
Potion
_why the lucky stiff's little language (the official repo... until _why returns)
Stars: ✭ 586 (-27.39%)
Mutual labels:  stack
Mlens
ML-Ensemble – high performance ensemble learning
Stars: ✭ 680 (-15.74%)
Mutual labels:  stack
Litepager
LitePager,一个轻量级的ViewPager,仿新版网易云歌单广场
Stars: ✭ 563 (-30.24%)
Mutual labels:  viewpager
Creative Viewpager
Creative View Pager easy to use in Android
Stars: ✭ 715 (-11.4%)
Mutual labels:  viewpager
Cdsa
A library of generic intrusive data structures and algorithms in ANSI C
Stars: ✭ 549 (-31.97%)
Mutual labels:  stack
Inkpageindicator
InkPageIndicator created by @nickbutcher for Plaid https://github.com/nickbutcher/plaid and backported by me for API 14+ (4.0+)
Stars: ✭ 589 (-27.01%)
Mutual labels:  viewpager
Discretescrollview
A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
Stars: ✭ 5,533 (+585.63%)
Mutual labels:  viewpager
Animatedbottombar
A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.
Stars: ✭ 797 (-1.24%)
Mutual labels:  viewpager
Liquidswipe
Android LiquidSwipe Library
Stars: ✭ 721 (-10.66%)
Mutual labels:  viewpager

FlippableStackView

License Android Arsenal Maven Central

An Android library introducing a stack of Views with the first item being flippable.

Views inside the stack remain the aspect ratio of the FlippableStackView.

Library in action

Usage

For a working implementation of this library see the sample/ folder.

  1. Include the view inside your layout xml

    <com.bartoszlipinski.flippablestackview.FlippableStackView
      android:id="@+id/stack"
      android:layout_width="match_parent"
      android:layout_height="match_parent" />
    
  2. FlippableStackView is based on the specific PageTransformer used with the ViewPager. Therefore to fill the View you can use just a typical implementation of a PagerAdapter. In your onCreate method (or onCreateView for a fragment), setup all the parameters of the FlippableStackView.

    FlippableStackView stack = (FlippableStackView) findViewById(R.id.stack);
    stack.initStack(2);
    stack.setAdapter(mStackAdapter); //assuming mStackAdapter contains your initialized adapter
    

Important Note: The current implementation of the library will display the elements from the Adapter in the reverse order. In other words: view at position 0 of your adapter will be displayed at the bottom of the stack and view at position adapter.getCount()-1 will be visible first (available for the first flip).

Customization

The FlippableStackView is highly customizable to provide you with just the visual effect you really wanted.

There are three methods that allows for initialization of the stack:

  1. First one sets up the stack in the default way (scale-wise and orientation-wise):

    public void initStack(int numberOfStacked)
    
  2. The second one sets up the stack in the default way (scale-wise) but let's you choose the orientation of it:

    public void initStack(int numberOfStacked, StackPageTransformer.Orientation orientation)
    
  3. And the last one... a bit more advanced (lets you customize all the scale-related, orientation-related and alignment-related parameters):

    public void initStack(int numberOfStacked,
                          StackPageTransformer.Orientation orientation,
                          float currentPageScale,
                          float topStackedScale,
                          float overlapFactor,
                          StackPageTransformer.Gravity gravity)
    

Be sure to read about all the parameters in Javadoc before using the last one.

Including In Your Project

You can grab the library via Maven Central. Just add a proper dependency inside your build.gradle. Like this:

dependencies {
    compile 'com.bartoszlipinski.flippablestackview:library:1.2.1'
}

Developed by

  • Bartosz Lipiński

Credits

Maven Central deployment was performed using an awesome Gradle script by Chris Banes. This made things so much easier.

License

Copyright 2015 Bartosz Lipiński

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].