Skip to content

Commit

Permalink
feat(android): expose contentOffset getter in TableView/ListView
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Jun 9, 2024
1 parent 2f1212f commit 3f51068
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public String getApiName()
return "Ti.UI.TableView";
}

// NOTE: For internal use only.
@Kroll.getProperty
public KrollDict getContentOffset()
{
final TiTableView tableView = getTableView();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public void setActivity(Activity activity)
}
}

// NOTE: For internal use only.
@Kroll.getProperty
public KrollDict getContentOffset()
{
final TiListView listView = getListView();
Expand Down
6 changes: 6 additions & 0 deletions apidoc/Titanium/UI/ListView.yml
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,12 @@ properties:
ipad: 3.2.0
platforms: [android, iphone, ipad, macos]

- name: contentOffset
summary: X and Y coordinates to which to reposition the top-left point of the content region.
type: Point
since: {android: "12.4.0"}
platforms: [android]

- name: disableBounce
summary: Determines whether the scroll-bounce of the list view should be disabled.
description: |
Expand Down
6 changes: 6 additions & 0 deletions apidoc/Titanium/UI/TableView.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,12 @@ properties:
type: [String, Titanium.UI.Color]
default: transparent on non-iOS platforms, white on the iOS platform

- name: contentOffset
summary: X and Y coordinates to which to reposition the top-left point of the content region.
type: Point
since: {android: "12.4.0"}
platforms: [android]

- name: data
summary: Rows of the table view.
type: [Array<Titanium.UI.TableViewRow>, Array<Titanium.UI.TableViewSection>]
Expand Down

0 comments on commit 3f51068

Please sign in to comment.