From 9097e6a2319ef9dfd9b0f8a31d11a653aed69954 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Sat, 20 Jan 2024 17:19:50 +0100 Subject: [PATCH] feat(android): refreshControl offset property --- .../java/ti/modules/titanium/ui/RefreshControlProxy.java | 4 ++-- apidoc/Titanium/UI/RefreshControl.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java index f5272681245..684dc6f8b6e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java @@ -97,9 +97,9 @@ public void handleCreationDict(KrollDict properties) } if (properties.containsKeyAndNotNull("offset")) { KrollDict offset = properties.getKrollDict("offset"); - offsetStart = new TiDimension(TiConvert.toInt(offset.get("top"), 0), TiDimension.TYPE_TOP) + offsetStart = new TiDimension(TiConvert.toInt(offset.get("start"), 0), TiDimension.TYPE_TOP) .getAsPixels(this.swipeRefreshLayout); - offsetEnd = new TiDimension(TiConvert.toInt(offset.get("bottom"), 80), TiDimension.TYPE_BOTTOM) + offsetEnd = new TiDimension(TiConvert.toInt(offset.get("end"), 80), TiDimension.TYPE_BOTTOM) .getAsPixels(this.swipeRefreshLayout); } } diff --git a/apidoc/Titanium/UI/RefreshControl.yml b/apidoc/Titanium/UI/RefreshControl.yml index 222e8b49a45..2a63240b8ab 100644 --- a/apidoc/Titanium/UI/RefreshControl.yml +++ b/apidoc/Titanium/UI/RefreshControl.yml @@ -149,9 +149,9 @@ examples: name: refreshOffset summary: Offset of the refresh control view. properties: - - name: top - summary: Top padding of the map view. + - name: start + summary: The offset from the top of this view at which the progress spinner should appear. type: Number - - name: bottom - summary: Bottom padding of the map view. + - name: end + summary: The offset from the top of this view at which the progress spinner should come to rest after a successful swipe gesture. type: Number