项目作者: esligh

项目描述 :
circle seekbar or progress with gradient or single color
高级语言: Java
项目地址: git://github.com/esligh/ArcDialSeekBar.git
创建时间: 2017-07-02T10:00:07Z
项目社区:https://github.com/esligh/ArcDialSeekBar

开源协议:

下载


ArcDialSeekBar

image

Android seekbar with arc shape.

Instead of the normal Android seekbar, you can have a seekbar with the shape of arc or circle. All basic parameters are configurable.
Also it colud be used to create a progress bar.

The only file you need is ArcDialSeekBar.java

quick start

1.Add root build.gradle

  1. repositories {
  2. // ...
  3. maven { url "https://jitpack.io" }
  4. }

2.Add build.gradle

  1. dependencies {
  2. compile 'com.github.esligh:ArcDialSeekBar:1.0.0'
  3. }

3.Added to the XML

  1. <com.wiget.ext.arcdialseekbar.ArcDialSeekBar
  2. android:id="@+id/arc_sb_view_2"
  3. android:layout_width="200dp"
  4. android:layout_height="200dp"
  5. android:layout_below="@id/arc_sb_view_1"
  6. android:layout_centerHorizontal="true"
  7. android:layout_marginTop="20dp"
  8. android:layout_margin="16dp"
  9. app:start_angle="135"
  10. app:end_angle="45"
  11. app:long_mark_len="15dp"
  12. app:short_mark_len="8dp"
  13. app:progress_color="#009688"
  14. app:text_color="#009688"
  15. app:text_size="12sp"
  16. app:inner_divider_count="5"
  17. app:long_mark_count="8"
  18. app:show_text="true"
  19. app:color_mode="single"></com.wiget.ext.arcdialseekbar.ArcDialSeekBar>

attributes

  • line_stroke_width
    the line width for the long and short marks
  • background_color
    the arc background color ,default if dark grey
  • start_angle
    start_angle range 0 to 360 clockwise
  • end_angle
    end_angle range 0 to 360 clockwise
  • touch_enable
    if false , it can be used as a progress
  • show_text
    if true,show the indicator text
  • text_color
    the color of text
  • text_size
    the size of text
  • long_mark_count
    the total count of long mark
  • inner_divider_count
    the value between two long marks.
  • long_mark_len
    the length of the long mark
  • short_mark_len
    the length of the short mark
  • color_mode
    single or gradient
  • progress_color
    if color mode is single ,this attribute will be valid .

License

  1. Copyright 2015-2019 esligh
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.