shimohq / react-native-prompt-android

A polyfill library for Alert.prompt on Android platform, working both on Android and iOS platform.
MIT License
129 stars 74 forks source link

Android Only crash #42

Closed eyalabadi98 closed 5 years ago

eyalabadi98 commented 5 years ago

Hello,

I have linked the module on android and IOS, but when I click on the item to show the popup, it crashes the android app, there is no error or anything

Even if i remove the ok and cancel button and replace them with the one on the example it still crashes. it works perfectly on IOS

My code:

prompt(
                                            `${country1} ${number1}  has forfeited`,
                                            `Signature of ${country2} ${number2} coach`,
                                            [
                                                {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
                                                {text: 'OK', onPress: text => {
                                                    //do stuff, still crashes if i remove this
                                                }},

                                            ],
                                            {
                                                type: 'plain-text',
                                                cancelable: true,
                                                defaultValue: "",
                                                placeholder: 'Team Coach'
                                            }
                                        );
eyalabadi98 commented 5 years ago

Actually I was able to fix it by adding a @style/Theme.AppCompat.Light to my Manifest

ansarikhurshid786 commented 4 years ago

@eyalabadi98 how to add in manifest. can you give example code