Skip to content

Commit

Permalink
Merge pull request #16 from agrawalsuneet/dev
Browse files Browse the repository at this point in the history
Merge Dev to master for 0.7 release
  • Loading branch information
agrawalsuneet authored Sep 20, 2018
2 parents 8ddc4f4 + 209347b commit c6ebb8a
Show file tree
Hide file tree
Showing 11 changed files with 344 additions and 6 deletions.
Binary file removed .idea/caches/build_file_checksums.ser
Binary file not shown.
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ latest version : [ ![Download](https://api.bintray.com/packages/agrawalsuneet/an
![ringandcircleloader](https://user-images.githubusercontent.com/12999622/45266388-59b2ad00-b452-11e8-9e51-28cdb5c538b3.gif)


### ArcProgressLoader
![arcprogressloader](https://user-images.githubusercontent.com/12999622/45809206-3fe05800-bce5-11e8-90ef-f68e46de64cc.gif)


Check all other loaders [here](https://agrawalsuneet.github.io/agrawalsuneet/opensourcecontribution/)

## How To use
include below dependency in build.gradle of application and compile it
```
implementation 'com.agrawalsuneet.androidlibs:loaderspack:0.6'
implementation 'com.agrawalsuneet.androidlibs:loaderspack:0.7'
```

### ClockLoader
Expand Down Expand Up @@ -381,6 +385,49 @@ implementation 'com.agrawalsuneet.androidlibs:loaderspack:0.6'
```



### ArcProgressLoader
```
<array name="colors_rgb">
<item>@color/red</item>
<item>@color/amber</item>
<item>@color/green</item>
<item>@color/grey</item>
</array>
```

##### Through XML
```
<com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:arcprogress_arcColorsArray="@array/colors_rgb"
app:arcprogress_arcRadius="60dp"
app:arcprogress_arcWidth="8dp"
app:arcprogress_incrementalAngle="7.0"
app:arcprogress_maxArcAngle="220.0" />
```
##### Through Code
* Kotlin
```
val arcProgressLoader = ArcProgressLoader(this,
120, 20,
10.0f, 180.0f,
resources.getIntArray(R.array.colors_rgb))
containerLayout.addView(arcProgressLoader)
```

* Java
```
ArcProgressLoader arcProgressLoader = new ArcProgressLoader(this,
120, 20,
10.0f, 180.0f,
getResources().getIntArray(R.array.colors_rgb));
container.addView(arcProgressLoader);
```

Please take a 2 mins survey to make this library better [here](https://goo.gl/forms/v0SZS0oI9rvInzdB3).
It won't take more than 2 mins I promise :) or feel free to drop an email at [email protected] if face any issue or require any additional functionality in it.
```
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ dependencies {
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation project(':loaderspack')
//implementation 'com.agrawalsuneet.androidlibs:loaderspack:0.6'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
16 changes: 14 additions & 2 deletions app/src/main/java/com/agrawalsuneet/loaders/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main_ringandcircle)
setContentView(R.layout.main_arcprogress)

supportActionBar?.setTitle("RingAndCircleLoader")
supportActionBar?.setTitle("ArcProgressLoader")

containerLayout = findViewById(R.id.container)

Expand All @@ -29,6 +29,18 @@ class MainActivity : AppCompatActivity() {
//initCurvesLoader()

//initRingAndCircleLoader()

//initArcProgressLoader()
}

private fun initArcProgressLoader() {
val arcProgressLoader = ArcProgressLoader(this,
120, 20,
10.0f, 180.0f,
resources.getIntArray(R.array.colors_rgb))

containerLayout.addView(arcProgressLoader)

}

private fun initRingAndCircleLoader() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.view.animation.LinearInterpolator;
import android.widget.LinearLayout;

import com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader;
import com.agrawalsuneet.loaderspack.loaders.CircularSticksLoader;
import com.agrawalsuneet.loaderspack.loaders.ClockLoader;
import com.agrawalsuneet.loaderspack.loaders.CurvesLoader;
Expand Down Expand Up @@ -112,6 +113,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
ringAndCircleLoader.setAnimDuration(1000);

container.addView(ringAndCircleLoader);


ArcProgressLoader arcProgressLoader = new ArcProgressLoader(this,
120, 20,
10.0f, 180.0f,
getResources().getIntArray(R.array.colors_rgb));

container.addView(arcProgressLoader);
}


Expand Down
71 changes: 71 additions & 0 deletions app/src/main/res/layout/main_arcprogress.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:orientation="horizontal">

<com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:arcprogress_arcColorsArray="@array/colors_red"
app:arcprogress_arcRadius="30dp"
app:arcprogress_arcWidth="5dp"
app:arcprogress_incrementalAngle="8.0"
app:arcprogress_maxArcAngle="200.0" />


<com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:arcprogress_arcColorsArray="@array/colors_amber"
app:arcprogress_arcRadius="30dp"
app:arcprogress_arcWidth="5dp"
app:arcprogress_incrementalAngle="8.0"
app:arcprogress_maxArcAngle="200.0" />

<com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:arcprogress_arcColorsArray="@array/colors_green"
app:arcprogress_arcRadius="30dp"
app:arcprogress_arcWidth="5dp"
app:arcprogress_incrementalAngle="8.0"
app:arcprogress_maxArcAngle="200.0" />

</LinearLayout>


<com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:arcprogress_arcColorsArray="@array/colors_rgb"
app:arcprogress_arcRadius="60dp"
app:arcprogress_arcWidth="8dp"
app:arcprogress_incrementalAngle="7.0"
app:arcprogress_maxArcAngle="220.0" />

<com.agrawalsuneet.loaderspack.loaders.ArcProgressLoader
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:arcprogress_arcColorsArray="@array/colors_blue"
app:arcprogress_arcRadius="40dp"
app:arcprogress_arcWidth="6dp"
app:arcprogress_incrementalAngle="6.0"
app:arcprogress_maxArcAngle="150.0" />


</LinearLayout>
25 changes: 25 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,29 @@
<color name="blue_delfault">#BBDEFB</color>

<color name="grey_default">#55A9A9A9</color>

<array name="colors_red">
<item>@color/red</item>
</array>

<array name="colors_amber">
<item>@color/amber</item>
</array>

<array name="colors_green">
<item>@color/green</item>
</array>

<array name="colors_rgb">
<item>@color/red</item>
<item>@color/amber</item>
<item>@color/green</item>
<item>@color/grey</item>
</array>

<array name="colors_blue">
<item>@color/blue_selected</item>
<item>@color/blue_delfault</item>
</array>

</resources>
6 changes: 3 additions & 3 deletions loaderspack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
ext {
PUBLISH_GROUP_ID = 'com.agrawalsuneet.androidlibs'
PUBLISH_ARTIFACT_ID = 'loaderspack'
PUBLISH_VERSION = '0.6'
PUBLISH_VERSION = '0.7'
}

android {
Expand All @@ -19,8 +19,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 6
versionName "0.6"
versionCode 7
versionName "0.7"
}

buildTypes {
Expand Down
Loading

0 comments on commit c6ebb8a

Please sign in to comment.