Skip to content

Commit 1f75084

Browse files
authored
feat(android): expose contentOffset getter in TableView/ListView (#14058)
1 parent 84ccadb commit 1f75084

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ public String getApiName()
414414
return"Ti.UI.TableView";
415415
}
416416

417-
// NOTE: For internal use only.
417+
@Kroll.getProperty
418418
publicKrollDictgetContentOffset()
419419
{
420420
finalTiTableViewtableView = getTableView();

android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public void setActivity(Activity activity)
450450
}
451451
}
452452

453-
// NOTE: For internal use only.
453+
@Kroll.getProperty
454454
publicKrollDictgetContentOffset()
455455
{
456456
finalTiListViewlistView = getListView();

apidoc/Titanium/UI/ListView.yml

+6
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,12 @@ properties:
684684
ipad: 3.2.0
685685
platforms: [android, iphone, ipad, macos]
686686

687+
- name: contentOffset
688+
summary: X and Y coordinates to which to reposition the top-left point of the content region.
689+
type: Point
690+
since: {android: "12.4.0"}
691+
platforms: [android]
692+
687693
- name: disableBounce
688694
summary: Determines whether the scroll-bounce of the list view should be disabled.
689695
description: |

apidoc/Titanium/UI/TableView.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,12 @@ properties:
10731073
type: [String, Titanium.UI.Color]
10741074
default: transparent on non-iOS platforms, white on the iOS platform
10751075

1076+
- name: contentOffset
1077+
summary: X and Y coordinates to which to reposition the top-left point of the content region.
1078+
type: Point
1079+
since: {android: "12.4.0"}
1080+
platforms: [android]
1081+
10761082
- name: data
10771083
summary: Rows of the table view.
10781084
type: [Array<Titanium.UI.TableViewRow>, Array<Titanium.UI.TableViewSection>]

0 commit comments

Comments
 (0)
close