Open AndrewHenderson opened 5 years ago
What's the difference now between examples/simple
and examples/Sample1
?
@isaachinman I renamed it “simple” since it is React Native boilerplate with the simplest possible implementation of the share extension. I thought, if we add more complex demos in the future, we can use descriptive names rather than SampleN.
Hi @AndrewHenderson , I just downloaded your pull request, but it doesn't work as expected, although it works, it doesn't behave like the example in the documentation
Here is your simple example running in my phone (Xiaomi A2, Android 9):
I modified the modal-box properties to start from bottom and specifying a height but I always have the same result... I can't see the backdrop and is always full screen...
Is it working properly for you?
Best regards.
Hi, finally I made it work. I noticed that you changed the Modal component from react-native-modalbox to the native one in react-native.
After changing back to react-native-modalbox and adding the property coverScreen={ true }
it works as expected in the documentation image.
Another change I had to make for a fresh RN project was in styles.xml
. The parent
attributes need to be to a AppCompat
theme. For example:
<style name="Share.Window" parent="Theme.AppCompat.Light">
<item name="android:windowEnterAnimation">@null</item>
<item name="android:windowExitAnimation">@null</item>
</style>
<style name="Theme.Share.Transparent" parent="Theme.AppCompat.Light">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowAnimationStyle">@style/Share.Window</item>
</style>
Created a working version of the sample code.
Android works out of the box.
iOS still requires the necessary additional steps to set up.