Query whether a screen reader is currently enabled. Returns a promise which +}
Query whether a screen reader is currently enabled. Returns a promise which
resolves to a boolean. The result is true when a screen reader is enabled
and false otherwise.
Add an event handler. Supported events:
change: Fires when the state of the screen reader changes. The argument
to the event handler is a boolean. The boolean is true when a screen
diff --git a/releases/next/docs/activityindicator.html b/releases/next/docs/activityindicator.html
index 8dcb3e47f3c..068e25e81c3 100644
--- a/releases/next/docs/activityindicator.html
+++ b/releases/next/docs/activityindicator.html
@@ -1,5 +1,5 @@
-Displays a circular loading indicator.
Whether to show the indicator (true, the default) or hide it (false).
Size of the indicator (default is 'small'). -Passing a number to the size prop is only supported on Android.
Whether the indicator should hide when not animating (true by default).
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Displays a circular loading indicator.
bool #Whether to show the indicator (true, the default) or hide it (false).
[object Object] #The foreground color of the spinner (default is gray).
[object Object], [object Object] #Size of the indicator (default is 'small'). +Passing a number to the size prop is only supported on Android.
bool #Whether the indicator should hide when not animating (true by default).
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Creating an iOS alert:
We recommend using the Alert.alert method for
-cross-platform support if you don't need to create iOS-only prompts.
Create and display a popup alert.
| Name and Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| title string | The dialog's title. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [message] string | An optional message that appears below +cross-platform support if you don't need to create iOS-only prompts. Methods #static alert(title: string, message?: string, callbackOrButtons?: ?(() => void), ButtonsArray, type?: AlertType) #Create and display a popup alert. Parameters:
'use strict';
diff --git a/releases/next/docs/drawerlayoutandroid.html b/releases/next/docs/drawerlayoutandroid.html
index b8e3de531d7..3f72db7b17f 100644
--- a/releases/next/docs/drawerlayoutandroid.html
+++ b/releases/next/docs/drawerlayoutandroid.html
@@ -20,24 +20,24 @@ be set by the drawerWidth prop.Example: /View>
</DrawerLayoutAndroid>
);
-}, Props #drawerBackgroundColor color #Specifies the background color of the drawer. The default value is white. +}, Props #drawerBackgroundColor?: |
Examples # | Edit on GitHub |
enum('height', 'position', 'padding') #[object Object] #The style of the content container(View) when behavior is 'position'.
number #This is the distance between the top of the user screen and the react native view, +may be non-zero in some use cases.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
alignContent controls how a rows align in the cross direction,
+
enum('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around') #alignContent controls how a rows align in the cross direction,
overriding the alignContent of the parent.
See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content
- for more details.
alignItems aligns children in the cross direction.
+ for more details.
enum('flex-start', 'flex-end', 'center', 'stretch', 'baseline') #alignItems aligns children in the cross direction.
For example, if children are flowing vertically, alignItems
controls how they align horizontally.
It works like align-items in CSS (default: stretch).
See https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
- for more details.
alignSelf controls how a child aligns in the cross direction,
+ for more details.
enum('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline') #alignSelf controls how a child aligns in the cross direction,
overriding the alignItems of the parent. It works like align-self
in CSS (default: auto).
See https://developer.mozilla.org/en-US/docs/Web/CSS/align-self
- for more details.
Aspect ratio control the size of the undefined dimension of a node. Aspect ratio is a + for more details.
number #Aspect ratio control the size of the undefined dimension of a node. Aspect ratio is a non-standard property only available in react native and not CSS.
borderBottomWidth works like border-bottom-width in CSS.
+if unset
number #borderBottomWidth works like border-bottom-width in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width
-for more details.
borderLeftWidth works like border-left-width in CSS.
+for more details.
number #borderLeftWidth works like border-left-width in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width
-for more details.
borderRightWidth works like border-right-width in CSS.
+for more details.
number #borderRightWidth works like border-right-width in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width
-for more details.
borderTopWidth works like border-top-width in CSS.
+for more details.
number #borderTopWidth works like border-top-width in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width
-for more details.
borderWidth works like border-width in CSS.
+for more details.
number #borderWidth works like border-width in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/border-width
-for more details.
bottom is the number of logical pixels to offset the bottom edge of
+for more details.
[object Object], [object Object] #bottom is the number of logical pixels to offset the bottom edge of
this component.
It works similarly to bottom in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom
- for more details of how bottom affects layout.
display sets the display type of this component.
It works similarly to display in CSS, but only support 'flex' and 'none'.
- 'flex' is the default.
In React Native flex does not work the same way that it does in CSS.
+ for more details of how bottom affects layout.
string #display sets the display type of this component.
It works similarly to display in CSS, but only support 'flex' and 'none'.
+ 'flex' is the default.
number #In React Native flex does not work the same way that it does in CSS.
flex is a number rather than a string, and it works
according to the Yoga library
at https://github.com/facebook/yoga
When flex is a positive number, it makes the component flexible
@@ -37,64 +37,64 @@ for more details.
flexDirection controls which directions children of a container go.
+ the component will shrink to its minWidth and minHeight.
flexGrow, flexShrink, and flexBasis work the same as in CSS.
[object Object], [object Object] #enum('row', 'row-reverse', 'column', 'column-reverse') #flexDirection controls which directions children of a container go.
row goes left to right, column goes top to bottom, and you may
be able to guess what the other two do. It works like flex-direction
in CSS, except the default is column.
See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction
- for more details.
flexWrap controls whether children can wrap around after they
+ for more details.
number #number #enum('wrap', 'nowrap') #flexWrap controls whether children can wrap around after they
hit the end of a flex container.
It works like flex-wrap in CSS (default: nowrap).
See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap
- for more details.
height sets the height of this component.
It works similarly to height in CSS, but in React Native you
+ for more details.
[object Object], [object Object] #height sets the height of this component.
It works similarly to height in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
- See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details.
justifyContent aligns children in the main direction.
+ See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details.
enum('flex-start', 'flex-end', 'center', 'space-between', 'space-around') #justifyContent aligns children in the main direction.
For example, if children are flowing vertically, justifyContent
controls how they align vertically.
It works like justify-content in CSS (default: flex-start).
See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
- for more details.
left is the number of logical pixels to offset the left edge of
+ for more details.
[object Object], [object Object] #left is the number of logical pixels to offset the left edge of
this component.
It works similarly to left in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/left
- for more details of how left affects layout.
Setting margin has the same effect as setting each of
+ for more details of how left affects layout.
[object Object], [object Object] #Setting margin has the same effect as setting each of
marginTop, marginLeft, marginBottom, and marginRight.
See https://developer.mozilla.org/en-US/docs/Web/CSS/margin
- for more details.
marginBottom works like margin-bottom in CSS.
+ for more details.
[object Object], [object Object] #marginBottom works like margin-bottom in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom
- for more details.
Setting marginHorizontal has the same effect as setting
- both marginLeft and marginRight.
marginLeft works like margin-left in CSS.
+ for more details.
[object Object], [object Object] #Setting marginHorizontal has the same effect as setting
+ both marginLeft and marginRight.
[object Object], [object Object] #marginLeft works like margin-left in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
- for more details.
marginRight works like margin-right in CSS.
+ for more details.
[object Object], [object Object] #marginRight works like margin-right in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right
- for more details.
marginTop works like margin-top in CSS.
+ for more details.
[object Object], [object Object] #marginTop works like margin-top in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top
- for more details.
Setting marginVertical has the same effect as setting both
- marginTop and marginBottom.
maxHeight is the maximum height for this component, in logical pixels.
It works similarly to max-height in CSS, but in React Native you
+ for more details.
[object Object], [object Object] #Setting marginVertical has the same effect as setting both
+ marginTop and marginBottom.
[object Object], [object Object] #maxHeight is the maximum height for this component, in logical pixels.
It works similarly to max-height in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/max-height - for more details.
maxWidth is the maximum width for this component, in logical pixels.
It works similarly to max-width in CSS, but in React Native you
+ for more details.
[object Object], [object Object] #maxWidth is the maximum width for this component, in logical pixels.
It works similarly to max-width in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/max-width - for more details.
minHeight is the minimum height for this component, in logical pixels.
It works similarly to min-height in CSS, but in React Native you
+ for more details.
[object Object], [object Object] #minHeight is the minimum height for this component, in logical pixels.
It works similarly to min-height in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height - for more details.
minWidth is the minimum width for this component, in logical pixels.
It works similarly to min-width in CSS, but in React Native you
+ for more details.
[object Object], [object Object] #minWidth is the minimum width for this component, in logical pixels.
It works similarly to min-width in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/min-width - for more details.
overflow controls how a children are measured and displayed.
+ for more details.
enum('visible', 'hidden', 'scroll') #overflow controls how a children are measured and displayed.
overflow: hidden causes views to be clipped while overflow: scroll
causes views to be measured independently of their parents main axis.It works likeoverflow` in CSS (default: visible).
See https://developer.mozilla.org/en/docs/Web/CSS/overflow
- for more details.
Setting padding has the same effect as setting each of
+ for more details.
[object Object], [object Object] #Setting padding has the same effect as setting each of
paddingTop, paddingBottom, paddingLeft, and paddingRight.
See https://developer.mozilla.org/en-US/docs/Web/CSS/padding
- for more details.
paddingBottom works like padding-bottom in CSS.
+ for more details.
[object Object], [object Object] #paddingBottom works like padding-bottom in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom
-for more details.
Setting paddingHorizontal is like setting both of
- paddingLeft and paddingRight.
paddingLeft works like padding-left in CSS.
+for more details.
[object Object], [object Object] #Setting paddingHorizontal is like setting both of
+ paddingLeft and paddingRight.
[object Object], [object Object] #paddingLeft works like padding-left in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left
-for more details.
paddingRight works like padding-right in CSS.
+for more details.
[object Object], [object Object] #paddingRight works like padding-right in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right
-for more details.
paddingTop works like padding-top in CSS.
+for more details.
[object Object], [object Object] #paddingTop works like padding-top in CSS.
See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top
-for more details.
Setting paddingVertical is like setting both of
- paddingTop and paddingBottom.
position in React Native is similar to regular CSS, but
+for more details.
[object Object], [object Object] #Setting paddingVertical is like setting both of
+ paddingTop and paddingBottom.
enum('absolute', 'relative') #position in React Native is similar to regular CSS, but
everything is set to relative by default, so absolute
positioning is always just relative to the parent.
If you want to position a child using specific numbers of logical
pixels relative to its parent, set the child to have absolute
@@ -102,15 +102,15 @@ for more details.
right is the number of logical pixels to offset the right edge of
+ and CSS.
[object Object], [object Object] #right is the number of logical pixels to offset the right edge of
this component.
It works similarly to right in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/right
- for more details of how right affects layout.
top is the number of logical pixels to offset the top edge of
+ for more details of how right affects layout.
[object Object], [object Object] #top is the number of logical pixels to offset the top edge of
this component.
It works similarly to top in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
See https://developer.mozilla.org/en-US/docs/Web/CSS/top
- for more details of how top affects layout.
width sets the width of this component.
It works similarly to width in CSS, but in React Native you
+ for more details of how top affects layout.
[object Object], [object Object] #width sets the width of this component.
It works similarly to width in CSS, but in React Native you
must use points or percentages. Ems and other units are not supported.
- See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details.
zIndex controls which components display on top of others.
+ See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details.
number #zIndex controls which components display on top of others.
Normally, you don't use zIndex. Components render according to
their order in the document tree, so later components draw over
earlier ones. zIndex may be useful if you have animations or custom
@@ -118,7 +118,7 @@ for more details.
direction specifies the directional flow of the user interface.
+ more details.
enum('inherit', 'ltr', 'rtl') #direction specifies the directional flow of the user interface.
The default is inherit, except for root node which will have
value based on the current locale.
See https://facebook.github.io/yoga/docs/rtl/
diff --git a/releases/next/docs/layoutanimation.html b/releases/next/docs/layoutanimation.html
index 11b36ea8faf..e5349f52119 100644
--- a/releases/next/docs/layoutanimation.html
+++ b/releases/next/docs/layoutanimation.html
@@ -2,7 +2,7 @@
next layout happens.
A common way to use this API is to call it before calling setState.
Note that in order to get this to work on Android you need to set the following flags via UIManager:
Schedules an animation to happen on the next layout.
@param config Specifies animation properties:
duration in millisecondscreate, config for animating in new views (see Anim type)update, config for animating views that have been updated
(see Anim type)@param onAnimationDidEnd Called when the animation finished. Only supported on iOS. -@param onError Called on error. Only supported on iOS.
Helper for creating a config for configureNext.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Helper for creating a config for configureNext.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
*AppDelegate.
} else {
return Linking.openURL(url);
}
-}).catch(err => console.error('An error occurred', err));Add a handler to Linking changes by listening to the url event type
+}).catch(err => console.error('An error occurred', err));
Add a handler to Linking changes by listening to the url event type
and providing the handler
Remove a handler by passing the url event type and the handler
Try to open the given url with any of the installed apps.
You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with the installed apps.
NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first.
NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly!
Determine whether or not an installed app can handle a given URL.
NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly!
NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key
-inside Info.plist or canOpenURL will always return false.
@param URL the URL to open
If the app launch was triggered by an app link,
+inside Info.plist or canOpenURL will always return false.
@param URL the URL to open
If the app launch was triggered by an app link,
it will give the link url, otherwise it will give null
NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Rate-limited row rendering - By default, only one row is rendered per
event-loop (customizable with the pageSize prop). This breaks up the
work into smaller chunks to reduce the chance of dropping frames while
-rendering rows.
An instance of ListView.DataSource to use
Flag indicating whether empty section headers should be rendered. In the future release +rendering rows.
ListViewDataSource #An instance of ListView.DataSource to use
bool #Flag indicating whether empty section headers should be rendered. In the future release empty section headers will be rendered by default, and the flag will be deprecated. -If empty sections are not desired to be rendered their indices should be excluded from sectionID object.
How many rows to render on initial component mount. Use this to make +If empty sections are not desired to be rendered their indices should be excluded from sectionID object.
number #How many rows to render on initial component mount. Use this to make it so that the first screen worth of data appears at one time instead of -over the course of multiple frames.
(visibleRows, changedRows) => void
Called when the set of visible rows changes. visibleRows maps
+over the course of multiple frames.
function #(visibleRows, changedRows) => void
Called when the set of visible rows changes. visibleRows maps
{ sectionID: { rowID: true }} for all the visible rows, and
changedRows maps { sectionID: { rowID: true | false }} for the rows
that have changed their visibility, with true indicating visible, and
-false indicating the view has moved out of view.
Called when all rows have been rendered and the list has been scrolled +false indicating the view has moved out of view.
function #Called when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll -event is provided.
Threshold in pixels (virtual, not physical) for calling onEndReached.
Number of rows to render per event loop. Note: if your 'rows' are actually +event is provided.
number #Threshold in pixels (virtual, not physical) for calling onEndReached.
number #Number of rows to render per event loop. Note: if your 'rows' are actually cells, i.e. they don't span the full width of your view (as in the ListViewGridLayoutExample), you should set the pageSize to be a multiple of the number of cells per row, otherwise you're likely to see gaps at -the edge of the ListView as new pages are loaded.
A performance optimization for improving scroll perf of +the edge of the ListView as new pages are loaded.
bool #A performance optimization for improving scroll perf of large lists, used in conjunction with overflow: 'hidden' on the row -containers. This is enabled by default.
() => renderable
The header and footer are always rendered (if these props are provided) +containers. This is enabled by default.
function #() => renderable
The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always -at the bottom of the list, and header at the top, on every render pass.
(rowData, sectionID, rowID, highlightRow) => renderable
Takes a data entry from the data source and its ids and should return +at the bottom of the list, and header at the top, on every render pass.
function #function #(rowData, sectionID, rowID, highlightRow) => renderable
Takes a data entry from the data source and its ids and should return
a renderable component to be rendered as the row. By default the data
is exactly what was put into the data source, but it's also possible to
provide custom extractors. ListView can be notified when a row is
being highlighted by calling highlightRow(sectionID, rowID). This
sets a boolean value of adjacentRowHighlighted in renderSeparator, allowing you
to control the separators above and below the highlighted row. The highlighted
-state of a row can be reset by calling highlightRow(null).
(props) => renderable
A function that returns the scrollable component in which the list rows -are rendered. Defaults to returning a ScrollView with the given props.
(sectionData, sectionID) => renderable
If provided, a header is rendered for this section.
(sectionID, rowID, adjacentRowHighlighted) => renderable
If provided, a renderable component to be rendered as the separator +state of a row can be reset by calling highlightRow(null).
function #(props) => renderable
A function that returns the scrollable component in which the list rows +are rendered. Defaults to returning a ScrollView with the given props.
function #(sectionData, sectionID) => renderable
If provided, a header is rendered for this section.
function #(sectionID, rowID, adjacentRowHighlighted) => renderable
If provided, a renderable component to be rendered as the separator below each row but not the last row if there is a section header below. Take a sectionID and rowID of the row above and whether its adjacent row -is highlighted.
How early to start rendering rows before they come on screen, in -pixels.
An array of child indices determining which children get docked to the +is highlighted.
number #How early to start rendering rows before they come on screen, in +pixels.
[object Object] #An array of child indices determining which children get docked to the
top of the screen when scrolling. For example, passing
stickyHeaderIndices={[0]} will cause the first child to be fixed to the
top of the scroll view. This property is not supported in conjunction
-with horizontal={true}.
Makes the sections headers sticky. The sticky behavior means that it
+with horizontal={true}.
bool #Makes the sections headers sticky. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it -is pushed off the screen by the next section header.
Exports some data, e.g. for perf investigations or analytics.
Scrolls to a given x, y offset, either immediately or with a smooth animation.
See ScrollView#scrollTo.
If this is a vertical ListView scrolls to the bottom. +is pushed off the screen by the next section header.
Exports some data, e.g. for perf investigations or analytics.
Scrolls to a given x, y offset, either immediately or with a smooth animation.
See ScrollView#scrollTo.
If this is a vertical ListView scrolls to the bottom. If this is a horizontal ListView scrolls to the right.
Use scrollToEnd({animated: true}) for smooth animated scrolling,
scrollToEnd({animated: false}) for immediate scrolling.
If no options are passed, animated defaults to true.
See ScrollView#scrollToEnd.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
dataBlob.cloneWithRows.sectionIdentities is an array of identifiers for sections.
ie. ['s1', 's2', ...]. If not provided, it's assumed that the
-keys of dataBlob are the section identities.
Note: this returns a new object!
Returns if the row is dirtied and needs to be rerendered
Gets the data required to render the row.
Gets the rowID at index provided if the dataSource arrays were flattened, +keys of dataBlob are the section identities.
Note: this returns a new object!
Returns if the row is dirtied and needs to be rerendered
Gets the data required to render the row.
Gets the rowID at index provided if the dataSource arrays were flattened, or null of out of range indexes.
Gets the sectionID at index provided if the dataSource arrays were flattened, -or null for out of range indexes.
Returns an array containing the number of rows in each section
Returns if the section header is dirtied and needs to be rerendered
Gets the data required to render the section header
You can edit the content above on GitHub and send us a pull request!
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Returns the device pixel density. Some examples:
Returns the scaling factor for font sizes. This is the ratio that is used to calculate the +<Image source={image} style={{width: 200, height: 100}} />
Returns the device pixel density. Some examples:
Returns the scaling factor for font sizes. This is the ratio that is used to calculate the absolute font size, so any elements that heavily depend on that should use this to do calculations.
If a font scale is not set, this returns the device pixel ratio.
Currently this is only implemented on Android and reflects the user preference set in Settings > Display > Font size, on iOS it will always return the default pixel ratio. @platform android
Converts a layout size (dp) to pixel size (px).
Guaranteed to return an integer number.
Rounds a layout size (dp) to the nearest layout size that corresponds to
an integer number of pixels. For example, on a device with a PixelRatio
of 3, PixelRatio.roundToNearestPixel(8.4) = 8.33, which corresponds to
-exactly (8.33 * 3) = 25 pixels.
// No-op for iOS, but used on the web. Should not be documented.
You can edit the content above on GitHub and send us a pull request!
In iOS, you can specify positions and dimensions for elements with arbitrary precision, for example 29.674825. But, ultimately the physical display only have a fixed number of pixels, for example 640×960 for iPhone 4 or 750×1334 for iPhone 6. iOS tries to be as faithful as possible to the user value by spreading one original pixel into multiple ones to trick the eye. The downside of this technique is that it makes the resulting element look blurry.
In practice, we found out that developers do not want this feature and they have to work around it by doing manual rounding in order to avoid having blurry elements. In React Native, we are rounding all the pixels automatically.
We have to be careful when to do this rounding. You never want to work with rounded and unrounded values at the same time as you're going to accumulate rounding errors. Having even one rounding error is deadly because a one pixel border may vanish or be twice as big.
In React Native, everything in JS and within the layout engine work with arbitrary precision numbers. It's only when we set the position and dimensions of the native element on the main thread that we round. Also, rounding is done relative to the root rather than the parent, again to avoid accumulating rounding errors.
You can edit the content above on GitHub and send us a pull request!
Use ProgressViewIOS to render a UIProgressView on iOS.
The progress value (between 0 and 1).
A stretchable image to display as the progress bar.
The tint color of the progress bar itself.
The progress bar style.
A stretchable image to display behind the progress bar.
The tint color of the progress bar track.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Use ProgressViewIOS to render a UIProgressView on iOS.
number #The progress value (between 0 and 1).
Image.propTypes.source #A stretchable image to display as the progress bar.
string #The tint color of the progress bar itself.
enum('default', 'bar') #The progress bar style.
Image.propTypes.source #A stretchable image to display behind the progress bar.
string #The tint color of the progress bar track.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Schedules the localNotification for future presentation.
details is an object containing:
fireDate : The date and time when the system should deliver the notification.alertBody : The message displayed in the notification alert.alertAction : The "action" displayed beneath an actionable notification. Defaults to "view";soundName : The sound played when the notification is fired (optional).category : The category of this notification, required for actionable notifications (optional).userInfo : An optional object containing additional notification data.applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. Setting the number to 0 removes the icon badge.repeatInterval : The interval to repeat as a string. Possible values: minute, hour, day, week, month, year.Cancels all scheduled localNotifications
Sets the badge number for the app icon on the home screen
Gets the current badge number for the app icon on the home screen
Cancel local notifications.
Optionally restricts the set of canceled notifications to those + }
Schedules the localNotification for future presentation.
details is an object containing:
fireDate : The date and time when the system should deliver the notification.alertBody : The message displayed in the notification alert.alertAction : The "action" displayed beneath an actionable notification. Defaults to "view";soundName : The sound played when the notification is fired (optional).category : The category of this notification, required for actionable notifications (optional).userInfo : An optional object containing additional notification data.applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. Setting the number to 0 removes the icon badge.repeatInterval : The interval to repeat as a string. Possible values: minute, hour, day, week, month, year.Cancels all scheduled localNotifications
Sets the badge number for the app icon on the home screen
Gets the current badge number for the app icon on the home screen
Cancel local notifications.
Optionally restricts the set of canceled notifications to those
notifications whose userInfo fields match the corresponding fields
in the userInfo argument.
Gets the local notifications that are currently scheduled.
Attaches a listener to remote or local notification events while the app is running in the foreground or the background.
Valid events are:
notification : Fired when a remote notification is received. The
@@ -43,11 +43,11 @@ permissions.
The following permissions are supported:alertbadgesoundIf a map is provided to the method, only the permissions with truthy values will be requested.
This method returns a promise that will resolve when the user accepts, rejects, or if the permissions were previously rejected. The promise -resolves to the current state of the permission.
Unregister for all remote notifications received via Apple Push Notification service.
You should call this method in rare circumstances only, such as when a new version of +resolves to the current state of the permission.
Unregister for all remote notifications received via Apple Push Notification service.
You should call this method in rare circumstances only, such as when a new version of the app removes support for all types of remote notifications. Users can temporarily prevent apps from receiving remote notifications through the Notifications section of the Settings app. Apps unregistered through this method can always re-register.
See what push permissions are currently enabled. callback will be
-invoked with a permissions object:
alert :booleanbadge :booleansound :booleanThis method returns a promise that resolves to either the notification
+invoked with a permissions object:
alert :booleanbadge :booleansound :booleanThis method returns a promise that resolves to either the notification
object if the app was launched by a push notification, or null otherwise.
You will never need to instantiate PushNotificationIOS yourself.
Listening to the notification event and invoking
getInitialNotification is sufficient
This method is available for remote notifications that have been received via:
@@ -56,7 +56,7 @@ Listening to the notification event and invoking
calling this block, pass in the fetch result value that best describes
the results of your operation. You must call this handler and should do so
as soon as possible. For a list of possible values, see PushNotificationIOS.FetchResult.
If you do not call this method your background remote notifications could -be throttled, to read more about it see the above documentation link.
An alias for getAlert to get the notification's main message string
Gets the sound string from the aps object
Gets the notification's main message from the aps object
Gets the badge count number from the aps object
Gets the data object on the notif
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
An alias for getAlert to get the notification's main message string
Gets the sound string from the aps object
Gets the notification's main message from the aps object
Gets the badge count number from the aps object
Gets the data object on the notif
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
onRefresh event.Note: refreshing is a controlled prop, this is why it needs to be set to true
-in the onRefresh function otherwise the refresh indicator will stop immediately.
Called when the view starts refreshing.
Whether the view should be indicating an active refresh.
Whether the pull to refresh functionality is enabled.
Progress view top offset
Size of the refresh indicator, see RefreshControl.SIZE.
The title displayed under the refresh indicator.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
onRefresh function otherwise the refresh indicator will stop immediately.function #Called when the view starts refreshing.
bool #Whether the view should be indicating an active refresh.
[object Object] #The colors (at least one) that will be used to draw the refresh indicator.
bool #Whether the pull to refresh functionality is enabled.
[object Object] #The background color of the refresh indicator.
number #Progress view top offset
enum(RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE) #Size of the refresh indicator, see RefreshControl.SIZE.
[object Object] #The color of the refresh indicator.
string #The title displayed under the refresh indicator.
[object Object] #Title color.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
This is where ListView comes into play. ListView renders items lazily, just when they are about to appear. This laziness comes at cost of a more complicated API, which is worth it unless you are rendering a small fixed -set of items.
These styles will be applied to the scroll view content container which +set of items.
StyleSheetPropType(ViewStylePropTypes) #These styles will be applied to the scroll view content container which wraps all of the child views. Example:
return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> @@ -26,65 +26,65 @@ wraps all of the child views. Example:
return ( contentContainer: { paddingVertical: 20 } - });
When true, the scroll view's children are arranged horizontally in a row -instead of vertically in a column. The default value is false.
Determines whether the keyboard gets dismissed in response to a drag. + });
bool #When true, the scroll view's children are arranged horizontally in a row +instead of vertically in a column. The default value is false.
enum('none', 'interactive', 'on-drag') #Determines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'on-drag', the keyboard is dismissed when a drag begins. - 'interactive', the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal. - On android this is not supported and it will have the same behavior as 'none'.
Determines when the keyboard should stay visible after a tap.
enum('always', 'never', 'handled', false, true) #Determines when the keyboard should stay visible after a tap.
Called when scrollable content view of the ScrollView changes.
Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight)
It's implemented using onLayout handler attached to the content container -which this ScrollView renders.
Fires at most once per frame during scrolling. The frequency of the
-events can be controlled using the scrollEventThrottle prop.
When true, the scroll view stops on multiples of the scroll view's size +a children, (or captured by an ancestor).
function #Called when scrollable content view of the ScrollView changes.
Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight)
It's implemented using onLayout handler attached to the content container +which this ScrollView renders.
function #Fires at most once per frame during scrolling. The frequency of the
+events can be controlled using the scrollEventThrottle prop.
bool #When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default -value is false.
A RefreshControl component, used to provide pull-to-refresh +value is false.
element #A RefreshControl component, used to provide pull-to-refresh
functionality for the ScrollView. Only works for vertical ScrollViews
-(horizontal prop must be false).
See RefreshControl.
Experimental: When true, offscreen child views (whose overflow value is
+(horizontal prop must be false).
See RefreshControl.
bool #Experimental: When true, offscreen child views (whose overflow value is
hidden) are removed from their native backing superview when offscreen.
This can improve scrolling performance on long lists. The default value is
-true.
When false, the content does not scroll. -The default value is true.
When true, shows a horizontal scroll indicator. -The default value is true.
When true, shows a vertical scroll indicator. -The default value is true.
(Android-only) Sets the elevation of a view, using Android's underlying +true.
bool #When false, the content does not scroll. +The default value is true.
bool #When true, shows a horizontal scroll indicator. +The default value is true.
bool #When true, shows a vertical scroll indicator. +The default value is true.
style #enum('visible', 'hidden') [object Object] [object Object] number number number [object Object] [object Object] number number [object Object] number enum('solid', 'dotted', 'dashed') [object Object] number number number number number number (Android-only) Sets the elevation of a view, using Android's underlying elevation API. This adds a drop shadow to the item and affects z-order for overlapping views. -Only supported on Android 5.0+, has no effect on earlier versions.
[object Object] #Sometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization -that is not needed in the general case.
Used to override default value of overScroll mode.
Possible values:
'auto' - Default value, allow a user to over-scroll
-this view only if the content is large enough to meaningfully scroll.'always' - Always allow a user to over-scroll this view.'never' - Never allow a user to over-scroll this view.Tag used to log scroll performance on this scroll view. Will force +that is not needed in the general case.
enum('auto', 'always', 'never') #Used to override default value of overScroll mode.
Possible values:
'auto' - Default value, allow a user to over-scroll
+this view only if the content is large enough to meaningfully scroll.'always' - Always allow a user to over-scroll this view.'never' - Never allow a user to over-scroll this view.string #Tag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native -FpsListener for it to be useful.
When true, the scroll view bounces horizontally when it reaches the end +FpsListener for it to be useful.
bool #When true, the scroll view bounces horizontally when it reaches the end
even if the content is smaller than the scroll view itself. The default
-value is true when horizontal={true} and false otherwise.
When true, the scroll view bounces vertically when it reaches the end
+value is true when horizontal={true} and false otherwise.
bool #When true, the scroll view bounces vertically when it reaches the end
even if the content is smaller than the scroll view itself. The default
-value is false when horizontal={true} and true otherwise.
Controls whether iOS should automatically adjust the content inset
+value is false when horizontal={true} and true otherwise.
bool #Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or -tab bar/ toolbar. The default value is true.
When true, the scroll view bounces when it reaches the end of the +tab bar/ toolbar. The default value is true.
bool #When true, the scroll view bounces when it reaches the end of the
content if the content is larger then the scroll view along the axis of
the scroll direction. When false, it disables all bouncing even if
-the alwaysBounce* props are true. The default value is true.
When true, gestures can drive zoom past min/max and the zoom will animate
+the alwaysBounce* props are true. The default value is true.
bool #When true, gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end, otherwise the zoom will not exceed -the limits.
When false, once tracking starts, won't try to drag if the touch moves. -The default value is true.
When true, the scroll view automatically centers the content when the +the limits.
bool #When false, once tracking starts, won't try to drag if the touch moves. +The default value is true.
bool #When true, the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view, this property has no effect. The default -value is false.
The amount by which the scroll view content is inset from the edges
-of the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
Used to manually set the starting scroll offset.
-The default value is {x: 0, y: 0}.
A floating-point number that determines how quickly the scroll view +value is false.
{top: number, left: number, bottom: number, right: number} #The amount by which the scroll view content is inset from the edges
+of the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
PointPropType #Used to manually set the starting scroll offset.
+The default value is {x: 0, y: 0}.
[object Object], [object Object] #A floating-point number that determines how quickly the scroll view
decelerates after the user lifts their finger. You may also use string
shortcuts "normal" and "fast" which match the underlying iOS settings
for UIScrollViewDecelerationRateNormal and
UIScrollViewDecelerationRateFast respectively.
- normal: 0.998 (the default)
- - fast: 0.99
When true, the ScrollView will try to lock to only vertical or horizontal -scrolling while dragging. The default value is false.
The style of the scroll indicators. + - fast: 0.99
bool #When true, the ScrollView will try to lock to only vertical or horizontal +scrolling while dragging. The default value is false.
enum('default', 'black', 'white') #The style of the scroll indicators.
- default (the default), same as black.
- black, scroll indicator is black. This style is good against a white content background.
- - white, scroll indicator is white. This style is good against a black content background.
The maximum allowed zoom scale. The default value is 1.0.
The minimum allowed zoom scale. The default value is 1.0.
Called when a scrolling animation ends.
This controls how often the scroll event will be fired while scrolling
+ - white, scroll indicator is white. This style is good against a black content background.
number #The maximum allowed zoom scale. The default value is 1.0.
number #The minimum allowed zoom scale. The default value is 1.0.
function #Called when a scrolling animation ends.
number #This controls how often the scroll event will be fired while scrolling (as a time interval in ms). A lower number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. @@ -92,23 +92,23 @@ You will not notice a difference between values set between 1-16 as the JS run loop is synced to the screen refresh rate. If you do not need precise scroll position tracking, set this value higher to limit the information being sent across the bridge. The default value is zero, which results in -the scroll event being sent only once each time the view is scrolled.
The amount by which the scroll view indicators are inset from the edges +the scroll event being sent only once each time the view is scrolled.
{top: number, left: number, bottom: number, right: number} #The amount by which the scroll view indicators are inset from the edges
of the scroll view. This should normally be set to the same value as
-the contentInset. Defaults to {0, 0, 0, 0}.
When true, the scroll view scrolls to top when the status bar is tapped. -The default value is true.
When snapToInterval is set, snapToAlignment will define the relationship
+the contentInset. Defaults to {0, 0, 0, 0}.
bool #When true, the scroll view scrolls to top when the status bar is tapped. +The default value is true.
enum('start', 'center', 'end') #When snapToInterval is set, snapToAlignment will define the relationship
of the snapping to the scroll view.
- start (the default) will align the snap at the left (horizontal) or top (vertical)
- center will align the snap in the center
- - end will align the snap at the right (horizontal) or bottom (vertical)
When set, causes the scroll view to stop at multiples of the value of
+ - end will align the snap at the right (horizontal) or bottom (vertical)
number #When set, causes the scroll view to stop at multiples of the value of
snapToInterval. This can be used for paginating through children
that have lengths smaller than the scroll view. Used in combination
-with snapToAlignment.
An array of child indices determining which children get docked to the
+with snapToAlignment.
[object Object] #An array of child indices determining which children get docked to the
top of the screen when scrolling. For example, passing
stickyHeaderIndices={[0]} will cause the first child to be fixed to the
top of the scroll view. This property is not supported in conjunction
-with horizontal={true}.
The current scale of the scroll view content. The default value is 1.0.
Scrolls to a given x, y offset, either immediately or with a smooth animation.
Example:
scrollTo({x: 0; y: 0; animated: true})
Note: The weird function signature is due to the fact that, for historical reasons,
+with horizontal={true}.
number #The current scale of the scroll view content. The default value is 1.0.
Scrolls to a given x, y offset, either immediately or with a smooth animation.
Example:
scrollTo({x: 0; y: 0; animated: true})
Note: The weird function signature is due to the fact that, for historical reasons, the function also accepts separate arguments as as alternative to the options object. -This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
If this is a vertical ScrollView scrolls to the bottom. +This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
If this is a vertical ScrollView scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.
Use scrollToEnd({animated: true}) for smooth animated scrolling,
scrollToEnd({animated: false}) for immediate scrolling.
If no options are passed, animated defaults to true.
Deprecated, use scrollTo instead.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
If false the user won't be able to interact with the control. -Default value is true.
If true, then selecting a segment won't persist visually.
-The onValueChange callback will still work as expected.
Callback that is called when the user taps a segment; -passes the event as an argument
Callback that is called when the user taps a segment; -passes the segment's value as an argument
The index in props.values of the segment to be (pre)selected.
Accent color of the control.
The labels for the control's segment buttons, in order.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
bool #If false the user won't be able to interact with the control. +Default value is true.
bool #If true, then selecting a segment won't persist visually.
+The onValueChange callback will still work as expected.
function #Callback that is called when the user taps a segment; +passes the event as an argument
function #Callback that is called when the user taps a segment; +passes the segment's value as an argument
number #The index in props.values of the segment to be (pre)selected.
string #Accent color of the control.
[object Object] #The labels for the control's segment buttons, in order.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
[object Object] #Sets the drop shadow color
{width: [object Object], height: [object Object]} #Sets the drop shadow offset
number #Sets the drop shadow opacity (multiplied by the color's alpha component)
number #Sets the drop shadow blur radius
You can edit the content above on GitHub and send us a pull request!
Open a dialog to share text content.
In iOS, Returns a Promise which will be invoked an object containing action, activityType.
If the user dismissed the dialog, the Promise will still be resolved with action being Share.dismissedAction
-and all the other keys being undefined.
In Android, Returns a Promise which always be resolved with action being Share.sharedAction.
message - a message to sharetitle - title of the messageurl - an URL to shareAt least one of URL and message is required.
excludedActivityTypestintColordialogTitleThe content was successfully shared.
The dialog has been dismissed. +and all the other keys being undefined.
In Android, Returns a Promise which always be resolved with action being Share.sharedAction.
message - a message to sharetitle - title of the messageurl - an URL to shareAt least one of URL and message is required.
excludedActivityTypestintColordialogTitleThe content was successfully shared.
The dialog has been dismissed. @platform ios
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
A component used to select a single value from a range of values.
If true the user won't be able to move the slider. -Default value is false.
The color used for the track to the right of the button. -Overrides the default blue gradient image on iOS.
Initial maximum value of the slider. Default value is 1.
The color used for the track to the left of the button. -Overrides the default blue gradient image on iOS.
Initial minimum value of the slider. Default value is 0.
Callback called when the user finishes changing the value (e.g. when -the slider is released).
Callback continuously called while the user is dragging the slider.
Step value of the slider. The value should be +
A component used to select a single value from a range of values.
bool #If true the user won't be able to move the slider. +Default value is false.
[object Object] #The color used for the track to the right of the button. +Overrides the default blue gradient image on iOS.
number #Initial maximum value of the slider. Default value is 1.
[object Object] #The color used for the track to the left of the button. +Overrides the default blue gradient image on iOS.
number #Initial minimum value of the slider. Default value is 0.
function #Callback called when the user finishes changing the value (e.g. when +the slider is released).
function #Callback continuously called while the user is dragging the slider.
number #Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). -Default value is 0.
Used to style and layout the Slider. See StyleSheet.js and
-ViewStylePropTypes.js for more info.
Used to locate this view in UI automation tests.
Initial value of the slider. The value should be between minimumValue +Default value is 0.
[object Object] #Used to style and layout the Slider. See StyleSheet.js and
+ViewStylePropTypes.js for more info.
string #Used to locate this view in UI automation tests.
number #Initial value of the slider. The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. Default value is 0.
This is not a controlled component, you don't need to update the -value during dragging.
Assigns a maximum track image. Only static images are supported. The -leftmost pixel of the image will be stretched to fill the track.
Assigns a minimum track image. Only static images are supported. The -rightmost pixel of the image will be stretched to fill the track.
Sets an image for the thumb. Only static images are supported.
Assigns a single image for the track. Only static images are supported. +value during dragging.
[object Object] #Color of the foreground switch grip.
Image.propTypes.source #Assigns a maximum track image. Only static images are supported. The +leftmost pixel of the image will be stretched to fill the track.
Image.propTypes.source #Assigns a minimum track image. Only static images are supported. The +rightmost pixel of the image will be stretched to fill the track.
Image.propTypes.source #Sets an image for the thumb. Only static images are supported.
Image.propTypes.source #Assigns a single image for the track. Only static images are supported. The center pixel of the image will be stretched to fill the track.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
beginEvent/endEvent for starting and then ending a profile within the same call stack frame
beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either +
beginEvent/endEvent for starting and then ending a profile within the same call stack frame
beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either occur on another thread or out of the current stack frame, eg await the returned cookie variable should be used as input into the endAsyncEvent call to end the profile
counterEvent registers the value to the profileName on the systrace timeline
Relay profiles use await calls, so likely occur out of current stack frame -therefore async variant of profiling is used
This is not called by default due to perf overhead but it's useful +therefore async variant of profiling is used
This is not called by default due to perf overhead but it's useful if you want to find traces which spend too much time in JSON.
Measures multiple methods of a class. For example, you can do: Systrace.measureMethods(JSON, 'JSON', ['parse', 'stringify']);
@param object @param objectName diff --git a/releases/next/docs/tabbarios-item.html b/releases/next/docs/tabbarios-item.html index f9347b3ee7d..cfa82701238 100644 --- a/releases/next/docs/tabbarios-item.html +++ b/releases/next/docs/tabbarios-item.html @@ -1,11 +1,11 @@ -
Little red bubble that sits at the top right of the icon.
A custom icon for the tab. It is ignored when a system icon is defined.
Callback when this tab is being selected, you should change the state of your -component to set selected={true}.
If set to true it renders the image as original, -it defaults to being displayed as a template
It specifies whether the children are visible or not. If you see a -blank content, you probably forgot to add a selected one.
A custom icon when the tab is selected. It is ignored when a system -icon is defined. If left empty, the icon will be tinted in blue.
React style object.
Items comes with a few predefined system icons. Note that if you are +
[object Object], [object Object] #Little red bubble that sits at the top right of the icon.
[object Object] #Background color for the badge. Available since iOS 10.
Image.propTypes.source #A custom icon for the tab. It is ignored when a system icon is defined.
function #Callback when this tab is being selected, you should change the state of your +component to set selected={true}.
bool #If set to true it renders the image as original, +it defaults to being displayed as a template
bool #It specifies whether the children are visible or not. If you see a +blank content, you probably forgot to add a selected one.
Image.propTypes.source #A custom icon when the tab is selected. It is ignored when a system +icon is defined. If left empty, the icon will be tinted in blue.
[object Object] #React style object.
enum('bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated') #Items comes with a few predefined system icons. Note that if you are using them, the title and selectedIcon will be overridden with the -system ones.
Text that appears under the icon. It is ignored when a system icon -is defined.
(Apple TV only)* When set to true, this view will be focusable +system ones.
string #Text that appears under the icon. It is ignored when a system icon +is defined.
bool #(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote.
You can edit the content above on GitHub and send us a pull request!
Specifies tab bar item positioning. Available values are: +
$FlowFixMe #Background color of the tab bar
[object Object] | [object Object] | [object Object] #Specifies tab bar item positioning. Available values are:
- fill - distributes items across the entire width of the tab bar
- center - centers item in the available tab bar space
- auto (default) - distributes items dynamically according to the
user interface idiom. In a horizontally compact environment (e.g. iPhone 5)
this value defaults to fill, in a horizontally regular one (e.g. iPad)
-it defaults to center.
A Boolean value that indicates whether the tab bar is translucent
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
$FlowFixMe #$FlowFixMe #Color of the currently selected tab icon
boolean #A Boolean value that indicates whether the tab bar is translucent
$FlowFixMe #Color of unselected tab icons. Available since iOS 10.
$FlowFixMe #Color of text on unselected tabs
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
This document is about running tests on React Native itself. If you're interested in testing a React Native app, check out the React Native Tutorial on the Jest website.
The React Native repo has several tests you can run to verify you haven't caused a regression with your PR. These tests are run with the Travis and CircleCI continuous integration systems, which will automatically annotate pull requests with the test results.
Whenever you are fixing a bug or adding new functionality to React Native, you should add a test that covers it. Depending on the change you're making, there are different types of tests that may be appropriate.
Jest tests are JavaScript-only tests run on the command line with node. You can run the existing React Native jest tests with:
It's a good idea to add a Jest test when you are working on a change that only modifies JavaScript code.
The tests themselves live in the __tests__ directories of the files they test. See TouchableHighlight-test.js for a basic example.
The Android unit tests do not run in an emulator. They just use a normal Java installation. You do need to install Java 8. In particular, the default OS X Java install is insufficient.
You also need to install the Buck build tool.
To run the Android unit tests:
It's a good idea to add an Android unit test whenever you are working on code that can be tested by Java code alone. The Android unit tests live under ReactAndroid/src/tests, so you can browse through that directory for good examples of tests.
To run the integration tests, you need to install the Android NDK. See Prerequisites.
You also need to install the Buck build tool.
We recommend running the Android integration tests in an emulator, although you can also use a real Android device. It's a good idea to keep the emulator running with a visible window. That way if your tests stall, you can look at the emulator to debug.
Some devices and some emulator configurations may not work with the tests. We do maintain an emulator configuration that works, as the standard for testing. To run this emulator config:
This document is about running tests on React Native itself. If you're interested in testing a React Native app, check out the React Native Tutorial on the Jest website.
The React Native repo has several tests you can run to verify you haven't caused a regression with your PR. These tests are run with the Travis and CircleCI continuous integration systems, which will automatically annotate pull requests with the test results.
Whenever you are fixing a bug or adding new functionality to React Native, you should add a test that covers it. Depending on the change you're making, there are different types of tests that may be appropriate.
Jest tests are JavaScript-only tests run on the command line with node. You can run the existing React Native jest tests with:
It's a good idea to add a Jest test when you are working on a change that only modifies JavaScript code.
The tests themselves live in the __tests__ directories of the files they test. See TouchableHighlight-test.js for a basic example.
You should also make sure your code passes Flow tests. These can be run using:
The Android unit tests do not run in an emulator. They just use a normal Java installation. The default macOS Java install is insufficient, you may need to install Java 8 (JDK8). You can type javac -version in a terminal to see what version you have:
The version string 1.8.x_xxx corresponds to JDK 8.
You also need to install the Buck build tool.
To run the Android unit tests:
It's a good idea to add an Android unit test whenever you are working on code that can be tested by Java code alone. The Android unit tests live under ReactAndroid/src/tests, so you can browse through that directory for good examples of tests.
To run the integration tests, you need to install the Android NDK. See Prerequisites.
You also need to install the Buck build tool.
We recommend running the Android integration tests in an emulator, although you can also use a real Android device. It's a good idea to keep the emulator running with a visible window. That way if your tests stall, you can look at the emulator to debug.
Some devices and some emulator configurations may not work with the tests. We do maintain an emulator configuration that works, as the standard for testing. To run this emulator config:
Once you have an emulator running, to run the integration tests:
The integration tests should only take a few minutes to run on a modern developer machine.
It's a good idea to add an Android integration test whenever you are working on code that needs both JavaScript and Java to be tested in conjunction. The Android integration tests live under ReactAndroid/src/androidTest, so you can browse through that directory for good examples of tests.
React Native provides facilities to make it easier to test integrated components that require both native and JS components to communicate across the bridge. The two main components are RCTTestRunner and RCTTestModule. RCTTestRunner sets up the ReactNative environment and provides facilities to run the tests as XCTestCases in Xcode (runTest:module is the simplest method). RCTTestModule is exported to JS as NativeModules.TestModule. The tests themselves are written in JS, and must call TestModule.markTestCompleted() when they are done, otherwise the test will timeout and fail. Test failures are primarily indicated by throwing a JS exception. It is also possible to test error conditions with runTest:module:initialProps:expectErrorRegex: or runTest:module:initialProps:expectErrorBlock: which will expect an error to be thrown and verify the error matches the provided criteria. See IntegrationTestHarnessTest.js, UIExplorerIntegrationTests.m, and IntegrationTestsApp.js for example usage and integration points.
You can run integration tests locally with cmd+U in the IntegrationTest and UIExplorer apps in Xcode.
A common type of integration test is the snapshot test. These tests render a component, and verify snapshots of the screen against reference images using TestModule.verifySnapshot(), using the FBSnapshotTestCase library behind the scenes. Reference images are recorded by setting recordMode = YES on the RCTTestRunner, then running the tests. Snapshots will differ slightly between 32 and 64 bit, and various OS versions, so it's recommended that you enforce tests are run with the correct configuration. It's also highly recommended that all network data be mocked out, along with other potentially troublesome dependencies. See SimpleSnapshotTest for a basic example.
If you make a change that affects a snapshot test in a PR, such as adding a new example case to one of the examples that is snapshotted, you'll need to re-record the snapshot reference image. To do this, simply change to _runner.recordMode = YES; in UIExplorer/UIExplorerSnapshotTests.m, re-run the failing tests, then flip record back to NO and submit/update your PR and wait to see if the Travis build passes.
You can edit the content above on GitHub and send us a pull request!
This exposes the native ToastAndroid module as a JS module. This has a function 'show' which takes the following parameters:
There is also a function showWithGravity to specify the layout gravity. May be
ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER.
Basic usage:
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Sets possible actions on the toolbar as part of the action menu. These are displayed as icons +}
[object Object] #Sets possible actions on the toolbar as part of the action menu. These are displayed as icons or text on the right side of the widget. If they don't fit they are placed in an 'overflow' menu.
This property takes an array of objects, where each object has the following keys:
title: required, the title of this actionicon: the icon for this action, e.g. require('./some_icon.png')show: when to show this action as an icon or hide it in the overflow menu: always,
-ifRoom or nevershowWithText: boolean, whether to show text alongside the icon or notSets the content inset for the toolbar ending edge.
The content inset affects the valid area for Toolbar content other than
+ifRoom or never
showWithText: boolean, whether to show text alongside the icon or notnumber #Sets the content inset for the toolbar ending edge.
The content inset affects the valid area for Toolbar content other than the navigation button and menu. Insets define the minimum margin for these components and can be used to effectively align Toolbar content -along well-known gridlines.
Sets the content inset for the toolbar starting edge.
The content inset affects the valid area for Toolbar content other than +along well-known gridlines.
number #Sets the content inset for the toolbar starting edge.
The content inset affects the valid area for Toolbar content other than the navigation button and menu. Insets define the minimum margin for these components and can be used to effectively align Toolbar content -along well-known gridlines.
Sets the toolbar logo.
Sets the navigation icon.
Callback that is called when an action is selected. The only argument that is passed to the -callback is the position of the action in the actions array.
Callback called when the icon is selected.
Sets the overflow icon.
Used to set the toolbar direction to RTL. +along well-known gridlines.
optionalImageSource #Sets the toolbar logo.
optionalImageSource #Sets the navigation icon.
function #Callback that is called when an action is selected. The only argument that is passed to the +callback is the position of the action in the actions array.
function #Callback called when the icon is selected.
optionalImageSource #Sets the overflow icon.
bool #Used to set the toolbar direction to RTL. In addition to this property you need to add
android:supportsRtl="true"
to your application AndroidManifest.xml and then call
setLayoutDirection(LayoutDirection.RTL) in your MainActivity
-onCreate method.
Sets the toolbar subtitle.
Used to locate this view in end-to-end tests.
Sets the toolbar title.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
onCreate method.string #Sets the toolbar subtitle.
[object Object] #Sets the toolbar subtitle color.
string #Used to locate this view in end-to-end tests.
string #Sets the toolbar title.
[object Object] #Sets the toolbar title color.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Example /> </TouchableHighlight> ); -},
Determines what the opacity of the wrapped view should be when touch is -active.
Called immediately after the underlay is hidden
Called immediately after the underlay is shown
(Apple TV only) TV preferred focus (see documentation for the View component).
(Apple TV only) Object with properties to control Apple TV parallax effects.
enabled: If true, parallax effects are enabled. Defaults to true. +},
number #Determines what the opacity of the wrapped view should be when touch is +active.
function #Called immediately after the underlay is hidden
function #Called immediately after the underlay is shown
[object Object] #[object Object] #The color of the underlay that will show through when the touch is +active.
bool #(Apple TV only) TV preferred focus (see documentation for the View component).
object #(Apple TV only) Object with properties to control Apple TV parallax effects.
enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. diff --git a/releases/next/docs/touchablenativefeedback.html b/releases/next/docs/touchablenativefeedback.html index abb62de0641..d55cde61d19 100644 --- a/releases/next/docs/touchablenativefeedback.html +++ b/releases/next/docs/touchablenativefeedback.html @@ -13,21 +13,21 @@ RCTView node with some additional properties set.
Background drawable of n </View> </TouchableNativeFeedback> ); -},
Determines the type of background drawable that's going to be used to +},
backgroundPropType #Determines the type of background drawable that's going to be used to
display feedback. It takes an object with type property and extra data
depending on the type. It's recommended to use one of the static
-methods to generate that dictionary.
Set to true to add the ripple effect to the foreground of the view, instead of the +methods to generate that dictionary.
bool #Set to true to add the ripple effect to the foreground of the view, instead of the background. This is useful if one of your child views has a background of its own, or you're e.g. displaying images, and you don't want the ripple to be covered by them.
Check TouchableNativeFeedback.canUseNativeForeground() first, as this is only available on Android 6.0 and above. If you try to use this on older versions you will get a warning and -fallback to background.
Creates an object that represents android theme's default background for -selectable elements (?android:attr/selectableItemBackground).
Creates an object that represent android theme's default background for borderless +fallback to background.
Creates an object that represents android theme's default background for +selectable elements (?android:attr/selectableItemBackground).
Creates an object that represent android theme's default background for borderless selectable elements (?android:attr/selectableItemBackgroundBorderless). -Available on android API level 21+.
Creates an object that represents ripple drawable with specified color (as a +Available on android API level 21+.
Creates an object that represents ripple drawable with specified color (as a
string). If property borderless evaluates to true the ripple will
render outside of the view bounds (see native actionbar buttons as an
example of that behavior). This background type is available on Android
-API level 21+.
| Name and Type | Description |
|---|---|
| color string | The ripple color |
| borderless boolean | If the ripple can render outside it's bounds |
You can edit the content above on GitHub and send us a pull request!
Do not use unless you have a very good reason. All the elements that respond to press should have a visual feedback when touched.
TouchableWithoutFeedback supports only one child. -If you wish to have several child components, wrap them in a View.
Delay in ms, from onPressIn, before onLongPress is called.
Delay in ms, from the start of the touch, before onPressIn is called.
Delay in ms, from the release of the touch, before onPressOut is called.
If true, disable all interactions for this component.
This defines how far your touch can start away from the button. This is +If you wish to have several child components, wrap them in a View.
View.AccessibilityComponentType #[object Object], [object Object] #bool #number #Delay in ms, from onPressIn, before onLongPress is called.
number #Delay in ms, from the start of the touch, before onPressIn is called.
number #Delay in ms, from the release of the touch, before onPressOut is called.
bool #If true, disable all interactions for this component.
{top: number, left: number, bottom: number, right: number} #This defines how far your touch can start away from the button. This is
added to pressRetentionOffset when moving off of the button.
NOTE
The touch area never extends past the parent view bounds and the Z-index
of sibling views always takes precedence if a touch hits two overlapping
-views.
Invoked on mount and layout changes with
{nativeEvent: {layout: {x, y, width, height}}}
Called when the touch is released, but not if cancelled (e.g. by a scroll -that steals the responder lock).
When the scroll view is disabled, this defines how far your touch may +views.
function #Invoked on mount and layout changes with
{nativeEvent: {layout: {x, y, width, height}}}
function #function #Called when the touch is released, but not if cancelled (e.g. by a scroll +that steals the responder lock).
function #function #{top: number, left: number, bottom: number, right: number} #When the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view diff --git a/releases/next/docs/transforms.html b/releases/next/docs/transforms.html index 80c93a96a09..8e59af24b26 100644 --- a/releases/next/docs/transforms.html +++ b/releases/next/docs/transforms.html @@ -1,4 +1,4 @@ -
You can edit the content above on GitHub and send us a pull request!
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
NOTE: VibrationIOS is being deprecated. Use Vibration instead.
The Vibration API is exposed at VibrationIOS.vibrate(). On iOS, calling this
function will trigger a one second vibration. The vibration is asynchronous
so this method will return immediately.
There will be no effect on devices that do not support Vibration, eg. the iOS -simulator.
Vibration patterns are currently unsupported.
@deprecated
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Vibration patterns are currently unsupported.
@deprecated
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Views are designed to be used withStyleSheetfor clarity and performance, although inline styles are also supported.
For View responder props (e.g., onResponderMove), the synthetic touch event passed to them
-are of the following form:
nativeEventchangedTouches - Array of all touch events that have changed since the last event.identifier - The ID of the touch.locationX - The X position of the touch, relative to the element.locationY - The Y position of the touch, relative to the element.pageX - The X position of the touch, relative to the root element.pageY - The Y position of the touch, relative to the root element.target - The node id of the element receiving the touch event.timestamp - A time identifier for the touch, useful for velocity calculation.touches - Array of all current touches on the screen.Overrides the text that's read by the screen reader when the user interacts +are of the following form:
nativeEventchangedTouches - Array of all touch events that have changed since the last event.identifier - The ID of the touch.locationX - The X position of the touch, relative to the element.locationY - The Y position of the touch, relative to the element.pageX - The X position of the touch, relative to the root element.pageY - The Y position of the touch, relative to the root element.target - The node id of the element receiving the touch event.timestamp - A time identifier for the touch, useful for velocity calculation.touches - Array of all current touches on the screen.node #Overrides the text that's read by the screen reader when the user interacts
with the element. By default, the label is constructed by traversing all the
-children and accumulating all the Text nodes separated by space.
When true, indicates that the view is an accessibility element. By default,
-all the touchable elements are accessible.
This defines how far a touch event can start away from the view.
+children and accumulating all the Text nodes separated by space.
bool #When true, indicates that the view is an accessibility element. By default,
+all the touchable elements are accessible.
{top: number, left: number, bottom: number, right: number} #This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels.
For example, if a touchable view has a height of 20 the touchable height can be extended to
40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}}
The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping -views.
When accessible is true, the system will try to invoke this function
-when the user performs accessibility tap gesture.
Invoked on mount and layout changes with:
{nativeEvent: { layout: {x, y, width, height}}}
This event is fired immediately once the layout has been calculated, but +views.
function #When accessible is true, the system will try to invoke this function
+when the user performs accessibility tap gesture.
function #Invoked on mount and layout changes with:
{nativeEvent: { layout: {x, y, width, height}}}
This event is fired immediately once the layout has been calculated, but the new layout may not yet be reflected on the screen at the time the -event is received, especially if a layout animation is in progress.
When accessible is true, the system will invoke this function when the
-user performs the magic tap gesture.
Does this view want to "claim" touch responsiveness? This is called for every touch move on +event is received, especially if a layout animation is in progress.
function #When accessible is true, the system will invoke this function when the
+user performs the magic tap gesture.
function #Does this view want to "claim" touch responsiveness? This is called for every touch move on
the View when it is not the responder.
View.props.onMoveShouldSetResponder: (event) => [true | false], where event is a
-synthetic touch event as described above.
If a parent View wants to prevent a child View from becoming responder on a move,
+synthetic touch event as described above.
function #If a parent View wants to prevent a child View from becoming responder on a move,
it should have this handler which returns true.
View.props.onMoveShouldSetResponderCapture: (event) => [true | false], where event is a
-synthetic touch event as described above.
The View is now responding for touch events. This is the time to highlight and show the user +synthetic touch event as described above.
function #The View is now responding for touch events. This is the time to highlight and show the user what is happening.
View.props.onResponderGrant: (event) => {}, where event is a synthetic touch event as
-described above.
The user is moving their finger.
View.props.onResponderMove: (event) => {}, where event is a synthetic touch event as
-described above.
Another responder is already active and will not release it to that View asking to be
+described above.
function #The user is moving their finger.
View.props.onResponderMove: (event) => {}, where event is a synthetic touch event as
+described above.
function #Another responder is already active and will not release it to that View asking to be
the responder.
View.props.onResponderReject: (event) => {}, where event is a synthetic touch event as
-described above.
Fired at the end of the touch.
View.props.onResponderRelease: (event) => {}, where event is a synthetic touch event as
-described above.
The responder has been taken from the View. Might be taken by other views after a call to
+described above.
function #Fired at the end of the touch.
View.props.onResponderRelease: (event) => {}, where event is a synthetic touch event as
+described above.
function #The responder has been taken from the View. Might be taken by other views after a call to
onResponderTerminationRequest, or might be taken by the OS without asking (e.g., happens
with control center/ notification center on iOS)
View.props.onResponderTerminate: (event) => {}, where event is a synthetic touch event as
-described above.
Some other View wants to become responder and is asking this View to release its
+described above.
function #Some other View wants to become responder and is asking this View to release its
responder. Returning true allows its release.
View.props.onResponderTerminationRequest: (event) => {}, where event is a synthetic touch
-event as described above.
Does this view want to become responder on the start of a touch?
View.props.onStartShouldSetResponder: (event) => [true | false], where event is a
-synthetic touch event as described above.
If a parent View wants to prevent a child View from becoming responder on a touch start,
+event as described above.
function #Does this view want to become responder on the start of a touch?
View.props.onStartShouldSetResponder: (event) => [true | false], where event is a
+synthetic touch event as described above.
function #If a parent View wants to prevent a child View from becoming responder on a touch start,
it should have this handler which returns true.
View.props.onStartShouldSetResponderCapture: (event) => [true | false], where event is a
-synthetic touch event as described above.
Controls whether the View can be the target of touch events.
'auto': The View can be the target of touch events.'none': The View is never the target of touch events.'box-none': The View is never the target of touch events but it's
+synthetic touch event as described above.enum('box-none', 'none', 'box-only', 'auto') #Controls whether the View can be the target of touch events.
'auto': The View can be the target of touch events.'none': The View is never the target of touch events.'box-none': The View is never the target of touch events but it's
subviews can be. It behaves like if the view had the following classes
in CSS:pointerEvents on style. On some platforms, we would need to
implement it as a className anyways. Using style or not is an
-implementation detail of the platform.This is a special performance property exposed by RCTView and is useful
+implementation detail of the platform.
bool #This is a special performance property exposed by RCTView and is useful
for scrolling content when there are many subviews, most of which are
offscreen. For this property to be effective, it must be applied to a
view that contains many subviews that extend outside its bound. The
subviews must also have overflow: hidden, as should the containing view
-(or one of its superviews).
(Android-only) Sets the elevation of a view, using Android's underlying +(or one of its superviews).
style #enum('visible', 'hidden') [object Object] [object Object] number number number [object Object] [object Object] number number [object Object] number enum('solid', 'dotted', 'dashed') [object Object] number number number number number number (Android-only) Sets the elevation of a view, using Android's underlying elevation API. This adds a drop shadow to the item and affects z-order for overlapping views. -Only supported on Android 5.0+, has no effect on earlier versions.
Used to locate this view in end-to-end tests.
This disables the 'layout-only view removal' optimization for this view!
Indicates to accessibility services to treat UI component like a -native one. Works for Android only.
Possible values are one of:
'none''button''radiobutton_checked''radiobutton_unchecked'Indicates to accessibility services whether the user should be notified +Only supported on Android 5.0+, has no effect on earlier versions.
string #Used to locate this view in end-to-end tests.
This disables the 'layout-only view removal' optimization for this view!
AccessibilityComponentTypes #Indicates to accessibility services to treat UI component like a +native one. Works for Android only.
Possible values are one of:
'none''button''radiobutton_checked''radiobutton_unchecked'enum('none', 'polite', 'assertive') #Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. Possible values:
'none' - Accessibility services should not announce changes to this view.'polite'- Accessibility services should announce changes to this view.'assertive' - Accessibility services should interrupt ongoing speech to immediately announce changes to this view.See the Android View docs
-for reference.
Views that are only used to layout their children or otherwise don't draw +for reference.
bool #Views that are only used to layout their children or otherwise don't draw
anything may be automatically removed from the native hierarchy as an
optimization. Set this property to false to disable this optimization and
-ensure that this View exists in the native view hierarchy.
Controls how view is important for accessibility which is if it
+ensure that this View exists in the native view hierarchy.
enum('auto', 'yes', 'no', 'no-hide-descendants') #Controls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only.
Possible values:
'auto' - The system determines whether the view is important for accessibility -
default (recommended).'yes' - The view is important for accessibility.'no' - The view is not important for accessibility.'no-hide-descendants' - The view is not important for accessibility,
nor are any of its descendant views.See the Android importantForAccessibility docs
-for reference.
Whether this View needs to rendered offscreen and composited with an alpha
+for reference.
bool #Whether this View needs to rendered offscreen and composited with an alpha
in order to preserve 100% correct colors and blending behavior. The default
(false) falls back to drawing the component and its children with an alpha
applied to the paint used to draw each element instead of rendering the full
@@ -98,19 +98,19 @@ animation, consider combining it with renderToHardwareTextureAndroid if the
view contents are static (i.e. it doesn't need to be redrawn each frame).
If that property is enabled, this View will be rendered off-screen once,
saved in a hardware texture, and then composited onto the screen with an alpha
-each frame without having to switch rendering targets on the GPU.
Whether this View should render itself (and all of its children) into a
+each frame without having to switch rendering targets on the GPU.
bool #Whether this View should render itself (and all of its children) into a
single hardware texture on the GPU.
On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the -interaction/animation.
Provides additional traits to screen reader. By default no traits are +interaction/animation.
[object Object], [object Object] #Provides additional traits to screen reader. By default no traits are provided unless specified otherwise in element.
You can provide one trait or an array of many traits.
Possible values for AccessibilityTraits are:
'none' - The element has no traits.'button' - The element should be treated as a button.'link' - The element should be treated as a link.'header' - The element is a header that divides content into sections.'search' - The element should be treated as a search field.'image' - The element should be treated as an image.'selected' - The element is selected.'plays' - The element plays sound.'key' - The element should be treated like a keyboard key.'text' - The element should be treated as text.'summary' - The element provides app summary information.'disabled' - The element is disabled.'frequentUpdates' - The element frequently changes its value.'startsMedia' - The element starts a media session.'adjustable' - The element allows adjustment over a range of values.'allowsDirectInteraction' - The element allows direct touch interaction for VoiceOver users.'pageTurn' - Informs VoiceOver that it should scroll to the next page when it finishes reading the contents of the element.See the Accessibility guide -for more information.
A value indicating whether VoiceOver should ignore the elements +for more information.
bool #A value indicating whether VoiceOver should ignore the elements
within views that are siblings of the receiver.
Default is false.
See the Accessibility guide -for more information.
Whether this View should be rendered as a bitmap before compositing.
On iOS, this is useful for animations and interactions that do not +for more information.
bool #Whether this View should be rendered as a bitmap before compositing.
On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite diff --git a/releases/next/docs/viewpagerandroid.html b/releases/next/docs/viewpagerandroid.html index 850cf31e6ff..a4c5c4da638 100644 --- a/releases/next/docs/viewpagerandroid.html +++ b/releases/next/docs/viewpagerandroid.html @@ -25,25 +25,25 @@ child.
Example:
Index of initial page that should be selected. Use setPage method to
-update the page, and onPageSelected to monitor page changes
Determines whether the keyboard gets dismissed in response to a drag. +}
number #Index of initial page that should be selected. Use setPage method to
+update the page, and onPageSelected to monitor page changes
[object Object] | [object Object] #Determines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - - 'on-drag', the keyboard is dismissed when a drag begins.
Executed when transitioning between pages (ether because of animation for + - 'on-drag', the keyboard is dismissed when a drag begins.
Function #Executed when transitioning between pages (ether because of animation for
the requested page change or when user is swiping/dragging between pages)
The event.nativeEvent object for this callback will carry following data:
- position - index of first page from the left that is currently visible
- offset - value from range [0,1) describing stage between page transitions.
Value x means that (1 - x) fraction of the page at "position" index is
- visible, and x fraction of the next page is visible.
Function called when the page scrolling state has changed. + visible, and x fraction of the next page is visible.
Function #Function called when the page scrolling state has changed. The page scrolling state can be in 3 states: - idle, meaning there is no interaction with the page scroller happening at the time - dragging, meaning there is currently an interaction with the page scroller - settling, meaning that there was an interaction with the page scroller, and the - page scroller is now finishing it's closing or opening animation
This callback will be called once ViewPager finish navigating to selected page + page scroller is now finishing it's closing or opening animation
Function #This callback will be called once ViewPager finish navigating to selected page
(when user swipes between pages). The event.nativeEvent object passed to this
callback will have following fields:
- - position - index of page that has been selected
Blank space to show between pages. This is only visible while scrolling, pages are still -edge-to-edge.
When false, the content does not scroll. + - position - index of page that has been selected
number #Blank space to show between pages. This is only visible while scrolling, pages are still +edge-to-edge.
boolean #When false, the content does not scroll. The default value is true.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
You can use this component to navigate back and forth in the web view's -history and configure various properties for the web content.
Controls whether to adjust the content inset for web views that are +history and configure various properties for the web content.
bool #Controls whether to adjust the content inset for web views that are
placed behind a navigation bar, tab bar, or toolbar. The default value
-is true.
The amount by which the web view content is inset from the edges of -the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
DeprecatedUse the source prop instead.
Set this to provide JavaScript that will be injected into the web page -when the view loads.
Boolean that determines whether HTML5 audio and video requires the user
-to tap them before they start playing. The default value is true.
Function that is invoked when the WebView load fails.
Function that is invoked when the WebView has finished loading.
Function that is invoked when the WebView load succeeds or fails.
Function that is invoked when the WebView starts loading.
A function that is invoked when the webview calls window.postMessage.
+is true.
{top: number, left: number, bottom: number, right: number} #The amount by which the web view content is inset from the edges of +the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
string #
DeprecatedUse the source prop instead.
string #Set this to provide JavaScript that will be injected into the web page +when the view loads.
bool #Boolean that determines whether HTML5 audio and video requires the user
+to tap them before they start playing. The default value is true.
function #Function that is invoked when the WebView load fails.
function #Function that is invoked when the WebView has finished loading.
function #Function that is invoked when the WebView load succeeds or fails.
function #Function that is invoked when the WebView starts loading.
function #A function that is invoked when the webview calls window.postMessage.
Setting this property will inject a postMessage global into your
webview, but will still call pre-existing values of postMessage.
window.postMessage accepts one argument, data, which will be
available on the event object, event.nativeEvent.data. data
-must be a string.
Function that is invoked when the WebView loading starts or ends.
Function that returns a view to show if there's an error.
Function that returns a loading indicator.
Boolean that controls whether the web content is scaled to fit +must be a string.
function #Function that is invoked when the WebView loading starts or ends.
function #Function that returns a view to show if there's an error.
function #Function that returns a loading indicator.
bool #Boolean that controls whether the web content is scaled to fit
the view and enables the user to change the scale. The default value
-is true.
Loads static html or a uri (with optional headers) in the WebView.
Boolean value that forces the WebView to show the loading view
-on the first load.
The style to apply to the WebView.
DeprecatedUse the source prop instead.
Boolean value to control whether DOM Storage is enabled. Used only in -Android.
Boolean value to enable JavaScript in the WebView. Used on Android only
-as JavaScript is enabled by default on iOS. The default value is true.
Sets the user-agent for the WebView.
Boolean that determines whether HTML5 videos play inline or use the
+is true.
[object Object], [object Object], [object Object] #Loads static html or a uri (with optional headers) in the WebView.
bool #Boolean value that forces the WebView to show the loading view
+on the first load.
[object Object] #The style to apply to the WebView.
string #
DeprecatedUse the source prop instead.
bool #Boolean value to control whether DOM Storage is enabled. Used only in +Android.
bool #Boolean value to enable JavaScript in the WebView. Used on Android only
+as JavaScript is enabled by default on iOS. The default value is true.
string #Sets the user-agent for the WebView.
bool #Boolean that determines whether HTML5 videos play inline or use the
native full-screen controller. The default value is false.
NOTE : In order for video to play inline, not only does this
property need to be set to true, but the video element in the HTML
-document must also include the webkit-playsinline attribute.
Boolean value that determines whether the web view bounces
-when it reaches the edge of the content. The default value is true.
Determines the types of data converted to clickable URLs in the web view’s content. -By default only phone numbers are detected.
You can provide one type or an array of many types.
Possible values for dataDetectorTypes are:
'phoneNumber''link''address''calendarEvent''none''all'A floating-point number that determines how quickly the scroll view
+document must also include the webkit-playsinline attribute.
bool #Boolean value that determines whether the web view bounces
+when it reaches the edge of the content. The default value is true.
[object Object], [object Object] #Determines the types of data converted to clickable URLs in the web view’s content. +By default only phone numbers are detected.
You can provide one type or an array of many types.
Possible values for dataDetectorTypes are:
'phoneNumber''link''address''calendarEvent''none''all'ScrollView.propTypes.decelerationRate #A floating-point number that determines how quickly the scroll view
decelerates after the user lifts their finger. You may also use the
string shortcuts "normal" and "fast" which match the underlying iOS
settings for UIScrollViewDecelerationRateNormal and
-UIScrollViewDecelerationRateFast respectively:
Function that allows custom handling of any web view requests. Return
+UIScrollViewDecelerationRateFast respectively:
function #Function that allows custom handling of any web view requests. Return
true from the function to continue loading the request and false
-to stop loading.
Boolean value that determines whether scrolling is enabled in the +to stop loading.
bool #Boolean value that determines whether scrolling is enabled in the
WebView. The default value is true.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |