From eec9899c65d9a515bbdaff43dc6ffdd14a26541e Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Tue, 19 Sep 2017 21:46:30 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/accessibility.html | 2 +- releases/next/docs/accessibilityinfo.html | 2 +- releases/next/docs/actionsheetios.html | 2 +- releases/next/docs/activityindicator.html | 2 +- releases/next/docs/alert.html | 2 +- releases/next/docs/alertios.html | 2 +- .../docs/android-building-from-source.html | 4 +- releases/next/docs/animated.html | 2 +- releases/next/docs/animations.html | 2 +- releases/next/docs/app-extensions.html | 2 +- releases/next/docs/appregistry.html | 2 +- releases/next/docs/appstate.html | 2 +- releases/next/docs/asyncstorage.html | 2 +- releases/next/docs/backandroid.html | 2 +- releases/next/docs/backhandler.html | 2 +- releases/next/docs/building-for-apple-tv.html | 2 +- releases/next/docs/button.html | 2 +- releases/next/docs/cameraroll.html | 2 +- releases/next/docs/checkbox.html | 2 +- releases/next/docs/clipboard.html | 2 +- releases/next/docs/colors.html | 2 +- releases/next/docs/communication-android.html | 69 +++++++++++++++++++ releases/next/docs/communication-ios.html | 2 +- releases/next/docs/components-and-apis.html | 2 +- releases/next/docs/contributing.html | 4 +- releases/next/docs/datepickerandroid.html | 2 +- releases/next/docs/datepickerios.html | 2 +- releases/next/docs/debugging.html | 2 +- releases/next/docs/dimensions.html | 2 +- releases/next/docs/direct-manipulation.html | 2 +- releases/next/docs/drawerlayoutandroid.html | 2 +- releases/next/docs/easing.html | 2 +- releases/next/docs/flatlist.html | 2 +- releases/next/docs/flexbox.html | 2 +- releases/next/docs/geolocation.html | 2 +- .../next/docs/gesture-responder-system.html | 2 +- releases/next/docs/getting-started.html | 2 +- releases/next/docs/handling-text-input.html | 2 +- releases/next/docs/handling-touches.html | 2 +- releases/next/docs/headless-js-android.html | 2 +- releases/next/docs/height-and-width.html | 2 +- releases/next/docs/image.html | 2 +- releases/next/docs/imageeditor.html | 2 +- releases/next/docs/imagepickerios.html | 2 +- releases/next/docs/images.html | 2 +- releases/next/docs/imagestore.html | 2 +- releases/next/docs/imagestyleproptypes.html | 2 +- releases/next/docs/improvingux.html | 2 +- .../docs/integration-with-existing-apps.html | 2 +- releases/next/docs/interactionmanager.html | 2 +- .../next/docs/javascript-environment.html | 2 +- releases/next/docs/keyboard.html | 2 +- releases/next/docs/keyboardavoidingview.html | 2 +- releases/next/docs/layout-props.html | 2 +- releases/next/docs/layoutanimation.html | 2 +- releases/next/docs/linking-libraries-ios.html | 2 +- releases/next/docs/linking.html | 2 +- releases/next/docs/listview.html | 2 +- releases/next/docs/listviewdatasource.html | 2 +- releases/next/docs/maintainers.html | 2 +- releases/next/docs/maskedviewios.html | 2 +- releases/next/docs/modal.html | 2 +- releases/next/docs/more-resources.html | 2 +- .../next/docs/native-components-android.html | 2 +- releases/next/docs/native-components-ios.html | 2 +- .../next/docs/native-modules-android.html | 2 +- releases/next/docs/native-modules-ios.html | 2 +- releases/next/docs/navigation.html | 2 +- releases/next/docs/navigatorios.html | 2 +- releases/next/docs/netinfo.html | 2 +- releases/next/docs/network.html | 2 +- releases/next/docs/panresponder.html | 2 +- releases/next/docs/performance.html | 2 +- releases/next/docs/permissionsandroid.html | 2 +- releases/next/docs/picker.html | 2 +- releases/next/docs/pickerios.html | 2 +- releases/next/docs/pixelratio.html | 2 +- .../next/docs/platform-specific-code.html | 2 +- releases/next/docs/progressbarandroid.html | 2 +- releases/next/docs/progressviewios.html | 2 +- releases/next/docs/props.html | 2 +- releases/next/docs/pushnotificationios.html | 2 +- releases/next/docs/refreshcontrol.html | 2 +- releases/next/docs/running-on-device.html | 2 +- .../next/docs/running-on-simulator-ios.html | 2 +- releases/next/docs/scrollview.html | 2 +- releases/next/docs/sectionlist.html | 2 +- releases/next/docs/segmentedcontrolios.html | 2 +- releases/next/docs/settings.html | 2 +- releases/next/docs/shadow-props.html | 2 +- releases/next/docs/share.html | 2 +- releases/next/docs/signed-apk-android.html | 2 +- releases/next/docs/slider.html | 2 +- releases/next/docs/snapshotviewios.html | 2 +- releases/next/docs/state.html | 2 +- releases/next/docs/statusbar.html | 2 +- releases/next/docs/statusbarios.html | 2 +- releases/next/docs/style.html | 2 +- releases/next/docs/stylesheet.html | 2 +- releases/next/docs/switch.html | 2 +- releases/next/docs/systrace.html | 2 +- releases/next/docs/tabbarios-item.html | 2 +- releases/next/docs/tabbarios.html | 2 +- releases/next/docs/testing.html | 2 +- releases/next/docs/text.html | 2 +- releases/next/docs/textinput.html | 2 +- releases/next/docs/textstyleproptypes.html | 2 +- releases/next/docs/timepickerandroid.html | 2 +- releases/next/docs/timers.html | 2 +- releases/next/docs/toastandroid.html | 2 +- releases/next/docs/toolbarandroid.html | 2 +- releases/next/docs/touchablehighlight.html | 2 +- .../next/docs/touchablenativefeedback.html | 2 +- releases/next/docs/touchableopacity.html | 2 +- .../next/docs/touchablewithoutfeedback.html | 2 +- releases/next/docs/transforms.html | 2 +- releases/next/docs/troubleshooting.html | 2 +- releases/next/docs/tutorial.html | 2 +- releases/next/docs/understanding-cli.html | 2 +- releases/next/docs/upgrading.html | 2 +- releases/next/docs/using-a-listview.html | 2 +- releases/next/docs/using-a-scrollview.html | 2 +- releases/next/docs/vibration.html | 2 +- releases/next/docs/vibrationios.html | 2 +- releases/next/docs/view.html | 2 +- releases/next/docs/viewpagerandroid.html | 2 +- releases/next/docs/viewproptypes.html | 2 +- releases/next/docs/viewstyleproptypes.html | 2 +- releases/next/docs/virtualizedlist.html | 2 +- releases/next/docs/webview.html | 2 +- 130 files changed, 200 insertions(+), 131 deletions(-) create mode 100644 releases/next/docs/communication-android.html diff --git a/releases/next/docs/accessibility.html b/releases/next/docs/accessibility.html index d9c1ed1096e..ff539754e0b 100644 --- a/releases/next/docs/accessibility.html +++ b/releases/next/docs/accessibility.html @@ -1,4 +1,4 @@ -Accessibility - React Native

