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

Scrollview button navigator (prev - next)

3 Answers 397 Views
ScrollView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Cristiano
Top achievements
Rank 1
Cristiano asked on 14 Feb 2013, 02:27 PM
I'd like to add in the right center and left center position of the scrollview container two arrows that help the user to navigate to the next or the previous image.
I tried with two <div> element using position:absolute and background image to have the two arrow in the desired position, but as you can see in the attached file, the arrows will disappear after the first scroll to the right. I need a <div> element overlying with the scrollview container.
Is it possibile to get the desired effect?

Thank you

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 18 Feb 2013, 12:32 PM
Hello Cristiano,

I am afraid that this functionality is not supported out of the box by the ScrollView widget. By design the user is supposed to navigate between the pages by swiping with finger. This is more sensibly when the application is opened on a mobile device.

If you insist to provide an opportunity for navigation via buttons, as a possible workaround I suggest you to put the previous/next buttons inside the View's header.

For your convenience I prepared a small example: http://jsbin.com/oyijoq/2/edit

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
Cristiano
Top achievements
Rank 1
answered on 19 Feb 2013, 02:27 PM
Hello Alexander,
I need the solution as you saw in my example: I don't need real buttons, I need only the graphic effect of the arrows in that positions, that gives idea to user they can navigate photos.
Is still impossible?

Thank you.
0
Alexander Valchev
Telerik team
answered on 21 Feb 2013, 01:15 PM
Hello Cristiano,

As I said in my previous reply this feature is not supported. You can achieve it, but it will require custom CSS/JavaScript.

By default the ScrollView will take 100% width of its parent container. If you want to put static arrows you should limit the width of the widget and its pages. If you want to move between the pages with the arrows, you can use the touch events API.

This example demonstrates the approach: http://jsbin.com/oyijoq/6/edit

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!
Tags
ScrollView (Mobile)
Asked by
Cristiano
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Cristiano
Top achievements
Rank 1
Share this question
or