question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onChange event Android

See original GitHub issue

@kevinstumpf thank you very much for the wrapper! Awesome job!

I cannot get onChange event triggered on Android. Do you know what could be wrong? Please let me know.

<SignaturePad ref={(element) => this.signPad = element}
                          style={styles.signPad}
                          penColor={colors.primary}
                          onChange={this.handleOnSignatureChange}
/>

handleOnSignatureChange is not called:

handleOnSignatureChange = () => {
       console.log("works")
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:14
  • Comments:22 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
n-permanacommented, Sep 16, 2017

@satishsynnov add this to /node_modules/react-native-signature-pad/injectedJavaScript/executeNativeFunction.js window.postMessage(JSON.stringify(args));

and this to /node_modules/react-native-signature-pad/index.js

onMessage = (event) => {
   var base64DataUrl = JSON.parse(event.nativeEvent.data);
   this._bridged_finishedStroke(base64DataUrl);
 }

 render = () => {
   return (
       <WebView automaticallyAdjustContentInsets={false}
                onNavigationStateChange={this._onNavigationChange}
                onMessage={this.onMessage}
                renderError={this._renderError}
                renderLoading={this._renderLoading}
                source={this.source}
                javaScriptEnabled={true}
                style={this.props.style}/>
   )
 };
2reactions
davidkhuucommented, Sep 20, 2017

@freefony

Not sure technically how but when Google released Nougat they stated that default WebViews would now use Chrome WebView as opposed to Google WebView that was used in previous versions. That’s my guess.

Source: https://developer.android.com/about/versions/nougat/android-7.0.html#webview

Read more comments on GitHub >

github_iconTop Results From Across the Web

android edittext onchange listener - Stack Overflow
The onChange listener will remember old data of EditText when user focus typing, and then compare the new data when user lose focus...
Read more >
OnChangeListener | Google Play services
Event listener interface that enables handling of ChangeEvent . Public Method Summary. abstract void. onChange(ChangeEvent event).
Read more >
Create a Change Event (Android) - Procore Support
Navigate to the Change Events tool using the Procore app on an Android mobile device. Tap Create New icon-create-circle-mobile.png .
Read more >
onChange event on EditText in Android | - Andrea Baccega
The onChange event is helpful when you've to deal with the following things: Let the user know (in realtime) how many characters he...
Read more >
Input events overview - Android Developers
An event listener is an interface in the View class that contains a single callback method. These methods will be called by the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found