7heaven / Gesturelock
Licence: other
a GestureLock that can customize length and style
Stars: ✭ 261
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Gesturelock
critical-css-widget
A browser widget to extract Critical CSS and Full CSS from a page. Can be used via the browser console.
Stars: ✭ 35 (-86.59%)
Mutual labels: widget
FloatingView
FloatingView moved by finger supporting OverlaySystem, OverlayActivity, OverlayViewGroup modes
Stars: ✭ 58 (-77.78%)
Mutual labels: widget
yii2-number
A number format mask control and input for Yii2 Framework
Stars: ✭ 22 (-91.57%)
Mutual labels: widget
chat21-web-widget
Live Chat Widget built with Firebase and Angular4 for customer support .
Stars: ✭ 69 (-73.56%)
Mutual labels: widget
Playerbase
The basic library of Android player will process complex business components. The access is simple。Android播放器基础库,专注于播放视图组件的高复用性和组件间的低耦合,轻松处理复杂业务。
Stars: ✭ 2,814 (+978.16%)
Mutual labels: widget
fludget
Learn Flutter on Flutter! A widget directory with implementation samples!
Stars: ✭ 26 (-90.04%)
Mutual labels: widget
monzo-widget
An Android app widget for Monzo using the public api
Stars: ✭ 25 (-90.42%)
Mutual labels: widget
flutter material color picker
Material color picker, you can customize colors. Selection in two step, first main color and after shades.
Stars: ✭ 68 (-73.95%)
Mutual labels: widget
giscus
A comments system powered by GitHub Discussions. 💬 💎
Stars: ✭ 1,448 (+454.79%)
Mutual labels: widget
Rocket-Notes
The World's Fastest Note Taking App. Fast. Simple. Create a note in one tap! Create image and text notes directly from your home screen!
Stars: ✭ 20 (-92.34%)
Mutual labels: widget
flutter json view
📄 Displaying json models in a Flutter widget
Stars: ✭ 28 (-89.27%)
Mutual labels: widget
insta-feed.js
Show your Instagram profile on your website. 🌈
Stars: ✭ 25 (-90.42%)
Mutual labels: widget
flarum-ext-dashboard
DEPRECATED This completely re-imagines the Admin interface
Stars: ✭ 17 (-93.49%)
Mutual labels: widget
Triangulationdrawable
Low Ploy Triangulation Animation on Android.
Stars: ✭ 259 (-0.77%)
Mutual labels: widget
yii2-notification-wrapper
Yii2-notification-wrapper module renders a message from session flash (with ajax, pjax support and etc.) through Growl, Noty, Toastr and more libraries
Stars: ✭ 78 (-70.11%)
Mutual labels: widget
BakingApp
🍛🍴 This app allows a user to select a recipe and see video-guided steps for how to complete it, showcasing MVVM, Retrofit, ExoPlayer with lifecycle components, Master/Detail Flow, Widgets.
Stars: ✭ 18 (-93.1%)
Mutual labels: widget
GestureLock
GestureLock是一个可以自定义数量、自定义样式的手势解锁控件
用法
gradle:
compile 'com.7heaven.widgets:gesturelock:1.3'
使用GestureLock类提供的Adapter来定制样式
gestureView.setAdapter(new GestureLock.GestureLockAdapter() {
@Override
public int getDepth() {
return 7;
}
@Override
public int[] getCorrectGestures() {
return new int[]{1, 2, 3, 4};
}
@Override
public int getUnmatchedBoundary() {
return 5;
}
@Override
public int getBlockGapSize(){
return 10;
}
@Override
public GestureLockView getGestureLockViewInstance(Context context, int position) {
return new NexusStyleLockView(context);
}
});
getDepth() 手势解锁的宽高数量
getCorrectGestures() 正确的解锁手势
getUnmatchedBoundary() 最大可重试次数
getBlockGapSize() block之前的间隔大小
getGestureLockViewInstance(Context context, int position) block的样式
继承GestureLockView来实现自定义样式的block
- 重写doArrowDraw绘制箭头(箭头角度0的时候为向上)
- 重写onDraw实现Block内容样式的绘制
Block分为三种状态
- LockerState.LOCKER_STATE_NORMAL
正常状态
- LockerState.LOCKER_STATE_SELECTED
选中状态
- LockerState.LOCKER_STATE_ERROR
错误状态
@Override
protected void doArrowDraw(Canvas canvas){
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(COLOR_ERROR);
canvas.drawPath(arrow, mPaint);
}
@Override
protected void doDraw(LockerState state, Canvas canvas){
switch(state){
case LOCKER_STATE_NORMAL:
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(COLOR_NORMAL);
canvas.drawCircle(mCenterX, mCenterY, mRadius * innerRate, mPaint);
break;
case LOCKER_STATE_SELECTED:
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(COLOR_NORMAL);
mPaint.setStrokeWidth(mRadius * outerWidthRate);
canvas.drawCircle(mCenterX, mCenterY, mRadius * outerRate, mPaint);
mPaint.setStrokeWidth(2);
canvas.drawCircle(mCenterX, mCenterY, mRadius * innerRate, mPaint);
break;
case LOCKER_STATE_ERROR:
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(COLOR_ERROR);
mPaint.setStrokeWidth(mRadius * outerWidthRate);
canvas.drawCircle(mCenterX, mCenterY, mRadius * outerRate, mPaint);
mPaint.setStrokeWidth(2);
canvas.drawCircle(mCenterX, mCenterY, mRadius * innerRate, mPaint);
break;
}
}
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].