GithubHelp home page GithubHelp logo

chirag2310 / stepbarview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imanneo/stepbarview

0.0 0.0 0.0 7 MB

Step Bar View (make your own customized StepBar)

License: Apache License 2.0

Kotlin 96.12% Java 3.88%

stepbarview's Introduction

License APK Android Arsenal

Step Bar View

You can use this library to have a step bar

can be used in pages that you have some steps to reach

you can download the Demo apk file (you can first adjust your StepBar in the demoApp and then implement it in code)

1 - Getting Started

By this instructions you can add this library and i will explain how use it.

Add Maven to your root build.gradle

First of all Add it in your root build.gradle at the end of repositories:

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

Add Dependency

Add the dependency to your app build.gradle file

dependencies
{
    implementation  'com.github.imaNNeoFighT:StepBarView:1.0.3.1'
    // Or in older versions : 
    // compile'com.github.imaNNeoFighT:StepBarView:1.0.3.1'
}

And then sync your gradle and take a tea.

2 - About The View

You can simply use this View like other Views in android, just add StepBarView in your java code or xml.

View Properties

you can customize StepBarView, all of this attributes can change via xml or code (runtime)

Attribute Type Kotlin Description
sbv_max_count Integer maxCount your steps count (max to reach), default value is 8
sbv_steps_reached_colors Color stepsReachedColor steps reached color (steps circle reached color)
sbv_steps_unreached_colors Color stepsUnreachedColor steps unReached color (steps circle default color)
sbv_steps_line_reached_colors Color stepsLineReachedColor steps line reached color
sbv_steps_line_unreached_colors Color stepsLineUnreachedColor steps line uReached color
sbv_steps_line_height Dimensions stepsLineHeight steps line height, default value is 4dp
sbv_steps_size Dimensions stepsSize steps circle size, default value is 16dp
sbv_steps_text_color Color stepsTextColor steps text color (number that drawn on steps circle)
sbv_steps_text_size Dimensions stepsTextSize steps text size, default is 14sp
sbv_steps_line_margin_left Dimensions stepsLineMarginLeft steps line margin left (gap in left of lines), default value is 2dp
sbv_steps_line_margin_right Dimensions stepsLineMarginRight steps line margin right (gap in right of lines), default value is 2dp
sbv_allow_touch_step_to Integer allowTouchStepTo allow touch to reach step (for example if you set 3 you can touch to reach step to 3 and not more), default value is 8
sbv_show_step_index Integer showStepIndex you can set this property false to prevent showing indexes (then just a solid circle will be drawn), default value is true
sbv_steps_stroke_size Dimensions stepsStrokeSize Stroke Size of steps , default value is 2dp
sbv_steps_stroke_reached_color Color stepsStrokeReachedColor Stroke color of reached steps
sbv_steps_stroke_unreached_color Color stepsStrokeUnReachedColor Stroke color of unReached steps
sbv_steps_stroke_current_color Color stepsStrokeCurrentColor Stroke color of current steps
sbv_show_step_stroke Boolean showStepStroke flag to showing the Stroke or not!, default is false
sbv_is_rtl Boolean isRtl flag to showing steps in RTL (Right to left), default is false

License

Copyright 2018 Iman Khoshabi

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.

stepbarview's People

Contributors

imanneo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.