@@ -10,7 +10,8 @@ import * as gestures from 'ui/gestures';
1010import { AnimationCurve , Orientation } from 'ui/enums' ;
1111import { Color } from 'color' ;
1212import { Image } from 'ui/image' ;
13- import * as imageSource from 'image-source' ;
13+
14+ // declare const android:any;
1415
1516let LayoutParams : any ;
1617if ( app . android ) {
@@ -244,20 +245,25 @@ export class SlideContainer extends AbsoluteLayout {
244245
245246 //handles application orientation change
246247 app . on ( app . orientationChangedEvent , ( args : app . OrientationChangedEventData ) => {
247- this . _pageWidth = Platform . screen . mainScreen . widthDIPs ;
248- this . eachLayoutChild ( ( view : View ) => {
249- if ( view instanceof StackLayout ) {
250- AbsoluteLayout . setLeft ( view , this . pageWidth ) ;
251- view . width = this . pageWidth ;
252- }
253- } ) ;
248+ //event and page orientation didn't seem to alwasy be on the same page so setting it in the time out addresses this.
249+ setTimeout ( ( ) => {
250+ this . _pageWidth = Platform . screen . mainScreen . widthDIPs ;
251+ this . eachLayoutChild ( ( view : View ) => {
252+ if ( view instanceof StackLayout ) {
253+ AbsoluteLayout . setLeft ( view , this . pageWidth ) ;
254+ view . width = this . pageWidth ;
255+ }
256+ } ) ;
254257
255- if ( this . disablePan === false ) {
256- this . applySwipe ( this . pageWidth ) ;
257- }
258- let topOffset = Platform . screen . mainScreen . heightDIPs - 105 ;
259- AbsoluteLayout . setTop ( this . _footer , topOffset ) ;
260- this . currentPanel . panel . translateX = - this . pageWidth ;
258+ if ( this . disablePan === false ) {
259+ this . applySwipe ( this . pageWidth ) ;
260+ }
261+ let topOffset = Platform . screen . mainScreen . heightDIPs - 105 ;
262+ if ( this . pageIndicators ) {
263+ AbsoluteLayout . setTop ( this . _footer , topOffset ) ;
264+ }
265+ this . currentPanel . panel . translateX = - this . pageWidth ;
266+ } , 100 ) ;
261267 } ) ;
262268 }
263269 } ) ;
0 commit comments