Android: Added support for 'direction' to scrollTo.

This fix adds a new option (direction) to 'mobile: scrollTo'.
If 'horizontal' is provided (or if the view is a HorizontalScrollView),
we will call setAsHorizontalList() before commencing the scroll.
This commit is contained in:
Payman Delshad
2014-02-26 15:17:41 +01:00
parent 69d56c3c76
commit b0976fece8
4 changed files with 19 additions and 6 deletions
+2 -1
View File
@@ -545,12 +545,13 @@ androidController.drag = function (startX, startY, endX, endY, duration, touchCo
}
};
androidController.scrollTo = function (elementId, text, cb) {
androidController.scrollTo = function (elementId, text, direction, cb) {
// instead of the elementId as the element to be scrolled too,
// it's the scrollable view to swipe until the uiobject that has the
// text is found.
var opts = {
text: text
, direction: direction
, elementId: elementId
};
this.proxy(["element:scrollTo", opts], cb);