File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 77 ViewStyle ,
88 StyleProp ,
99 LayoutChangeEvent ,
10+ I18nManager ,
1011} from 'react-native' ;
1112import setColor from 'color' ;
1213import { withTheme } from '../core/theming' ;
@@ -44,6 +45,7 @@ type State = {
4445
4546const INDETERMINATE_DURATION = 2000 ;
4647const INDETERMINATE_MAX_WIDTH = 0.6 ;
48+ const { isRTL } = I18nManager ;
4749
4850/**
4951 * Progress bar is an indicator used to present progress of some activity in the app.
@@ -187,14 +189,17 @@ class ProgressBar extends React.Component<Props, State> {
187189 ? {
188190 inputRange : [ 0 , 0.5 , 1 ] ,
189191 outputRange : [
190- - 0.5 * width ,
191- - 0.5 * INDETERMINATE_MAX_WIDTH * width ,
192- 0.7 * width ,
192+ ( isRTL ? 1 : - 1 ) * 0.5 * width ,
193+ ( isRTL ? 1 : - 1 ) *
194+ 0.5 *
195+ INDETERMINATE_MAX_WIDTH *
196+ width ,
197+ ( isRTL ? - 1 : 1 ) * 0.7 * width ,
193198 ] ,
194199 }
195200 : {
196201 inputRange : [ 0 , 1 ] ,
197- outputRange : [ - 0.5 * width , 0 ] ,
202+ outputRange : [ ( isRTL ? 1 : - 1 ) * 0.5 * width , 0 ] ,
198203 }
199204 ) ,
200205 } ,
You can’t perform that action at this time.
0 commit comments