GithubHelp home page GithubHelp logo

diousk / viewpagify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from igorescodro/viewpagify

0.0 2.0 0.0 4.88 MB

ViewPager similar to Spotify Player

License: Apache License 2.0

Java 100.00%

viewpagify's Introduction

ViewPagify

ViewPagify is a ViewPager similar to the one used in Spotify Player. It creates a cover flow effect where the selected album appears bigger in the middle of the screen, showing a sneak peak of the next and previous albums. It is a great view to be used in a Music Player or Album Store application. It also contains by default the same animation used in Spotify, where the next and previous are smaller than the focused one, and they change their size during the scroll.

Screenshot

pagify

Quick Setup

Download the library module and import into your project.

Usage

Once imported, add the ViewPagify in yout layout.

<com.escodro.viewpagify.ViewPagify
        android:id="@+id/viewPagify"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
  • Despite being a ViewPager with some tricks, ViewPagify uses the good ol' FragmentStatePagerAdapter

Important notes

We strongly recommend to use a image loading and caching library or mechanism, like Picasso or Glide to load the images in the ViewPagify. These libraries handle all the recycling, memory and caching process. For more information about handling images, visit Displaying Bitmaps Efficiently

Attributes

Currently, it is possible to set two attributes in the XML file. They are:

  • horizontalPadding - Sets the padding between the fragments in the ViewPagerfy. Greater is the padding, smaller is the fragment and the distance between the cover arts.
  • changeItemByClick - Enable/Disable click to next/previous feature. If true, when you click in a sneak peak, the ViewPagify you change to the clicked item.

###Feeling confused? Download the demo module and give a try! It contains the basic UI implementation of a music player.

##License

Copyright 2016 Igor Escodro

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.

viewpagify's People

Contributors

igorescodro avatar

Watchers

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