-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
Description
On Android, it is possible to modify the width of a Switch by using the android:switchMinWidth
attribute
<Switch android:switchMinWidth="50dp" />
or by using the .setSwitchMinWidth(int pixels)
method.
Switch mySwitch = findViewById(R.id.mySwitch);
mySwitch.setSwitchMinWidth(400);
There is no such attribute in React-Native. Ideally, it would be nice to have a "width" attribute for the Switch component, such that we can do
<Switch width={50} />
to achieve something similar as the above screenshot.
React Native version:
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Memory: 6.39 GB / 15.87 GB
Binaries:
Node: 12.16.3 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
Android NDK: 17.2.4988734
IDEs:
Android Studio: Version 3.6.0.0 AI-192.7142.36.36.6392135
Languages:
Python: 3.8.3 - C:\Python38\python.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.1 => 0.62.1
npmGlobalPackages:
react-native: Not Found