yjwfn / rulerview Goto Github PK
View Code? Open in Web Editor NEWRulerVIew for Android
RulerVIew for Android
第一个演示图上是不是有一个当前滑到的位置的指示标?这个在代码里好像没体现,请问在哪里呀
第二个如何获得松开手之后滑动的数据呢?rulerview的OnScaleListener onScaleChanged 好像在手滑动过程中一直会调用
非常感谢!
1,绘制文字没居中对齐,原因是y
计算的问题
改为如下会好一点
int y ;
if (!isGravityTop()) {
y = (int) (mIndicateLoc.top / 2 - (mTextPaint.ascent() + mTextPaint.descent()) / 2);
} else {
y = (int) (mIndicateLoc.bottom + textHeight / 2 - (mTextPaint.ascent() + mTextPaint.descent()) / 2);
}
2.是阻尼系数(应该是这样叫...)的问题
if (getScrollX() <= 0 || getScrollX() >= getMaximumScroll())
小于零就开始减少滑动的距离了,但是demo中分界线是中间,这样判断有不妥
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.