Accessibility #

Native App Accessibility (iOS and Android) #

Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.

In addition to this documentation, you might find this blog post about React Native accessibility to be useful.

Making Apps Accessible #

Accessibility properties #

accessible (iOS, Android) #

When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component. By default, all touchable elements are accessible.

On Android, ‘accessible={true}’ property for a react-native View will be translated into native ‘focusable={true}’.

<View accessible={true}> +Accessibility - React Native

Accessibility #

Native App Accessibility (iOS and Android) #

Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.

In addition to this documentation, you might find this blog post about React Native accessibility to be useful.

Making Apps Accessible #

Accessibility properties #

accessible (iOS, Android) #

When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component. By default, all touchable elements are accessible.

On Android, ‘accessible={true}’ property for a react-native View will be translated into native ‘focusable={true}’.

<View accessible={true}> <Text>text one</Text> <Text>text two</Text> </View>

In the above example, we can't get accessibility focus separately on 'text one' and 'text two'. Instead we get focus on a parent view with 'accessible' property.

accessibilityLabel (iOS, Android) #

When a view is marked as accessible, it is a good practice to set an accessibilityLabel on the view, so that people who use VoiceOver know what element they have selected. VoiceOver will read this string when a user selects the associated element.

To use, set the accessibilityLabel property to a custom string on your View:

