mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
update website
This commit is contained in:
@@ -11,7 +11,7 @@ Dialog
|
||||
Intent
|
||||
Media
|
||||
Pasteboard
|
||||
Alert</div><h3><a class="anchor" name="some-props-are-only-supported-on-one-platform"></a>Some props are only supported on one platform <a class="hash-link" href="#some-props-are-only-supported-on-one-platform">#</a></h3><p>There are properties that work on one platform only, either because they can inherently only be supported on that platform or because they haven't been implemented on the other platforms yet. All of these are annotated with <code>@platform</code> in JS docs and have a small badge next to them on the website. See e.g. <a href="https://facebook.github.io/react-native/docs/image.html" target="_blank">Image</a>.</p><h3><a class="anchor" name="platform-parity"></a>Platform parity <a class="hash-link" href="#platform-parity">#</a></h3><p>There are known cases where the API between iOS and Android could be made more consistent:</p><ul><li><code><SwitchAndroid></code> and <code><SwitchIOS></code> are very similar and should be unified to a single <code><Switch></code> component</li><li><code><AndroidViewPager></code> (to be open sourced soon) and <code><ScrollView pagingEnabled={true}></code> on iOS do a similar thing. We might want to unify them to <code><ViewPager></code>.</li><li><code>alert()</code> needs Android support (once the Dialogs module is open sourced)</li><li>It might be possible to bring <code>LinkingIOS</code> and <code>IntentAndroid</code> (to be open sourced) closer together</li><li><code>ActivityIndicator</code> could render a native spinning indicator on both platforms (currenty this is done using <code>ActivityIndicatorIOS</code> on iOS and <code>ProgressBarAndroid</code> on Android)</li><li><code>ProgressBar</code> could render a horizontal progress bar on both platforms (currently only supported on iOS via <code>ProgressViewIOS</code>)</li></ul><h3><a class="anchor" name="publishing-modules-on-android"></a>Publishing modules on Android <a class="hash-link" href="#publishing-modules-on-android">#</a></h3><p>There is currently no easy way of publishing custom native modules on Android. Smooth work flow for contributors is important and this will be looked at very closely after the initial Open Source release. Of course the aim will be to streamline and optimize the process between iOS and Android as much as possible.</p><h3><a class="anchor" name="overlay-view-with-opacity-of-0-cannot-be-clicked-through"></a>Overlay view with opacity of 0 cannot be clicked through <a class="hash-link" href="#overlay-view-with-opacity-of-0-cannot-be-clicked-through">#</a></h3><p>There is a noted difference in the handling of Views with an opacity of 0 between iOS and Android. While iOS will allow these views to be clicked through and the View below will receive the touch input, for Android the touch will be blocked. This can be demonstrated in this example where it will only be possible to click the touchable on iOS.</p><div class="prism language-javascript"><View style<span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>flex<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token operator">></span>
|
||||
Alert</div><h3><a class="anchor" name="some-props-are-only-supported-on-one-platform"></a>Some props are only supported on one platform <a class="hash-link" href="#some-props-are-only-supported-on-one-platform">#</a></h3><p>There are properties that work on one platform only, either because they can inherently only be supported on that platform or because they haven't been implemented on the other platforms yet. All of these are annotated with <code>@platform</code> in JS docs and have a small badge next to them on the website. See e.g. <a href="https://facebook.github.io/react-native/docs/image.html" target="_blank">Image</a>.</p><h3><a class="anchor" name="platform-parity"></a>Platform parity <a class="hash-link" href="#platform-parity">#</a></h3><p>There are known cases where the API between iOS and Android could be made more consistent:</p><ul><li><code><SwitchAndroid></code> and <code><SwitchIOS></code> are very similar and should be unified to a single <code><Switch></code> component.</li><li><code><AndroidViewPager></code> (to be open sourced soon) and <code><ScrollView pagingEnabled={true}></code> on iOS do a similar thing. We might want to unify them to <code><ViewPager></code>.</li><li><code>alert()</code> needs Android support (once the Dialogs module is open sourced)</li><li>It might be possible to bring <code>LinkingIOS</code> and <code>IntentAndroid</code> (to be open sourced) closer together.</li><li><code>ActivityIndicator</code> could render a native spinning indicator on both platforms (currenty this is done using <code>ActivityIndicatorIOS</code> on iOS and <code>ProgressBarAndroid</code> on Android).</li><li><code>ProgressBar</code> could render a horizontal progress bar on both platforms (currently only supported on iOS via <code>ProgressViewIOS</code>).</li></ul><h3><a class="anchor" name="publishing-modules-on-android"></a>Publishing modules on Android <a class="hash-link" href="#publishing-modules-on-android">#</a></h3><p>There is currently no easy way of publishing custom native modules on Android. Smooth work flow for contributors is important and this will be looked at very closely after the initial Open Source release. Of course the aim will be to streamline and optimize the process between iOS and Android as much as possible.</p><h3><a class="anchor" name="overlay-view-with-opacity-of-0-cannot-be-clicked-through"></a>Overlay view with opacity of 0 cannot be clicked through <a class="hash-link" href="#overlay-view-with-opacity-of-0-cannot-be-clicked-through">#</a></h3><p>There is a noted difference in the handling of Views with an opacity of 0 between iOS and Android. While iOS will allow these views to be clicked through and the View below will receive the touch input, for Android the touch will be blocked. This can be demonstrated in this example where it will only be possible to click the touchable on iOS.</p><div class="prism language-javascript"><View style<span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>flex<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token operator">></span>
|
||||
<TouchableOpacity onPress<span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> <span class="token function">alert<span class="token punctuation">(</span></span><span class="token string">'hi!'</span><span class="token punctuation">)</span><span class="token punctuation">}</span><span class="token operator">></span>
|
||||
<Text<span class="token operator">></span>HELLO<span class="token operator">!</span><<span class="token operator">/</span>Text<span class="token operator">></span>
|
||||
<<span class="token operator">/</span>TouchableOpacity<span class="token operator">></span>
|
||||
|
||||
Reference in New Issue
Block a user