Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24963] iOS/Android: Add scrollToTop() to ScrollView #9221

Closed
wants to merge 729 commits into from

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jul 14, 2017

@hansemannn hansemannn changed the title [AC-5088] Android: Add scrollToTop() to ScrollView [TIMOB-24963] iOS/Android: Add scrollToTop() to ScrollView Jul 16, 2017
Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will await the Android review as well.

@lokeshchdhry
Copy link
Contributor

@hansemannn , @garymathews, Is the android CR done for this ?

@hansemannn
Copy link
Collaborator

@lokeshchdhry Not, yet. Awaiting the CR from @garymathews, but iOS is approved.

@hansemannn hansemannn added this to the 7.0.0 milestone Aug 7, 2017
@hansemannn
Copy link
Collaborator

@m1ga As 6.2.0 is branched already and this is a minor feature, please change the since to 7.0.0, thx!

hansemannn and others added 20 commits November 13, 2017 15:59
[TIMOB-10724] Android: Remove native module gperf dependency
[TIMOB-24000] Module build should error if the apiversion in manifest…
[TIMOB-10787] iOS: Expose modern UUID-replacements
[TIMOB-25456] Android: Crash after calling JSON.stringify on Ti.UI.Window
Android: Lowered min "targetSdkVersion" from 25 to 23.
[TIMOB-25462] Android: Implement Ti.UI.WebView.userAgent
[TIMOB-18500] Android: event.cancel not set properly for optionsDialog
[TIMOB-25374] Android: borderColor not visible on Android tiSDK 6.2.2
[TIMOB-17340] Android: Implement Ti.UI.ATTRIBUTE_BASELINE_OFFSET
[TIMOB-25005] Remove Ti.UI.iPhone namespace
[TIMOB-24679] Android: Remove invalid constant definitions
[TIMOB-25051] fix persistentObjects leak
[TIMOB-25301]:iPhone X: Need to be able to control the Insets / Layout Margins
@@ -676,6 +676,18 @@ public void scrollToBottom()
}
}

public void scrollToTop()
{
View view = getNativeView();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we update this PR with what's on master, we'll need to change this line of code...

View view = getNativeView();

...to...

View view = this.scrollView;

This is because we've added RefreshControl support to scroll views as of 6.3.0 and the getNativeView() method will return a SwipeRefreshLayout object instead.

@m1ga
Copy link
Contributor Author

m1ga commented Nov 14, 2017

@jquick-axway you already changed the getNativeView(), right?

@jquick-axway
Copy link
Contributor

you already changed the getNativeView(), right?

@m1ga, I have. The goal was to get this PR into 7.0.0 since the Windows PR has already been merged in. But when I resolved the conflicts, this PR is now showing the entire commit history of the merge. Hmm...

@jquick-axway
Copy link
Contributor

@m1ga, since I screwed up the commit history for this PR, I've set up a new PR #9601 to replace this one. Your commit changes are still intact and credit was given where credit was due.

I've also discovered that animated scrolling in a vertical ScrollView via scrollTo() and your new scrollToTop() method no longer worked on Android as of Titanium 6.2.2. This is due to us using Google's NestedScrollView in place of the ScrollView Java class. It appears to be a bug in the NestedScrollView class. The new PR resolves this issue by disabling animated scrolling in this case (kind of a bummer, but haven't found a better work-around).

@jquick-axway
Copy link
Contributor

Closing in favor of PR #9601.

@m1ga m1ga deleted the scrollToTop branch March 29, 2018 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet