mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
6 lines
2.1 KiB
Markdown
6 lines
2.1 KiB
Markdown
---
|
|
id: version-0.36-switchandroid
|
|
title: switchandroid
|
|
original_id: switchandroid
|
|
---
|
|
<a id="content"></a><h1><a class="anchor" name="switchandroid"></a>SwitchAndroid <a class="hash-link" href="docs/switchandroid.html#switchandroid">#</a></h1><div><div><p>@deprecated</p><p>Use <Switch> instead for cross-platform compatibility.</p></div><h3><a class="anchor" name="props"></a>Props <a class="hash-link" href="docs/switchandroid.html#props">#</a></h3><div class="props"><div class="prop"><h4 class="propTitle"><a class="anchor" name="view"></a><a href="docs/view.html#props">View props...</a> <a class="hash-link" href="docs/switchandroid.html#view">#</a></h4></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="disabled"></a>disabled <span class="propType">PropTypes.bool</span> <a class="hash-link" href="docs/switchandroid.html#disabled">#</a></h4><div><p>If <code>true</code>, this component can't be interacted with.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onvaluechange"></a>onValueChange <span class="propType">PropTypes.func</span> <a class="hash-link" href="docs/switchandroid.html#onvaluechange">#</a></h4><div><p>Invoked with the new value when the value changes.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="testid"></a>testID <span class="propType">PropTypes.string</span> <a class="hash-link" href="docs/switchandroid.html#testid">#</a></h4><div><p>Used to locate this view in end-to-end tests.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="value"></a>value <span class="propType">PropTypes.bool</span> <a class="hash-link" href="docs/switchandroid.html#value">#</a></h4><div><p>Boolean value of the switch.</p></div></div></div></div><p class="edit-page-block">You can <a target="_blank" href="https://github.com/facebook/react-native/blob/master/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js">edit the content above on GitHub</a> and send us a pull request!</p><div class="docs-prevnext"><a class="docs-prev" href="docs/switch.html#content">← Prev</a><a class="docs-next" href="docs/switchios.html#content">Next →</a></div> |