Skip to content

Conversation

@AndrewHenderson
Copy link
Collaborator

Created a working version of the sample code.

Android works out of the box.

iOS still requires the necessary additional steps to set up.

@isaachinman
Copy link
Collaborator

What's the difference now between examples/simple and examples/Sample1?

@AndrewHenderson
Copy link
Collaborator Author

AndrewHenderson commented Dec 31, 2018

@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.

@mtzfactory
Copy link

mtzfactory commented Jan 19, 2019

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):
share_extension_android

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.

@mtzfactory
Copy link

mtzfactory commented Jan 19, 2019

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.

@braincore
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants