Skip to content

ScrollView scrollToVerticalOffset don't work on Android #623

@Neferteus

Description

@Neferteus

I want to include a scrollToId() method in my ts.

fiche.html :

<ScrollView id="myScroller">
       <FlexboxLayout (tap)="scrollToId('google-map')">
           .....
       </FlexboxLayout>
       <FlexboxLayout (tap)="scrollToId('horaire')">
            ....
       </FlexboxLayout>
       <StackLayout id="horaire">
          ....
       </StackLayout>
       <GridLayout id="google-map">
            ...
        </GridLayout>
</ScrollView>

fiche.ts :

public scrollToId(id: string) {
        if (this.scrollLayout == null) {
            this.scrollLayout = this.page.getViewById("myScroller");
        }

        let focus = this.page.getViewById(id);

        this.scrollLayout.scrollToVerticalOffset(focus.verticalOffset, false);
    }

All is ok on IOS but on Android, no scroll to StackLayout or GridLayout.

Any help on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions