spikef / react-native-gesture-password Goto Github PK
View Code? Open in Web Editor NEWA gesture password component for React Native. It supports both iOS and Android since it's written in pure JavaScript.
License: MIT License
A gesture password component for React Native. It supports both iOS and Android since it's written in pure JavaScript.
License: MIT License
Hi, even if we can override the styles of the component, we can't override height or width as they are fixed const. And they are used everywhere in file to set layout's height/width.
For example, by:
<PasswordGesture
style={{width:400, height:680}}
ref="pg"
status={this.state.status}
message={this.state.message}
onStart={() => this.onStart()}
onEnd={password => this.onEnd(password)}
/>
Absolutely nothing happens.
Is there any option to alter it's height/width?
In fact, i want to enter the password-gesture inside a popup window, but i need to override Width = Dimensions.get('window').width
and Height = Dimensions.get('window').height
with parent's height/width, which is the size of the window popup .
So to sum up, my question is:
Is there any way to make the GesturePassword inherit height/width from parent view?
This issue was also referenced in #16 but closed without fix.
使用的0.2.1版本
React.PropTypes在react16版本中无法使用,因为在React15.5版本以后PropTypes已经迁移到另一个库里去了,新的调用方式如下:
import PropTypes from 'prop-types';
OnEnd function does not return the password and I have checked inside the library there is also "const password = helper.getRealPassword(this. sequence);" not getting anything in the password variable, and there is one more problem that line is not visible and not inner circle is visible can anyone help me in this.
File: /source/index.js
This line no longer valid in the latest version of RN.
let Dimensions=require("Dimensions");
Recommended:
import { Dimensions } from 'react-native'
Thank you!
如题,在ios上不兼容,中间一列(2,5,8)不能作为起点,status没反应,message也不显示
my app is update to react-native version v0.39.2
and in it can't run
it is now import PropTypes from 'prop-types';
and so your library will not work on any modern React Native at the moment.
例如
<View style={{flex: 1}}>
<View style={{height: 50}}>
<Text>1234</Text>
</View>
<PasswordGesture ... />
</View>
之后响应会有点失灵。
在下方无影响
问题出在这段代码:
index文件;
getCrossChar(char) {
let middles = '13457', last = String(this.lastIndex);
// if ( middles.indexOf(char) > -1 || middles.indexOf(last) > -1 ) return false;
let point = helper.getMiddlePoint(this.state.circles[last], this.state.circles[char]);
for (let i=0; i < middles.length; i++) {
let index = middles[i];
if ( helper.isEquals(point, this.state.circles[index]) ) {
return String(index);
}
}
return false;
}
这个方法的 // if ( middles.indexOf(char) > -1 || middles.indexOf(last) > -1 ) return false;这一句话放错的地方,应该放在最后或者直接注释。
In my page Component, I have some other views, I have left an empty area for the PasswordGesture to display.
But when I layout the PasswordGesture in the area , the full screen was occupied by the PasswordGesture.
What's the better way to use PasswordGesture as a subview?
Thanks.
This is from react :
This lifecycle was previously named componentWillReceiveProps. That name will continue to work until version 17. Use the rename-unsafe-lifecycles codemod to automatically update your components.
I think admin should update this function. Thanks
If I select all the dots of the password, then the password number does not show, how to do it?
The gesture is working very well, but is very sensitive about the touched position, especially as you test on a real device where the finger touches "lower" than expected.
Is there a way to increase the hit area of circles, or at least to increase the size of circles?
Thanks!
It can create the password, that like: '28', '82', '46', '64' . Avoid the '5'.
如题,绘制手势不太灵敏,已在好几台安卓手机上测试
作者您好,我使用您的这个组件集成在我的项目里面,但是目前遇到了两个问题:
1、请问这个组件有缩略图thumbnails功能吗?
2、目前组件是3个点即可设置成功,请问如何设置为最少4个点才能设置成功?
非常感谢~!!!
您好,如果要控制手势轨迹的显示和隐藏有办法做到吗,好像目前提供的属性中无法设置
Can i show pattern by setting value programmatically. If so can you guide me how ? Because i don't see any method for this.
after the user insert first input ('123' for example ) - how can i clear the board?
i tries to use onReset() methd - but its not working.
当手势少于5个点,或者手势错误的时候,如何清除手势
Hello dude, I like your library. I want to make an pattern lock app which shows on home screen. My components are ready, now I don't know how to put it on home screen ? Plz help..
if I want to render two buttons in children of props. what should I do ? I try to render fullScreen view that contains all buttons. it will show that PasswordGesture is covered .
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.