GithubHelp home page GithubHelp logo

hhy5277 / rulerview-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from supersp/rulerview

0.0 1.0 0.0 1.77 MB

一个可以滑动选择的尺子view,可以选择体重身高等信息,通过刷新当前屏幕模拟滑动效果,达到暂用内存最小的目的。。。

Java 100.00%

rulerview-1's Introduction

使用

在根build.gradle 中添加

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

    }
}

在module的build.gradle中添加

implementation 'com.github.superSp:RulerView:v1.4'

实现思路以及流程

我的简书地址

演示

演示gif

演示gif2

支持设置的属性

<attr name="scaleCount" format="integer" />                  <!--相邻2个大刻度之间小刻度的数目-->
<attr name="scaleLimit" format="integer" />                  <!--相邻2个大刻度之间的差值默认为1-->
<attr name="rulerHeight" format="dimension" />               <!--尺子的高度-->
<attr name="rulerToResultgap" format="dimension" />          <!--尺子距离结果的高度-->
<attr name="scaleGap" format="dimension" />                  <!--刻度间距-->
<attr name="firstScale" format="float" />                    <!--默认选中的刻度-->
<attr name="maxScale" format="integer" />                    <!--最大刻度-->
<attr name="minScale" format="integer" />                    <!--最小刻度-->
<attr name="bgColor" format="color" />                       <!--背景色-->
<attr name="smallScaleColor" format="color" />               <!--小刻度的颜色-->
<attr name="midScaleColor" format="color" />                 <!--中刻度的颜色-->
<attr name="largeScaleColor" format="color" />               <!--大刻度的颜色-->
<attr name="scaleNumColor" format="color" />                 <!--刻度数的颜色-->
<attr name="resultNumColor" format="color" />                <!--结果字体的颜色-->
<attr name="unit" format="string" />                         <!--单位-->
<attr name="unitColor" format="color" />                     <!--单位颜色-->
<attr name="smallScaleStroke" format="dimension" />          <!--小刻度的宽度-->
<attr name="midScaleStroke" format="dimension" />            <!--中刻度的宽度-->
<attr name="largeScaleStroke" format="dimension" />          <!--大刻度的宽度-->
<attr name="resultNumTextSize" format="dimension" />         <!--结果字体大小-->
<attr name="scaleNumTextSize" format="dimension" />          <!--刻度字体大小-->
<attr name="unitTextSize" format="dimension" />              <!--单位字体大小-->
<attr name="showScaleResult" format="boolean" />             <!--是否显示结果值-->
<attr name="isBgRoundRect" format="boolean" />               <!--背景是否圆角-->

rulerview-1's People

Contributors

supersp avatar

Watchers

 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.