-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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-25086] Android: Modified TextArea and vertical ScrollView to support nested scrolling. #9402
Conversation
…e scrollable within another scrollable view. - Created new TiListView class: * New class used by Titanium ListView and TableView. * Needed to support nested scrolling child views on OS versions older than Android 5.0. * Moved TiListView "canScroll" property to this new class. (This means we can support "Ti.UI.TableView.scrollable" property in the future.)
private static class ApiLevel16 | ||
{ | ||
/** Constructor made private to prevent instances from being made. */ | ||
private ApiLevel16() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, you can make this an abstract class to prevent instances from being made instead of creating a private constructor.
private static abstract class ApiLevel16
Same for the others
* @param listView The list view to be scrolled. Can be null, in which case this method will no-op. | ||
* @param y The y-axis distance in pixels to scroll the list view by. | ||
*/ | ||
public static void scrollListBy(ListView listView, int y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of the benefit of this since there are a lot of dalvikvm
reference warnings from the support libraries themselves. But since it's here, why not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: minor, see above
FT: PASS
Awesome!! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with this environment:
Node Version: 6.10.3
NPM Version: 3.10.10
Mac OS: 10.12.4
Appc CLI: 6.2.4-master.9
Appc CLI NPM: 4.2.9
Titanium SDK version: 7.0.0.v20170907111553
Appcelerator Studio, build: 4.9.1.201707200100
Android OS 4.1, 4.4, 7.1
I tested with the above Android OS versions as specified in the test cases. The three test cases that Josh wrote in this PR were used to validate the fix. All passed.
JIRA: https://jira.appcelerator.org/browse/TIMOB-25086
Summary:
ScrollView Test:
ScrollViewTextAreasTest.js
on Android.TableView Test:
TableOfTextAreasTest.js
on Android 5.0 or higher.Deeply Nested Scrolling Test:
ScrollViewNestingTest.js
on Android.