
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-native-android-signaturepad
Advanced tools
Integrate https://github.com/gcacace/android-signaturepad into `react-native/android`
Integrate https://github.com/gcacace/android-signaturepad into react-native/android
npm i react-native-android-signaturepad
import React from 'react'
import {Button,View} from 'react-native'
import SignaturePad from 'react-native-android-signaturepad'
export default class extends React.Component {
state={
erasing:false
};
clear=()=>{
this.refs._signaturePad.clear();
};
undo=()=>{
this.refs._signaturePad.undo(callback:options);
};
render(){
return (
<View style={{flex:1}}>
<SignaturePad
ref={"_signaturePad"}
style={{flex:1,backgroundColor:'yellow'}}
penMaxWidth={7}
penMinWidth={3}
undo={true}
bitmap={"base64"}
erasing={this.state.erasing}
onChange={(event)=>{
let message = event.nativeEvent.message;
console.log(message)
}}
/>
<Button title={"clear"} onPress={this.clear}/>
<Button title={"undo"} onPress={this.undo}/>
</View>
)
}
}
https://github.com/gcacace/android-signaturepad
1.0.4
1.添加 erasing={boolean}
橡皮擦功能
2.1.0
1.添加undo()
回退功能
2.添加undo
props控制回退功能的启用(默认为true,可能会占用一定内存)
2.2.1
1.添加bitmap={string}
初始化时会渲染传入的bitmap
Future
1.Add BackgroundImage support
使用<Image />
渲染bitmap记得添加前缀'data:image/png;base64,'
以作为base64
格式数据
this.setState({bitmap:await this.refs._signaturePad.getTransparentSignatureBitmap()})
<Image source={{uri:'data:image/png;base64,'+bitmap}}
FAQs
Integrate https://github.com/gcacace/android-signaturepad into `react-native/android`
The npm package react-native-android-signaturepad receives a total of 23 weekly downloads. As such, react-native-android-signaturepad popularity was classified as not popular.
We found that react-native-android-signaturepad demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.