supersp / rulerview Goto Github PK
View Code? Open in Web Editor NEW一个可以滑动选择的尺子view,可以选择体重身高等信息,通过刷新当前屏幕模拟滑动效果,达到暂用内存最小的目的。。。
一个可以滑动选择的尺子view,可以选择体重身高等信息,通过刷新当前屏幕模拟滑动效果,达到暂用内存最小的目的。。。
1包裹在其他Layout时,wrap_content无效
2有几率发生卡顿,甚至在滑动时卡在两个刻度中间,测试了几次,基本上都是发生在滑动到最边缘以后再滑动到中间的时候发生卡顿的
设置scaleLimit属性后 下面的刻度number不能居中(对准上面的刻度线)了
外层套ScrollView+LinearLayout后,发生了高度wrap_content无效,高度直接填充了整个屏幕,需要怎么解决啊
好像没找到这个方法
代码如下:
rulerView.setFirstScale(58f) 实际定位到了 580.0
<com.lsp.RulerView android:id="@+id/rulerView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" lsp:bgColor="@color/white" lsp:firstScale="50" lsp:isBgRoundRect="false" lsp:largeScaleColor="#ff87868f" lsp:largeScaleStroke="2dp" lsp:maxScale="150" lsp:midScaleColor="#ffdddee0" lsp:midScaleStroke="2dp" lsp:minScale="35" lsp:resultNumColor="#0B0B0B" lsp:resultNumTextSize="20sp" lsp:rulerHeight="73.5dp" lsp:rulerToResultgap="32dp" lsp:scaleCount="10" lsp:scaleGap="5dp" lsp:scaleLimit="10" lsp:scaleNumColor="#575252" lsp:scaleNumTextSize="14sp" lsp:showScaleResult="true" lsp:smallScaleColor="#ffeaeaea" lsp:smallScaleStroke="1dp" lsp:unit="kg" lsp:unitColor="#87868F" lsp:unitTextSize="16sp" />
指定位置使用computeScrollTo 能不能去掉动画,现在界面出来,会一下子滑动过去,体验比较差
如最小设置为0,最大设置为10000000
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.