Skip to content

Commit

Permalink
Release 1.1.0 (#7)
Browse files Browse the repository at this point in the history
* convert to Kotlin

* added gradle.properties file

* updated tag line

* cleanup code

* added publish scripts

* updated readme
added banner and logo

* updated sample app icon

* added change log file

* added docs

* updated version to v1.1.0-7
  • Loading branch information
nisrulz authored Feb 16, 2022
1 parent 7d2580f commit 07ea9a5
Show file tree
Hide file tree
Showing 41 changed files with 737 additions and 551 deletions.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- * Please fill out the blanks below describing your issue * -->

**Do you want to request a *feature* or report a *bug*?**

**What is the current behavior?**

**If the current behavior is a bug, please provide the steps to reproduce.**
<!-- If you can, provide a link to a public repository which contains the files necessary to reproduce this. -->


**Any logs, error output, bugreport etc?**
<!-- * If it’s long, please paste to https://ghostbin.com/ and insert the link here.) * -->

**What is the expected behavior?**

**Any other comments?**


**What versions of software are you using?**
+ **Device Information:**

+ **Android Version:**

+ **Configuration Information:**

+ **Misc:**

<!-- * More related information if you have can provide * -->
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- * Please fill out the blanks below describing your pull request * -->

**What does this implement/fix? Explain your changes**

**Does this close any currently open issues?**

**Any relevant logs, error output, bugreport etc?**
<!-- * If it’s long, please paste to https://ghostbin.com/ and insert the link here.) * -->

**Any other comments?**

+ **Where has this been tested?**

+ **Device Information:**

+ **Android Version:**

+ **Target Platform:**

+ **SDK Version:**

+ **Configuration Information:**

+ **Misc:**

<!-- * More related information if you have can provide * -->
11 changes: 11 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## 2.0.0 [17 Feb 2022]

- ✅ Switched to Kotlin
- 🧹 Updated project

## 1.0.3 [22 Aug 2016]

- ✅ Initial Release

File renamed without changes.
118 changes: 32 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,37 @@
# StackedHorizontalProgressBar


### Specs
[![Maven Central](https://img.shields.io/maven-central/v/com.github.nisrulz/stackedhorizontalprogressbar.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.nisrulz%22%20AND%20a:%22stackedhorizontalprogressbar%22)

### Featured in
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-StackedHorizontalProgressBar-green.svg?style=true)](https://android-arsenal.com/details/1/3554) [![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23101-blue.svg)](https://www.androiddevdigest.com/digest-101/)

### Show some :heart:
[![GitHub stars](https://img.shields.io/github/stars/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Star)](https://github.com/nisrulz/stackedhorizontalprogressbar) [![GitHub forks](https://img.shields.io/github/forks/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Fork)](https://github.com/nisrulz/stackedhorizontalprogressbar/fork) [![GitHub watchers](https://img.shields.io/github/watchers/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Watch)](https://github.com/nisrulz/stackedhorizontalprogressbar) [![GitHub followers](https://img.shields.io/github/followers/nisrulz.svg?style=social&label=Follow)](https://github.com/nisrulz)
[![Twitter Follow](https://img.shields.io/twitter/follow/nisrulz.svg?style=social)](https://twitter.com/nisrulz)


Android library with ability to show two progress indicators in one horizontal progress bar.

![Walkthrough](img/walkthrough-cropped.gif)

# Including in your project
StackedHorizontalProgressBar is available in the Jcenter, so getting it as simple as adding it as a dependency
```gradle
compile 'com.github.nisrulz:stackedhorizontalprogressbar:{latest version}'
```
where `{latest version}` corresponds to published version in [![Maven Central](https://img.shields.io/maven-central/v/com.github.nisrulz/stackedhorizontalprogressbar.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.nisrulz%22%20AND%20a:%22stackedhorizontalprogressbar%22)

### Usage

1. Put the StackedHorizontalProgressBar element in your layout
```xml

<github.nisrulz.stackedhorizontalprogressbar.StackedHorizontalProgressBar
android:id="@+id/stackedhorizontalprogressbar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:progressDrawable="@drawable/stacked_horizontal_progress"/>

```
2. Reference in code as below
```java
int primary_pts = 3;
int secondary_pts = 6;
int max = 10;

StackedHorizontalProgressBar stackedHorizontalProgressBar;
stackedHorizontalProgressBar = (StackedHorizontalProgressBar) findViewById(R.id.stackedhorizontalprogressbar);
stackedHorizontalProgressBar.setMax(max);
stackedHorizontalProgressBar.setProgress(primary_pts);
stackedHorizontalProgressBar.setSecondaryProgress(secondary_pts);

```

3. If you wish to edit the colors, just edit the `colors.xml` file under the `res` > `values`
folder and add the below colors (modify the values as per your requirement)

```xml
<!-- Stacked Horizontal Progressbar Colors -->
<color name="shpbr_primary_progress">#3F51B5</color>
<color name="shpbr_secondary_progress">#FF4081</color>
```

### Pull Requests
I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:
1. Match coding style (braces, spacing, etc.) This is best achieved using `CMD`+`Option`+`L` (Reformat code) on Mac (not sure for Windows) with Android Studio defaults.
2. If its a feature, bugfix, or anything please only change code to what you specify.
3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.
5. Check for existing [issues](https://github.com/nisrulz/stackedhorizontalprogressbar/issues) first, before filing an issue.
6. Have fun!

### Created & Maintained By
[Nishant Srivastava](https://github.com/nisrulz) ([@nisrulz](https://www.twitter.com/nisrulz))


License
=======
![Image](img/github_banner.png)

<center>

[![Maven Central](https://img.shields.io/maven-central/v/com.github.nisrulz/stackedhorizontalprogressbar)](https://search.maven.org/artifact/com.github.nisrulz/stackedhorizontalprogressbar) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-stackedhorizontalprogressbar-green.svg?style=true)](https://android-arsenal.com/details/1/3554) [![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23101-blue.svg)](https://www.androiddevdigest.com/digest-101/) [![GitHub stars](https://img.shields.io/github/stars/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Star)](https://github.com/nisrulz/stackedhorizontalprogressbar) [![GitHub forks](https://img.shields.io/github/forks/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Fork)](https://github.com/nisrulz/stackedhorizontalprogressbar/fork) [![GitHub watchers](https://img.shields.io/github/watchers/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Watch)](https://github.com/nisrulz/stackedhorizontalprogressbar)

[![GitHub followers](https://img.shields.io/github/followers/nisrulz.svg?style=social&label=Follow)](https://github.com/nisrulz/stackedhorizontalprogressbar) [![Twitter Follow](https://img.shields.io/twitter/follow/nisrulz.svg?style=social)](https://twitter.com/nisrulz)

Stacked dual progress indicator progress-bar for Android.

</center>

- 📕 Usage Docs (at) https://nisrulz.com/stackedhorizontalprogressbar/

- [Changelog](Changelog.md)
- Sample App

![Walkthrough](img/walkthrough-cropped.gif)

- Pull Requests

Here are some basic rules to follow to ensure timely addition of your request:

- If its a feature, bugfix, or anything please only change code to what you specify.
- Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :smile:
- Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.
- Check for existing [issues](https://github.com/nisrulz/stackedhorizontalprogressbar/issues) first, before filing an issue.

- License

Copyright 2016 Nishant Srivastava

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0, [click here for the full license](/LICENSE).

http://www.apache.org/licenses/LICENSE-2.0
- Logo

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Credit:<a href="https://www.flaticon.com/free-icons/progress-bar" title="progress bar icons">Progress bar icons created by Freepik - Flaticon</a>
62 changes: 29 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,39 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

// Required plugins added to classpath to facilitate pushing to Jcenter/Bintray
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

allprojects {
repositories {
jcenter()
}
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"

classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.buildDir
}

ext {
//Other
supportLibVersion = '25.0.0'

// Lib info
libVersionCode = 4
libVersionName = '1.0.3'
libPomUrl = 'https://github.com/nisrulz/stackedhorizontalprogressbar'
libGithubRepo = 'nisrulz/stackedhorizontalprogressbar'


libModuleName = 'stackedhorizontalprogressbar'
libModuleDesc = 'Android library to implement stacked horizontal progressbar'
libBintrayName = 'com.github.nisrulz:stackedhorizontalprogressbar'
}
// Deps
appCompat = "1.4.1"
annotation = "1.3.0"
lifecycle = "2.4.1"

//Other
targetSdkVersion = 32
minSdkVersion = 14
compileSdkVersion = targetSdkVersion

// Library Info
libVersionCode = 7
libVersionName = '1.1.0'
}
52 changes: 52 additions & 0 deletions docs/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
![Banner](https://github.com/nisrulz/stackedhorizontalprogressbar/raw/master/img/github_banner.png)

[![Maven Central](https://img.shields.io/maven-central/v/com.github.nisrulz/stackedhorizontalprogressbar)](https://search.maven.org/artifact/com.github.nisrulz/stackedhorizontalprogressbar) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-stackedhorizontalprogressbar-green.svg?style=true)](https://android-arsenal.com/details/1/3554) [![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23101-blue.svg)](https://www.androiddevdigest.com/digest-101/) [![GitHub stars](https://img.shields.io/github/stars/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Star)](https://github.com/nisrulz/stackedhorizontalprogressbar) [![GitHub forks](https://img.shields.io/github/forks/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Fork)](https://github.com/nisrulz/stackedhorizontalprogressbar/fork) [![GitHub watchers](https://img.shields.io/github/watchers/nisrulz/stackedhorizontalprogressbar.svg?style=social&label=Watch)](https://github.com/nisrulz/stackedhorizontalprogressbar)

## Including in your project

Stacked Horizontal ProgressBar is available in the MavenCentral, so getting it as simple as adding it as a dependency
inside your build.gradle file

```gradle
implementation "com.github.nisrulz:stackedhorizontalprogressbar:$version"
```

where `$version` corresponds to latest version published in [![Maven Central](https://img.shields.io/maven-central/v/com.github.nisrulz/stackedhorizontalprogressbar)](https://search.maven.org/artifact/com.github.nisrulz/stackedhorizontalprogressbar)

## Usage

Put the StackedHorizontalProgressBar element in your layout

```xml
<com.github.nisrulz.stackedhorizontalprogressbar.StackedHorizontalProgressBar
android:id="@+id/stackedhorizontalprogressbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
style="?android:attr/progressBarStyleHorizontal"
android:progressDrawable="@drawable/stacked_horizontal_progress"/>

```

Reference in code as below

```kt
val primary_pts = 3
val secondary_pts = 6
val max = 10

val stackedHorizontalProgressBar = findViewById<StackedHorizontalProgressBar>(R.id.stackedhorizontalprogressbar)
stackedHorizontalProgressBar.let {
it.max = max
it.progress = primary_pts
it.secondaryProgress = secondary_pts
}
```

If you wish to edit the colors, just edit the `colors.xml` file under the `res` > `values` folder and add the below colors (modify the values as per your requirement)

```xml
<!-- Stacked Horizontal Progressbar Colors -->
<color name="shpbr_primary_progress">#3F51B5</color>
<color name="shpbr_secondary_progress">#FF4081</color>
```
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-modernist
31 changes: 31 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Mon May 24 02:20:09 CEST 2021
android.useAndroidX=true
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

##### Publishing
# RELEASE_SIGNING_ENABLED=false
VERSION_NAME=1.1.0

POM_NAME=StackedHorizontalProgressbar
POM_ARTIFACT_ID=stackedhorizontalprogressbar
POM_DESCRIPTION=Stacked dual progress indicator progress-bar for Android.
POM_INCEPTION_YEAR=2016
POM_URL=https://github.com/nisrulz/stackedhorizontalprogressbar/
POM_SCM_URL=https://github.com/nisrulz/stackedhorizontalprogressbar/
POM_SCM_CONNECTION=scm:git:git://github.com/nisrulz/stackedhorizontalprogressbar.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/nisrulz/stackedhorizontalprogressbar.git
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Sep 14 00:22:33 IST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
Loading

0 comments on commit 07ea9a5

Please sign in to comment.