<TouchableOpacity accessible={true} accessibilityLabel={'Tap me!'} onPress={this._onPress}> diff --git a/releases/next/docs/accessibilityinfo.html b/releases/next/docs/accessibilityinfo.html index baf9236e4f5..0e42df75278 100644 --- a/releases/next/docs/accessibilityinfo.html +++ b/releases/next/docs/accessibilityinfo.html @@ -1,4 +1,4 @@ -AccessibilityInfo - React Native

AccessibilityInfo #

Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The +AccessibilityInfo - React Native

AccessibilityInfo #

Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The AccessibilityInfo API is designed for this purpose. You can use it to query the current state of the screen reader as well as to register to be notified when the state of the screen reader changes.

Here's a small example illustrating how to use AccessibilityInfo:

class ScreenReaderStatusExample extends React.Component { state = { diff --git a/releases/next/docs/actionsheetios.html b/releases/next/docs/actionsheetios.html index 54f267e4921..31951bb9a42 100644 --- a/releases/next/docs/actionsheetios.html +++ b/releases/next/docs/actionsheetios.html @@ -1,4 +1,4 @@ -ActionSheetIOS - React Native

ActionSheetIOS #

Methods #

static showActionSheetWithOptions(options, callback) #

Display an iOS action sheet. The options object must contain one or more +ActionSheetIOS - React Native

ActionSheetIOS #

Methods #

static showActionSheetWithOptions(options, callback) #

Display an iOS action sheet. The options object must contain one or more of:

  • options (array of strings) - a list of button titles (required)
  • cancelButtonIndex (int) - index of cancel button in options
  • destructiveButtonIndex (int) - index of destructive button in options
  • title (string) - a title to show above the action sheet
  • message (string) - a message to show below the title

static showShareActionSheetWithOptions(options, failureCallback, successCallback) #

Display the iOS share sheet. The options object should contain one or both of message and url and can additionally have a subject or excludedActivityTypes:

