|
1 |
| -# AvatarTinderView |
| 1 | +# Avatar Tinder View |
| 2 | +Avatar Tinder View is a library that allows you to create a view for change avatar like app tinder. |
| 3 | + |
| 4 | + |
| 5 | +  |
| 6 | +--- |
| 7 | + |
| 8 | +# Table of Contents |
| 9 | + |
| 10 | +1. [Gradle Dependency](https://github.com/ATHBK/AvatarTinderView#gradle-dependency) |
| 11 | + 1. [Repository](https://github.com/ATHBK/AvatarTinderView#repository) |
| 12 | + 2. [Dependency](https://github.com/ATHBK/AvatarTinderView#dependency) |
| 13 | +2. [Basic Usage](https://github.com/ATHBK/AvatarTinderView#basic-usage) |
| 14 | + 1. [IndicatorView XML](https://github.com/ATHBK/AvatarTinderView#indicatorview-xml) |
| 15 | + 2. [Attributes](https://github.com/ATHBK/AvatarTinderView#indicator-attr ) |
| 16 | +3. [Init Java](https://github.com/ATHBK/AvatarTinderView#init-from-java) |
| 17 | +4. [License](https://github.com/ATHBK/AvatarTinderView#license) |
| 18 | + |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +# Gradle Dependency |
| 23 | + |
| 24 | + |
| 25 | +#### Repository |
| 26 | + |
| 27 | +Add this in your root `build.gradle` file (**not** your module `build.gradle` file): |
| 28 | + |
| 29 | +```gradle |
| 30 | +allprojects { |
| 31 | + repositories { |
| 32 | + ... |
| 33 | + maven { url 'https://jitpack.io' } |
| 34 | + } |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +#### Dependency |
| 39 | + |
| 40 | +Add this to your module's `build.gradle` file: |
| 41 | + |
| 42 | +```gradle |
| 43 | +dependencies { |
| 44 | + compile 'com.github.ATHBK:IndicatorView:v1.1.4' |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +# Basic Usage |
| 51 | + |
| 52 | +#### XML |
| 53 | + |
| 54 | +To use this AvatarTinderView in your layout simply copy and paste the xml below. This provides the default AvatarTinderView. |
| 55 | + |
| 56 | +```xml |
| 57 | +<com.athbk.avatarview.TinderRecyclerView |
| 58 | + android:layout_width="match_parent" |
| 59 | + android:layout_height="match_parent" |
| 60 | + android:id="@+id/recyclerView"> |
| 61 | +``` |
| 62 | +#### AvatarTinderView Attr |
| 63 | + |
| 64 | +```xml |
| 65 | + .... |
| 66 | + app:spanCount="2" |
| 67 | + app:aspectRatio="1f" |
| 68 | + app:numberColoum="3" |
| 69 | +``` |
| 70 | +--- |
| 71 | + |
| 72 | +# Init from Java |
| 73 | + |
| 74 | +#### Java |
| 75 | + |
| 76 | +How to use in . |
| 77 | +1. Class Adapter must extends TinderRVAdapter |
| 78 | +2. Declare TinderRecyclerView in framgent or activiy: |
| 79 | + |
| 80 | +```java |
| 81 | + AvatarAdapter adapter = new AvatarAdapter(this, listString); |
| 82 | + recyclerView.initRecyclerView(this, adapter); |
| 83 | +``` |
| 84 | + |
| 85 | +--- |
| 86 | +# License |
| 87 | + |
| 88 | + Copyright 2017 ATHBK |
| 89 | + |
| 90 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 91 | + you may not use this file except in compliance with the License. |
| 92 | + You may obtain a copy of the License at |
| 93 | + |
| 94 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 95 | + |
| 96 | + Unless required by applicable law or agreed to in writing, software |
| 97 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 98 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 99 | + See the License for the specific language governing permissions and |
| 100 | + limitations under the License. |
0 commit comments