update website

This commit is contained in:
Travis CI
2015-09-16 19:11:08 +00:00
parent e0c07c37e7
commit f4097ec7f9
+2 -2
View File
@@ -11,7 +11,7 @@ Dialog
Intent
Media
Pasteboard
Alert</div><h3><a class="anchor" name="props-that-are-only-supported-on-one-platform"></a>Props that are only supported on one platform <a class="hash-link" href="#props-that-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&#x27;t been implemented on the other platforms yet. All of these are annotated with <code>@platform</code> in JS docs and have a platform badge on the website (generated from JS docs). See e.g. <a href="https://facebook.github.io/react-native/docs/image.html" target="_blank">Image</a>.</p><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">&lt;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">&gt;</span>
Alert</div><h3><a class="anchor" name="props-that-are-only-supported-on-one-platform"></a>Props that are only supported on one platform <a class="hash-link" href="#props-that-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&#x27;t been implemented on the other platforms yet. All of these are annotated with <code>@platform</code> in JS docs and have a platform badge 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="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">&lt;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">&gt;</span>
&lt;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">&gt;</span> <span class="token function">alert<span class="token punctuation">(</span></span><span class="token string">&#x27;hi!&#x27;</span><span class="token punctuation">)</span><span class="token punctuation">}</span><span class="token operator">&gt;</span>
&lt;Text<span class="token operator">&gt;</span>HELLO<span class="token operator">!</span>&lt;<span class="token operator">/</span>Text<span class="token operator">&gt;</span>
&lt;<span class="token operator">/</span>TouchableOpacity<span class="token operator">&gt;</span>
@@ -23,7 +23,7 @@ Alert</div><h3><a class="anchor" name="props-that-are-only-supported-on-one-plat
bottom<span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
right<span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
opacity<span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">}</span><span class="token punctuation">}</span> <span class="token operator">/</span><span class="token operator">&gt;</span>
&lt;<span class="token operator">/</span>View<span class="token operator">&gt;</span></div><p>The behavior on Android is what you would expect from the web as well. If you want to be able to click through an overlaying transparent view, you can set <code>pointerEvents=&#x27;none&#x27;</code> on it.</p><h3><a class="anchor" name="the-overflow-style-property-defaults-to-hidden-and-cannot-be-changed-on-android"></a>The <code>overflow</code> style property defaults to <code>hidden</code> and cannot be changed on Android <a class="hash-link" href="#the-overflow-style-property-defaults-to-hidden-and-cannot-be-changed-on-android">#</a></h3><p>This is a result of how Android rendering works. This feature is not being worked on as it would be a significant undertaking and there are many more important tasks.</p><h3><a class="anchor" name="no-support-for-shadows-on-android"></a>No support for shadows on Android <a class="hash-link" href="#no-support-for-shadows-on-android">#</a></h3><p>We don&#x27;t support shadows on Android currently. These are notoriously hard to implement as they require drawing outside of a view&#x27;s bounds and Android&#x27;s invalidation logic has a hard time with that. A possible solution is to use <a href="https://developer.android.com/training/material/shadows-clipping.html" target="_blank">elevation</a>, but more experimentation will be required.</p><h3><a class="anchor" name="layout-only-nodes-on-android"></a>Layout-only nodes on Android <a class="hash-link" href="#layout-only-nodes-on-android">#</a></h3><p>An optimization feature of the Android version of React Native is for views which only contribute to the layout to not have a native view, only their layout properties are propagated to their children views. This optimization is to provide stability in deep view hierarchies for React Native and is therefore enabled by default. Should you depend on a view being present or internal tests incorrectly detect a view is layout only it will be necessary to turn off this behavior. To do this, set <code>collapsable</code> to false as in this example:</p><div class="prism language-javascript">&lt;View collapsable<span class="token operator">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span><span class="token operator">&gt;</span>
&lt;<span class="token operator">/</span>View<span class="token operator">&gt;</span></div><p>The behavior on Android is what you would expect from the web as well. If you want to be able to click through an overlaying transparent view, you can set <code>pointerEvents=&#x27;none&#x27;</code> on it.</p><h3><a class="anchor" name="the-overflow-style-property-defaults-to-hidden-and-cannot-be-changed-on-android"></a>The <code>overflow</code> style property defaults to <code>hidden</code> and cannot be changed on Android <a class="hash-link" href="#the-overflow-style-property-defaults-to-hidden-and-cannot-be-changed-on-android">#</a></h3><p>This is a result of how Android rendering works. This feature is not being worked on as it would be a significant undertaking and there are many more important tasks.</p><h3><a class="anchor" name="no-support-for-shadows-on-android"></a>No support for shadows on Android <a class="hash-link" href="#no-support-for-shadows-on-android">#</a></h3><p>We don&#x27;t support shadows on Android currently. These are notoriously hard to implement as they require drawing outside of a view&#x27;s bounds and Android&#x27;s invalidation logic has a hard time with that. A possible solution is to use <a href="https://developer.android.com/training/material/shadows-clipping.html" target="_blank">elevation</a>, but more experimentation will be required.</p><h3><a class="anchor" name="layout-only-nodes-on-android"></a>Layout-only nodes on Android <a class="hash-link" href="#layout-only-nodes-on-android">#</a></h3><p>An optimization feature of the Android version of React Native is for views which only contribute to the layout to not have a native view, only their layout properties are propagated to their children views. This optimization is to provide stability in deep view hierarchies for React Native and gis therefore enabled by default. Should you depend on a view being present or internal tests incorrectly detect a view is layout only it will be necessary to turn off this behavior. To do this, set <code>collapsable</code> to false as in this example:</p><div class="prism language-javascript">&lt;View collapsable<span class="token operator">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span><span class="token operator">&gt;</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
&lt;<span class="token operator">/</span>View<span class="token operator">&gt;</span></div><h3><a class="anchor" name="memory-issues-with-png-images"></a>Memory issues with PNG images <a class="hash-link" href="#memory-issues-with-png-images">#</a></h3><p>React Native Android depends on <a href="https://github.com/facebook/fresco" target="_blank">Fresco</a> for loading and displaying images. Currently we have disabled downsampling because it is experimental, so you may run into memory issues when loading large PNG images.</p></div><div class="docs-prevnext"><a class="docs-next" href="activityindicatorios.html#content">Next →</a></div></div></section><footer class="wrap"><div class="right">© 2015 Facebook Inc.</div></footer></div><div id="fb-root"></div><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){