This is a migrated thread and some comments may be shown as answers.

Not resizing properly - Landscape/Portrait

7 Answers 382 Views
ScrollView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 2
Scott asked on 05 Jul 2012, 07:03 PM
When switching between landscape to portrait view and vice-versa... the scrollview is not re-adjusting it's width correctly, what would be causing this to occur?

7 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 10 Jul 2012, 11:31 AM
Hello Scott,

Could you please provide some mode details - do you observe this problem with our on line demos or it happens just in your project? Also, what is the platform and the browser you use?
 
Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Scott
Top achievements
Rank 2
answered on 10 Jul 2012, 02:17 PM
It's happening with a listview... and only on Android devices...

We're forcing the platform to ios via application settings... because we like keeping the same look and feel across devices... on iPhones when switching from landscape to portrait and vice-versa... the listview resizes appropriately but on Android devices it does not, you have to refresh the page before it sizes correctly...

Is there anyway to capture a device orientation change event to force the listview to refresh and thus size correctly?
0
Alexander Valchev
Telerik team
answered on 13 Jul 2012, 01:11 PM
Hi Scott,

I tried to reproduce this behaviour on Android 2.3.6 and 4.0.3 but to no avail. Could you please check the attached sample page and let me know if the problem persists there?

As a general information, KendoMobile does not have its own orientation change events, but you can use the HTML5 DeviceOrientation API. For more information on the subject please check the following articles:


Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ivan
Top achievements
Rank 1
answered on 16 Aug 2012, 02:19 PM
Hi,

I am also having problem with ScrollView when changing orientation.

Problem is that current page in ScrollView is changed when changing orientation from portrait to landscape and it should not. Also page change event is not fired when this happen.
However, layout and styles are properly updated. For example, width of ScrollView page is changed to new width, styles shows that another page is selected ...

Demo project that reproduce this problem is attached. I have tested this in Google Chrome and on iPhone.
Steps to reproduce:
- in list select one item in the middle of the list  (item 2-4)
- this will show Scroll view. ScrollView has 3 pages. Pages 1 and 3 are empty, page 2 contains image and it is initially shown when item is selected in list.
- switching between pages by scrolling left or right will trigger page changed event and show message box.
- before changing orientation (or maximizing browser if using Chrome) be sure that page 2 (the one with image) is currently shown.
- change orientation (maximize browser). The result is that page 1(empty page) will be shown and page changed event would not even be triggered. Scrolling from right to left after this will change page, image will be shown and page changed event triggered.

0
Petyo
Telerik team
answered on 21 Aug 2012, 07:44 AM
Hi Ivan,

Thanks for contacting us. The current scrollview change orientation logic attempts to preserve the scrolling offset. However, this does not work well with the pages feature, where each page changes size when orientation is changed. We plan to address this issue for the upcoming Q2 service pack. 

Kind regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dave
Top achievements
Rank 1
answered on 16 Jan 2013, 09:21 PM
I'm having a similar problem. When I rotate an iOS device from portrait to landscape, the image rotates but does not resize to fit the new width/height (see image).

This is with the nightly build from about a week ago.

Advice?
0
Petyo
Telerik team
answered on 20 Jan 2013, 04:20 PM
Hello Dave,

This thread discusses resizing issues with the scrollview widget. From your screenshot, it looks like you are facing another type of problem. Please consider opening a separate thread or a support ticket - a sample code and steps to reproduce.

Thank you,

Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ScrollView (Mobile)
Asked by
Scott
Top achievements
Rank 2
Answers by
Iliana Dyankova
Telerik team
Scott
Top achievements
Rank 2
Alexander Valchev
Telerik team
Ivan
Top achievements
Rank 1
Petyo
Telerik team
Dave
Top achievements
Rank 1
Share this question
or