  • url (string) - a URL to share
  • message (string) - a message to share
  • subject (string) - a subject for the message
  • excludedActivityTypes (array) - the activities to exclude from the ActionSheet

NOTE: if url points to a local file, or is a base64-encoded diff --git a/releases/next/docs/activityindicator.html b/releases/next/docs/activityindicator.html index f006782cf07..b093fc05d77 100644 --- a/releases/next/docs/activityindicator.html +++ b/releases/next/docs/activityindicator.html @@ -1,4 +1,4 @@ -ActivityIndicator - React Native

ActivityIndicator #

Displays a circular loading indicator.

Props #

animating?: bool #

Whether to show the indicator (true, the default) or hide it (false).

color?: color #

The foreground color of the spinner (default is gray).

size?: enum('small', 'large'), number #

Size of the indicator (default is 'small'). +ActivityIndicator - React Native

ActivityIndicator #

Displays a circular loading indicator.

Props #

animating?: bool #

Whether to show the indicator (true, the default) or hide it (false).

color?: color #

The foreground color of the spinner (default is gray).

size?: enum('small', 'large'), number #

Size of the indicator (default is 'small'). Passing a number to the size prop is only supported on Android.

ioshidesWhenStopped?: bool #

Whether the indicator should hide when not animating (true by default).

Improve this page by sending a pull request!

Alert #

Launches an alert dialog with the specified title and message.

Optionally provide a list of buttons. Tapping any button will fire the +Alert - React Native

Alert #

Launches an alert dialog with the specified title and message.

Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button.

This is an API that works both on iOS and Android and can show static alerts. To show an alert that prompts the user to enter some information, diff --git a/releases/next/docs/alertios.html b/releases/next/docs/alertios.html index e45d4c82f04..8da906607b6 100644 --- a/releases/next/docs/alertios.html +++ b/releases/next/docs/alertios.html @@ -1,4 +1,4 @@ -AlertIOS - React Native

AlertIOS #

AlertIOS provides functionality to create an iOS alert dialog with a +AlertIOS - React Native

AlertIOS #

AlertIOS provides functionality to create an iOS alert dialog with a message or create a prompt for user input.

Creating an iOS alert:

AlertIOS.alert( 'Sync Complete', 'All your data are belong to us.' diff --git a/releases/next/docs/android-building-from-source.html b/releases/next/docs/android-building-from-source.html index c3236fee33b..11fb9f2c2f2 100644 --- a/releases/next/docs/android-building-from-source.html +++ b/releases/next/docs/android-building-from-source.html @@ -1,4 +1,4 @@ -Building React Native from source - React Native

Building React Native from source #

You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.

Prerequisites #

Assuming you have the Android SDK installed, run android to open the Android SDK Manager.

Make sure you have the following installed:

  1. Android SDK version 23 (compileSdkVersion in build.gradle)
  2. SDK build tools version 23.0.1 (buildToolsVersion in build.gradle)
  3. Android Support Repository >= 17 (for Android Support Library)
  4. Android NDK (download links and installation instructions below)

Point Gradle to your Android SDK: #

Step 1: Set environment variables through your local shell.

Note: Files may vary based on shell flavor. See below for examples from common shells.

  • bash: .bash_profile or .bashrc
  • zsh: .zprofile or .zshrc
  • ksh: .profile or $ENV

Example:

export ANDROID_SDK=/Users/your_unix_name/android-sdk-macosx +Building React Native from source - React Native

Building React Native from source #

You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.

Prerequisites #

Assuming you have the Android SDK installed, run android to open the Android SDK Manager.

Make sure you have the following installed:

  1. Android SDK version 23 (compileSdkVersion in build.gradle)
  2. SDK build tools version 23.0.1 (buildToolsVersion in build.gradle)
  3. Android Support Repository >= 17 (for Android Support Library)
  4. Android NDK (download links and installation instructions below)

Point Gradle to your Android SDK: #

Step 1: Set environment variables through your local shell.

Note: Files may vary based on shell flavor. See below for examples from common shells.

  • bash: .bash_profile or .bashrc
  • zsh: .zprofile or .zshrc
  • ksh: .profile or $ENV

Example:

export ANDROID_SDK=/Users/your_unix_name/android-sdk-macosx export ANDROID_NDK=/Users/your_unix_name/android-ndk/android-ndk-r10e

Step 2: Create a local.properties file in the android directory of your react-native app with the following contents:

Example:

sdk.dir=/Users/your_unix_name/android-sdk-macosx ndk.dir=/Users/your_unix_name/android-ndk/android-ndk-r10e

Download links for Android NDK #

  1. Mac OS (64-bit) - http://dl.google.com/android/repository/android-ndk-r10e-darwin-x86_64.zip
  2. Linux (64-bit) - http://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
  3. Windows (64-bit) - http://dl.google.com/android/repository/android-ndk-r10e-windows-x86_64.zip
  4. Windows (32-bit) - http://dl.google.com/android/repository/android-ndk-r10e-windows-x86.zip

You can find further instructions on the official page.

Building the source #

1. Installing the fork #

First, you need to install react-native from your fork. For example, to install the master branch from the official repo, run the following:

npm install --save github:facebook/react-native#master

Alternatively, you can clone the repo to your node_modules directory and run npm install inside the cloned repo.

2. Adding gradle dependencies #

Add gradle-download-task as dependency in android/build.gradle:

... dependencies { @@ -28,7 +28,7 @@ dependencies { rootProject.allprojects { buildDir = "/path/to/build/directory/${rootProject.name}/${project.name}" } -}

Building for Maven/Nexus deployment #

If you find that you need to push up a locally compiled React Native .aar and related files to a remote Nexus repository, you can.

Start by following the Point Gradle to your Android SDK section of this page. Once you do this, assuming you have Gradle configured properly, you can then run the following command from the root of your React Native checkout to build and package all required files:

./gradlew ReactAndroid:installArchives

This will package everything that would typically be included in the android directory of your node_modules/react-native/ installation in the root directory of your React Native checkout.

Testing #

If you made changes to React Native and submit a pull request, all tests will run on your pull request automatically. To run the tests locally, see Running Tests.

Troubleshooting #

Gradle build fails in ndk-build. See the section about local.properties file above.

Improve this page by sending a pull request!

Animated #

The Animated library is designed to make animations fluid, powerful, and +Animated - React Native

Animated #

The Animated library is designed to make animations fluid, powerful, and easy to build and maintain. Animated focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and simple start/stop methods to control time-based animation execution.

The simplest workflow for creating an animation is to create an diff --git a/releases/next/docs/animations.html b/releases/next/docs/animations.html index 3edf9f02007..ce48dcdbf66 100644 --- a/releases/next/docs/animations.html +++ b/releases/next/docs/animations.html @@ -1,4 +1,4 @@ -Animations - React Native

Animations #

Animations are very important to create a great user experience. +Animations - React Native

Animations #

Animations are very important to create a great user experience. Stationary objects must overcome inertia as they start moving. Objects in motion have momentum and rarely come to a stop immediately. Animations allow you to convey physically believable motion in your interface.

React Native provides two complementary animation systems: diff --git a/releases/next/docs/app-extensions.html b/releases/next/docs/app-extensions.html index 72af5b1b5fd..e57b393344c 100644 --- a/releases/next/docs/app-extensions.html +++ b/releases/next/docs/app-extensions.html @@ -1,4 +1,4 @@ -App Extensions - React Native

App Extensions #

App extensions let you provide custom functionality and content outside of your main app. There are different types of app extensions on iOS, and they are all covered in the App Extension Programming Guide. In this guide, we'll briefly cover how you may take advantage of app extensions on iOS.

Memory use in extensions #

As these extensions are loaded outside of the regular app sandbox, it's highly likely that several of these app extensions will be loaded simultaneously. As you might expect, these extensions have small memory usage limits. Keep these in mind when developing your app extensions. It's always highly recommended to test your application on an actual device, and more so when developing app extensions: too frequently, developers find that their extension works just fine in the iOS Simulator, only to get user reports that their extension is not loading on actual devices.

We highly recommend that you watch Conrad Kramer's talk on Memory Use in Extensions to learn more about this topic.

Today widget #

The memory limit of a Today widget is 16 MB. As it happens, Today widget implementations using React Native may work unreliably because the memory usage tends to be too high. You can tell if your Today widget is exceeding the memory limit if it yields the message 'Unable to Load':

Always make sure to test your app extensions in a real device, but be aware that this may not be sufficient, especially when dealing with Today widgets. Debug-configured builds are more likely to exceed the memory limits, while release-configured builds don't fail right away. We highly recommend that you use Xcode's Instruments to analyze your real world memory usage, as it's very likely that your release-configured build is very close to the 16 MB limit. In situations like these, it is easy to go over the 16 MB limit by performing common operations, such as fetching data from an API.

To experiment with the limits of React Native Today widget implementations, try extending the example project in react-native-today-widget.

Other app extensions #

Other types of app extensions have greater memory limits than the Today widget. For instance, Custom Keyboard extensions are limited to 48 MB, and Share extensions are limited to 120 MB. Implementing such app extensions with React Native is more viable. One proof of concept example is react-native-ios-share-extension.

Improve this page by sending a pull request!

App Extensions #

App extensions let you provide custom functionality and content outside of your main app. There are different types of app extensions on iOS, and they are all covered in the App Extension Programming Guide. In this guide, we'll briefly cover how you may take advantage of app extensions on iOS.

Memory use in extensions #

As these extensions are loaded outside of the regular app sandbox, it's highly likely that several of these app extensions will be loaded simultaneously. As you might expect, these extensions have small memory usage limits. Keep these in mind when developing your app extensions. It's always highly recommended to test your application on an actual device, and more so when developing app extensions: too frequently, developers find that their extension works just fine in the iOS Simulator, only to get user reports that their extension is not loading on actual devices.

We highly recommend that you watch Conrad Kramer's talk on Memory Use in Extensions to learn more about this topic.

Today widget #

The memory limit of a Today widget is 16 MB. As it happens, Today widget implementations using React Native may work unreliably because the memory usage tends to be too high. You can tell if your Today widget is exceeding the memory limit if it yields the message 'Unable to Load':

Always make sure to test your app extensions in a real device, but be aware that this may not be sufficient, especially when dealing with Today widgets. Debug-configured builds are more likely to exceed the memory limits, while release-configured builds don't fail right away. We highly recommend that you use Xcode's Instruments to analyze your real world memory usage, as it's very likely that your release-configured build is very close to the 16 MB limit. In situations like these, it is easy to go over the 16 MB limit by performing common operations, such as fetching data from an API.

To experiment with the limits of React Native Today widget implementations, try extending the example project in react-native-today-widget.

Other app extensions #

Other types of app extensions have greater memory limits than the Today widget. For instance, Custom Keyboard extensions are limited to 48 MB, and Share extensions are limited to 120 MB. Implementing such app extensions with React Native is more viable. One proof of concept example is react-native-ios-share-extension.

Improve this page by sending a pull request!

AppRegistry #