-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): add position to TableView scrollToIndex (#13505)
* feat(android): add position to TableView scrollToIndex * fix(docs): add deprecation info
- Loading branch information
Showing
7 changed files
with
100 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
android/modules/ui/src/java/ti/modules/titanium/ui/TableViewScrollPositionModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2020 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
package ti.modules.titanium.ui; | ||
|
||
import org.appcelerator.kroll.KrollModule; | ||
import org.appcelerator.kroll.annotations.Kroll; | ||
|
||
import ti.modules.titanium.ui.UIModule; | ||
|
||
@Kroll.module(parentModule = UIModule.class) | ||
public class TableViewScrollPositionModule extends KrollModule | ||
{ | ||
@Kroll.constant | ||
public static final int TOP = 1; | ||
@Kroll.constant | ||
public static final int BOTTOM = 2; | ||
@Kroll.constant | ||
public static final int MIDDLE = 3; | ||
@Kroll.constant | ||
public static final int NONE = 0; | ||
|
||
@Override | ||
public String getApiName() | ||
{ | ||
return "Ti.UI.TableViewScrollPositionModule"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Titanium.UI.TableViewScrollPosition | ||
summary: | | ||
A set of constants for the position value that can be used for the `position` property of | ||
<Titanium.UI.TableView> when invoking `scrollToIndex`. | ||
extends: Titanium.Proxy | ||
platforms: [android, iphone, ipad, macos] | ||
since: 11.1.0 | ||
createable: false | ||
properties: | ||
- name: BOTTOM | ||
summary: The table view scrolls the row of interest to the bottom of the visible table view. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: MIDDLE | ||
summary: The table view scrolls the row of interest to the middle of the visible table view. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: NONE | ||
summary: The table view scrolls the row of interest to be fully visible with a minimum of movement. If the row is already fully visible, no scrolling occurs. For example, if the row is above the visible area, the behavior is identical to that specified by `TOP`. This is the default. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: TOP | ||
summary: The table view scrolls the row of interest to the top of the visible table view. | ||
type: Number | ||
permission: read-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters