Navigating within a page


#1

Hi
I am not sure how to programmatically navigate within a page. It has three buttons two at the top and one at the bottom which needs to be functional. I have created(I think) self explanatory playground example https://play.nativescript.org/?template=play-tsc&id=SQ251q&v=6. Basically, I need three functionalities:

  1. Go to Bottom Of the Page
  2. Go to Top of the page
  3. Go to specific element (label/button) on the page

Please guide me.

Thanks,
Rakesh


#2

ScrollView has methods, such as ‘scrollToVerticalOffset’ that you could use. Scrolling to top and bottom would be easy, but going to a certain location, you might need to do some calculations based on font size, etc.

https://docs.nativescript.org/api-reference/classes/ui_scroll_view.scrollview


#3

@rakeshgirase Try to not create duplicate posts.


#4

Hi @manojdcoder Thanks for your reply. I have changed the topic name of the ealier issue to make more sense so that these two topic mean different.