Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bloderxd/deck
https://github.com/bloderxd/deck
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bloderxd/deck
- Owner: bloderxd
- License: mit
- Created: 2017-12-02T19:21:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-24T11:20:02.000Z (about 6 years ago)
- Last Synced: 2024-09-01T05:37:41.373Z (5 months ago)
- Language: Kotlin
- Size: 147 KB
- Stars: 52
- Watchers: 5
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Android-Awesome-Resources - Deck
README
# Deck
![alt_tag](https://bloximages.chicago2.vip.townnews.com/journaltimes.com/content/tncms/assets/v3/editorial/4/48/4484cfa4-e685-5fb8-9b05-3d3df399ac06/57838be8937b3.image.jpg)
# What is it?
Deck is a library that permits you to apply a beautiful animation in your view pager, and this animations looks like a deck... yeah, I'm not good with names.
![alt_tag](https://media.giphy.com/media/l4EpiKjC1H2sQCVva/giphy.gif)
# How does it works?
First of all you need to declare it in your layout xml file
```xml
```
Then you can set the padding(Optional)```kotlin
private val deckPager by lazy { activity.findViewById(R.id.deck_pager) }
```Set padding based on percentage of the screen width
```kotlin
deckPager.setPercentagePadding(activity, 8)
```or set padding based on dp value
```kotlin
deckPager.setDpPadding(activity, 16)
```##### Remember you can set all other view pager properties with deck
# Deck properties
These are all properties supported in deck's xml
```xml
```
# Import
Add JitPack maven repository reference in your project
```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```then add deck reference in your gradle dependencies
##### Gradle
```groovy
dependencies {
compile 'com.github.bloderxd:deck:0.1'
}
```##### Gradle v3.0+
```groovy
dependencies {
implementation 'com.github.bloderxd:deck:0.1'
}
```# License
```
MIT LicenseCopyright (c) 2017 Bloder
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```