Skip to content

Commit 1205d9d

Browse files
authored
Update README.md
1 parent db6a164 commit 1205d9d

1 file changed

Lines changed: 109 additions & 2 deletions

File tree

README.md

Lines changed: 109 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,109 @@
1-
# FillProgressLayout
2-
A simple and flexible Fillable Progress Layout written in Kotlin
1+
<div align="center">
2+
<img src="https://github.com/JDevZone/FillProgressLayout/blob/master/logo.png" alt="" width="70px" height="70px">
3+
</div>
4+
5+
<h3 align="center">FillProgressLayout</h3>
6+
7+
8+
--------------
9+
<a href="https://github.com/JDevZone/FillProgressLayout">
10+
<img align="left" src="https://github.com/JDevZone/FillProgressLayout/blob/master/sample.gif" width="100%" height="10%" /></a>
11+
12+
13+
14+
<h4 align="center" >:zap:A simple and flexible FillProgressLayout written in Kotlin:zap:</h4>
15+
16+
17+
18+
[![](https://jitpack.io/v/JDevZone/FillProgressLayout.svg)](https://jitpack.io/#JDevZone/CheckableTextView)
19+
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FillProgressLayout-orange.svg?style=flat)](https://android-arsenal.com/details/1/7770)
20+
[![GitHub license](https://img.shields.io/github/license/JDevZone/FillProgressLayout.svg?style=flat)](https://github.com/JDevZone/FillProgressLayout/blob/master/LICENSE)
21+
22+
23+
---------------------------
24+
### Installation
25+
26+
1. Add it in your root build.gradle at the end of repositories:
27+
```groovy
28+
allprojects {
29+
repositories {
30+
...
31+
maven { url 'https://jitpack.io' }
32+
}
33+
}
34+
```
35+
36+
37+
2. Add the dependency in app gradle
38+
39+
```groovy
40+
dependencies {
41+
implementation 'com.github.JDevZone:FillProgressLayout:{latest_version}'
42+
}
43+
```
44+
### Basic usage
45+
46+
> As `FillProgressLayout` is direct child of `LinearLayout` you can replace LinearLayout with it as follows
47+
48+
```xml
49+
<com.devzone.fillprogresslayout.FillProgressLayout
50+
android:id="@+id/fillL"
51+
android:layout_margin="30dp"
52+
app:fpl_backgroundColor="@color/colorRedTrans"
53+
app:fpl_progressColor="@color/colorGreenTrans"
54+
app:fpl_isRounded="false"
55+
app:fpl_progress="0"
56+
app:fpl_progressDuration="3000"
57+
app:fpl_progressDirection="left_to_right"
58+
app:fpl_shouldRestart="false"
59+
android:layout_width="match_parent"
60+
android:layout_height="wrap_content">
61+
<--childviews-->
62+
</com.devzone.fillprogresslayout.FillProgressLayout>
63+
```
64+
### Alternatively
65+
> You can use `FillProgressLayout` as background for other layouts.
66+
67+
```xml
68+
<RelativeLayout
69+
android:layout_width="match_parent"
70+
android:layout_height="wrap_content">
71+
72+
<--as background for AppCompatTextView-->
73+
<com.devzone.fillprogresslayout.FillProgressLayout
74+
android:layout_alignBottom="@+id/tv"
75+
android:layout_alignParentTop="true"
76+
android:layout_width="match_parent"
77+
android:layout_height="wrap_content"/>
78+
79+
<androidx.appcompat.widget.AppCompatTextView
80+
android:id="@+id/tv"
81+
android:text="@string/app_name"
82+
android:gravity="center"
83+
android:layout_width="match_parent"
84+
android:layout_height="wrap_content"/>
85+
</RelativeLayout>
86+
```
87+
88+
### Customisation
89+
90+
Here are the attributes you can specify through XML or related setters programatically:
91+
92+
* `fpl_backgroundColor` - Set background color.
93+
* `fpl_progressColor` - Set progress color.
94+
* `fpl_isRounded` - Set true if you need rounded corners.
95+
* `fpl_roundedCornerRadius` - Set radius for round corners.
96+
* `fpl_progress` - Set current progress.
97+
* `fpl_progressDuration` - Set fill duration.
98+
* `fpl_shouldRestart` - Set if progress filling should restart from 0.
99+
* `fpl_progressDirection` - Set fill direction. i.e. `left_to_right`,`right_to_left`,`top_to_bottom` or `bottom_to_top`
100+
101+
102+
### 📄 License
103+
104+
Checkable TextView is released under the MIT license.
105+
See [LICENSE](./LICENSE) for details.
106+
107+
108+
109+

0 commit comments

Comments
 (0)