jdqm / Tapeview
滑动卷尺,适用于身高、体重输入等场景,样式风格自由定制。
Stars: ✭ 136
Programming Languages
java
68154 projects - #9 most used programming language
Labels
Projects that are alternatives of or similar to Tapeview
Rdgliderviewcontroller Swift
Control for a floating view gliding over a ViewController Edit
Stars: ✭ 102 (-25%)
Mutual labels: view
Android Ratingreviews
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Stars: ✭ 110 (-19.12%)
Mutual labels: view
Bem Xjst
bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
Stars: ✭ 115 (-15.44%)
Mutual labels: view
Arclayout
With Arc Layout explore new styles and approaches on material design
Stars: ✭ 1,662 (+1122.06%)
Mutual labels: view
Pierotateview
android自定义View,带旋转动画的饼状图,区块点击事件,滑动到某一区块事件,可惯性旋转
Stars: ✭ 113 (-16.91%)
Mutual labels: view
Broccoli
📟An Android library that shows the placeholder of the view.
Stars: ✭ 1,390 (+922.06%)
Mutual labels: view
Imagezoom
An Android library that makes any view to be zoomable.
Stars: ✭ 118 (-13.24%)
Mutual labels: view
Flutterweekview
Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
Stars: ✭ 130 (-4.41%)
Mutual labels: view
Dry View
Complete, standalone view rendering system that gives you everything you need to write well-factored view code.
Stars: ✭ 124 (-8.82%)
Mutual labels: view
漂亮的卷尺效果
下载
implementation 'com.jdqm.tapelibrary:tapelibrary:1.0.0'
使用
<com.jdqm.tapelibrary.TapeView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:maxValue="230"
app:minValue="100"
app:value="164" />
也可以在Java代码中设置初始化参数,
/**
* 初始化配置参数
*
* @param value 当前值
* @param minValue 最小值
* @param maxValue 最大值
* @param per 每一隔所代表的值
* @param perCount 相邻两条长刻度线之间被分成的隔数量
*/
public void setValue(float value, float minValue, float maxValue, float per, int perCount)
回调接口
tapeHeight.setOnValueChangeListener(new TapeView.OnValueChangeListener() {
@Override
public void onChange(float value) {
//todo
}
});
获取当前值接口
tapeHeight.getValue()
自定义属性
name | 说明 | format | 默认值 |
---|---|---|---|
bgColor | 背景颜色 | color | #FBE40C |
calibrationColor | 刻度线的颜色 | color | #FFFFFF |
calibrationWidth | 刻度线的宽度 | dimension | 1dp |
calibrationShort | 短的刻度线的长度 | dimension | 20dp |
calibrationLong | 长的刻度线的长度 | dimension | 35dp |
triangleColor | 三角形指示器的颜色 | color | #FFFFFF |
triangleHeight | 三角形的高度 | dimension | 18dp |
textColor | 刻度尺上数值字体颜色 | color | #FFFFFF |
textSize | 刻度尺上数值字体大小 | dimension | 14sp |
per | 两个刻度之间的代表的数值 | float | 1 |
perCount | 两条长的刻度线之间的per数量 | integer | 10 |
gapWidth | 刻度之间的物理距离 | dimension | 10dp |
minValue | 刻度尺的最小值 | float | 0 |
maxValue | 刻度之间的最大值 | float | 100 |
value | 当前值 | float | 0 |
实现原理分析
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].