Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17050

How can change Title Align for RTL App - react-navigation 5?

$
0
0

I've app in RTL layout, So I forced native code to apply RTL layout for ios/android.

in ios, I add this code in AppDelegate.m

// Force app Just Apply RTL layout[[RCTI18nUtil sharedInstance] allowRTL:YES];[[RCTI18nUtil sharedInstance] forceRTL:YES];

it's work and applies RTL layout,But I have an issue with Stack Navigator title screen,the title stuck in left! it should be in the right for example like the bottom tab bar it's accepted the RTL layout and works fine But title not works

and in headerTitleAlign: center | left It's not accepted right as value!

So how can I resolve this issue?

Code snippet

const HomeStackNavigator = () => {  return (<HomeStack.Navigator      screenOptions={{        headerStyle: {          backgroundColor: Theme.BackgroundColor,          elevation: 0,          shadowOffset: {            width: 0,            height: 0,          },        },        headerLeft: (props) => (<Feather            name="bell"            style={{paddingLeft: 10}}            size={30}            color={props.color}          />        ),        headerTitleAlign: 'left',      }}><HomeStack.Screen           options={{             title: 'الرئيسية',           }}           name="Home"           component={HomeScreen}         /></HomeStack.Navigator>  );};

What I got

What i got

What I expected

What I expected


Viewing all articles
Browse latest Browse all 17050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>