mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 13:22:02 +03:00
Merge pull request #2124 from ecency/sa/rtl/side-menu-rtl-fix
fixed alignment issues in side menu
This commit is contained in:
commit
b31cda243d
@ -1,4 +1,5 @@
|
|||||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
|
import { isRTL } from '../../../utils/I18nUtils';
|
||||||
import scalePx from '../../../utils/scalePx';
|
import scalePx from '../../../utils/scalePx';
|
||||||
|
|
||||||
export default EStyleSheet.create({
|
export default EStyleSheet.create({
|
||||||
@ -18,14 +19,16 @@ export default EStyleSheet.create({
|
|||||||
headerContentWrapper: {
|
headerContentWrapper: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
height: 70,
|
height: 70,
|
||||||
flexDirection: 'row',
|
flexDirection: isRTL() ? 'row-reverse' : 'row',
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
|
flex: 1,
|
||||||
},
|
},
|
||||||
contentView: {
|
contentView: {
|
||||||
flex: 4,
|
flex: 4,
|
||||||
},
|
},
|
||||||
userAvatar: {
|
userAvatar: {
|
||||||
marginLeft: 32,
|
marginLeft: isRTL() ? 15 : 32,
|
||||||
|
marginRight: isRTL() ? 15 : 0,
|
||||||
},
|
},
|
||||||
otherUserAvatar: {
|
otherUserAvatar: {
|
||||||
borderWidth: 0.1,
|
borderWidth: 0.1,
|
||||||
@ -63,10 +66,10 @@ export default EStyleSheet.create({
|
|||||||
listItemText: {
|
listItemText: {
|
||||||
color: '$primaryDarkGray',
|
color: '$primaryDarkGray',
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
alignSelf: 'center',
|
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
textAlign: 'left',
|
||||||
},
|
},
|
||||||
buttonText: {
|
buttonText: {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
|
@ -2,6 +2,8 @@ import { Alert, NativeModules } from 'react-native';
|
|||||||
import RNRestart from 'react-native-restart';
|
import RNRestart from 'react-native-restart';
|
||||||
import rtlDetect from 'rtl-detect';
|
import rtlDetect from 'rtl-detect';
|
||||||
|
|
||||||
|
export const isRTL = () => NativeModules.I18nManager.isRTL;
|
||||||
|
|
||||||
export const languageRestart = (prevLang, lang, intl) => {
|
export const languageRestart = (prevLang, lang, intl) => {
|
||||||
if (prevLang != lang) {
|
if (prevLang != lang) {
|
||||||
// if selected lang is RTL, switch the layout
|
// if selected lang is RTL, switch the layout
|
||||||
|
Loading…
Reference in New Issue
Block a user