An open API service indexing awesome lists of open source software.

https://github.com/3llomi/circularstatusview

A Simple View that draws portions of a Circle depending on a number , just like what WhatsApp has done for Status
https://github.com/3llomi/circularstatusview

chat circular status story whatsapp

Last synced: 6 months ago
JSON representation

A Simple View that draws portions of a Circle depending on a number , just like what WhatsApp has done for Status

Awesome Lists containing this project

README

          

# CircularStatusView
A Simple View that draws portions of a Circle depending on a number , just like what WhatsApp has done for Status

## Demo




## Install
Add this to your project build.gradle
```gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```
Add this to your module build.gradle

```gradle
dependencies {
implementation 'com.github.3llomi:CircularStatusView:V1.0.3'
}
```

## Usage
NOTE:you can replace `CircleImageView` with any view

### XML

```xml


```

### Java

### Basic Usage
```java

CircularStatusView circularStatusView = findViewById(R.id.record_view);
circularStatusView.setPortionsCount(statusList.size());
circularStatusView.setPortionsColor(getResources().getColor(R.color.colorAccent););

```

### Advanced Usage

```java
if (userStatus.areAllSeen()) {
//set all portions color
circularStatusView.setPortionsColor(seenColor);
} else {
for (int i = 0; i < statusList.size(); i++) {
Status status = statusList.get(i);
int color = status.isSeen() ? seenColor : notSeenColor;
//set specific color for every portion
circularStatusView.setPortionColorForIndex(i, color);
}

}
```

for more info please check the sample app

### Customization

```java
circularStatusView.setPortionSpacing(5);//set the spacing between portions
circularStatusView.setPortionWidth(10);//set portion width
circularStatusView.setCustomPaint(myPaint); //create your custom paint for portions
```

```
Copyright 2018 AbdulAlim Rajjoub

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

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

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.
```