• Stars
    star
    514
  • Rank 86,040 (Top 2 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Good looking curved Android SeekBar

ArcSeekBar

Library was created to make good looking curved SeekBars.

Analytics Analytics

To stay up-to-date with news about library Twitter URL

Usage

Library can be used to make good-looking curved SeekBar:

Gif example

Here are some usage examples:

Img1

<com.marcinmoskala.arcseekbar.ArcSeekBar
    android:layout_width="300dp"
    android:layout_height="150dp" />

Img1

<com.marcinmoskala.arcseekbar.ArcSeekBar
    app:thumb="@drawable/thumb2"
    app:progressColor="@color/colorAccent"
    app:progressBackgroundColor="@color/colorPrimary"
    android:layout_width="200dp"
    android:layout_height="100dp" />

Here is progress drawable thumb2 definition.

Img1

<com.marcinmoskala.arcseekbar.ArcSeekBar
    android:id="@+id/seekArc"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    app:progressBackgroundColor="@color/sliderBack"
    app:progressBackgroundWidth="20dp"
    app:progress="100"
    app:progressWidth="20dp"
    app:roundEdges="true" />

To make gradient, you need to define it in code:

int[] intArray = getResources().getIntArray(R.array.progressGradientColors);
arcSeekBar.setProgressGradient(intArray);

Here you can find array definition.

Customization

ArcSeekBar properties are:

  • thumb - reference to thumb drawable.
  • progress - initial value of progress (0 by default).
  • maxProgress max vale of progress (100 by default).
  • progressColor color of visible progress bar.
  • progressWidth width of visible progress bar.
  • progressBackgroundColor color of bar behind progress.
  • progressBackgroundWidth width of bar behind progress.
  • roundEdges if edges should be rounded or not (true by default).
  • enabled is progress enabled or not (true by default). For disabled there is no thumb displayed.

Each property can be changes pragmatically, and additionally gradient progress or background can be set by:

  • setProgressGradient e.g. arcSeekBar.setProgressGradient(Color.GREEN, Color.BLUE, Color.YELLOW);
  • setProgressBackgroundGradient e.g. arcSeekBar.setProgressBackgroundGradient(Color.GREEN, Color.BLUE, Color.YELLOW);

Installation

Just add following dependency in your module build.gradle:

dependencies {
    compile 'com.github.marcinmoskala:ArcSeekBar:0.31'
}

Also add on your module build.gradle (unless you already have it):

repositories {
    maven { url 'https://jitpack.io' }
}

Other libraries

If you like it, remember to leave the star and check out my other libraries:

  • VideoPlayView - Custom Android view with video player, loader and placeholder image
  • ActivityStarter - Simple Android Library, that provides easy way to start and save state of Activities, Fragments, Services and Receivers with arguments.
  • PreferenceHolder - Library for simple SharedPreference management in Kotlin
  • KotlinAndroidViewBindings - Bindings for properties with simple Kotlin types (Boolean, String) to layout traits (visibility, text).

License

Copyright 2017 Marcin Moskaล‚a

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.

More Repositories

1

KtAcademyPortal

Multiplatform Kotlin application of KotlinAcademy
CSS
443
star
2

ActivityStarter

Simple Android Library, that provides easy way to start the Activities with arguments.
Kotlin
428
star
3

KotlinDiscreteMathToolkit

Set of extensions for Kotlin that provides Discrete math functionalities
Kotlin
183
star
4

PreferenceHolder

SharedPreference usage made fun in Kotlin
Kotlin
155
star
5

KotlinAndroidViewBindings

Bindings for properties with simple Kotlin types (Boolean, String) to layout traits (visibility, text).
Kotlin
126
star
6

kotlin-coroutines-recipes

Kotlin
113
star
7

VideoPlayView

Custom Android view with video player, loader and placeholder image
Kotlin
94
star
8

coroutines_sources

Kotlin
80
star
9

KotlinPreferences

Android Library to make SharedPreferences usage easier.
Kotlin
50
star
10

MarvelGallery

Example of Kotlin Android application
Kotlin
47
star
11

KotlinMultiplatformExample

Kotlin
45
star
12

kotlin-coroutines-workshop

Kotlin
38
star
13

MVTest

Code created as an examples for presentation about MVC vs MVP vs MVVM.
Kotlin
34
star
14

kotlin-exercises

Kotlin
29
star
15

kotlin_essentials_sources

Kotlin
20
star
16

SimpleKotlinMvpBoilerplate

Presentation of simple Kotlin Android MVP
Kotlin
19
star
17

effective-kotlin-book

Some open-sourced chapters of the Effective Kotlin
16
star
18

effective-kotlin-tests

JavaScript
13
star
19

functional_kotlin_sources

Kotlin
10
star
20

advanced-kotlin-workshop-tasks

Kotlin
10
star
21

caffeine-suspending

Kotlin
9
star
22

effective-kotlin-workshop

Kotlin
7
star
23

kotlin-android-workshop

Project with exercises for Kotlin Android workshop
Kotlin
7
star
24

measured-wrapper-ksp

Kotlin
6
star
25

WorkoutMPP

Kotlin
6
star
26

testing-viewmodel

Kotlin
6
star
27

Website

CSS
6
star
28

coroutines-benchmarks

Kotlin
6
star
29

AnkiMarkdown

Kotlin
5
star
30

coroutines-short-workshop-tasks

Kotlin
5
star
31

advanced_kotlin_sources

Kotlin
5
star
32

advent-2021

Kotlin
4
star
33

pacmanFunctional

Kotlin
3
star
34

generate-builder

Kotlin
3
star
35

pong

HTML
3
star
36

FindMyPhone

Kotlin
3
star
37

UserManagementApp

An example project using Jetpack Compose, Kotlin Coroutines, MVVM, proper unit testing
Kotlin
3
star
38

Minions

This is sink of different ideas for Kotlin usage to improve Android Development
Kotlin
3
star
39

StackTester

Simple App for testing different Activity Stack flags
Kotlin
3
star
40

effectivekotlin_sources

Kotlin
2
star
41

generateinterface-ksp

Kotlin
2
star
42

kotlin_programmer_dictionary

2
star
43

DependencyInjection-KSP

Simple example showing KSP processing with multiple rounds of execution.
Kotlin
2
star
44

marcinmoskala.github.io

CSS
2
star
45

testing-android-exercise

Kotlin
2
star
46

coroutines-android-testing-example

Kotlin
2
star
47

sudoku-generator-exercise

Kotlin
2
star
48

snake

Snake game written in Python
Python
1
star
49

measured-wrapper-ap

Kotlin
1
star
50

JSCoroutinesRecipes

Set of recipes for useful Kotlin/JS coroutines functions
1
star
51

effective-kotlin-website

HTML
1
star
52

kotlin-workshop

Kotlin
1
star
53

MorningWorkout

Kotlin
1
star
54

workshop-android-16-18.4.19

Kotlin
1
star
55

cde-droidcon-it

This is project made during Maciej Gรณrski workshops about Continuous Delivery
Java
1
star
56

kotlin_essentials_book_pl

Kotlin
1
star
57

ktor-playground

Kotlin
1
star
58

NetworkClientTests

Kotlin
1
star
59

DeckMarkdown

Kotlin
1
star
60

ksp-template

Kotlin
1
star
61

next-starter-jamstack

JavaScript
1
star