|
1 | 1 | # ScaleSelector |
2 | 2 |
|
| 3 | +A simple library to make a selection RecyclerView using just a few lines of XML code. |
3 | 4 |
|
| 5 | + |
| 6 | + |
| 7 | +Gradle Dependency |
| 8 | + |
| 9 | + implementation 'com.github.Priyansh-Kedia:ScaleSelector:0.1.2' |
| 10 | + |
| 11 | +Add |
| 12 | + |
| 13 | + allprojects { |
| 14 | + repositories { |
| 15 | + ... |
| 16 | + maven { url 'https://jitpack.io' } |
| 17 | + } |
| 18 | + } |
| 19 | + |
| 20 | +in the root build.gradle at the end of repositories |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +The indicator arrow in the bottom can be removed by setting showArrowPointer = false |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +Background color, text color and pointer line colors are also customisable |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +Allowed Attributes |
| 44 | + |
| 45 | + <attr name="stepValue" format="integer" /> |
| 46 | + <attr name="defaultTextColor" format="color" /> |
| 47 | + <attr name="selectedTextColor" format="color" /> |
| 48 | + <attr name="selectedPointerColor" format="color" /> |
| 49 | + <attr name="minValue" format="integer" /> |
| 50 | + <attr name="maxValue" format="integer" /> |
| 51 | + <attr name="defaultPointerColor" format="color" /> |
| 52 | + <attr name="backgroundColor" format="color" /> |
| 53 | + <attr name="showArrowPointer" format="boolean" /> |
| 54 | + |
| 55 | + |
| 56 | +Simple XML use |
| 57 | + |
| 58 | + |
| 59 | + <com.kedia.scaleselector.ScaleSelector |
| 60 | + android:layout_width="wrap_content" |
| 61 | + android:layout_height="wrap_content" |
| 62 | + android:id="@+id/testRecycler" |
| 63 | + app:showArrowPointer="true" |
| 64 | + app:minValue="100" |
| 65 | + app:maxValue="200" |
| 66 | + app:defaultPointerColor="#6F86D6" |
| 67 | + app:stepValue="10" |
| 68 | + app:selectedTextColor="#fff" |
| 69 | + app:defaultTextColor="#fff" /> |
0 commit comments