NativeScript ScrollView when component open it will scroll to some section

Issue

im using ScrollView in my component like that

        <ScrollView height="108"
                    orientation="horizontal"
                    sdkToggleNavButton>
                         .
                         .
                         .
                     some content
        </ScrollView>

with scroll width about 1200, i’m looking for some way that when the component opens it will appears in the middle of that scrollView

Solution

Use scrollView.scrollToHorizontalOffset(position);

Answered By – Manoj

Answer Checked By – Senaida (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.