Merge pull request #2125 from ecency/sa/rtl/settings-screen-rtl-fix

fixed alignment issues in settings screen
This commit is contained in:
Feruz M 2022-01-05 19:09:39 +02:00 committed by GitHub
commit de64f78200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@ export default EStyleSheet.create({
fontSize: 14,
fontWeight: 'bold',
flexGrow: 1,
textAlign: 'left',
},
dropdownText: {
fontSize: 14,

View File

@ -1,5 +1,5 @@
import React, { PureComponent } from 'react';
import { View, TouchableOpacity, Animated } from 'react-native';
import { View, TouchableOpacity, Animated, NativeModules } from 'react-native';
// Constants
@ -85,7 +85,7 @@ class ToggleSwitchView extends PureComponent {
_triggerAnimation = () => {
const { width, translateX, isOn, duration } = this.state;
const toValue = isOn ? width - translateX : 0;
const toValue = isOn ? width - (NativeModules.I18nManager.isRTL ? 100 : translateX) : 0; //in rtl layout, set the translate value to 100
Animated.timing(this.offsetX, {
toValue,

View File

@ -12,6 +12,7 @@ export default EStyleSheet.create({
},
cardTitle: {
color: '$primaryBlue',
textAlign: 'left',
},
paddingBottom: {
paddingBottom: 20,