From 679755e0747ce18b6c80ef2f77336594a7a5d3c5 Mon Sep 17 00:00:00 2001 From: Gwen Sarapata Date: Wed, 22 May 2024 13:32:56 -0400 Subject: [PATCH 1/6] Soften Runtime Requirement for Android SwipeRefreshLayout #2454 --- android/src/toga_android/widgets/detailedlist.py | 15 ++++++++++++++- changes/2454.feature.rst | 1 + docs/reference/api/widgets/detailedlist.rst | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 changes/2454.feature.rst diff --git a/android/src/toga_android/widgets/detailedlist.py b/android/src/toga_android/widgets/detailedlist.py index 4a7353e91c..1aa2ab8f4e 100644 --- a/android/src/toga_android/widgets/detailedlist.py +++ b/android/src/toga_android/widgets/detailedlist.py @@ -6,9 +6,16 @@ from android.graphics import Rect from android.view import Gravity, View from android.widget import ImageView, LinearLayout, RelativeLayout, ScrollView, TextView -from androidx.swiperefreshlayout.widget import SwipeRefreshLayout from java import dynamic_proxy +try: + from androidx.swiperefreshlayout.widget import SwipeRefreshLayout +except ImportError: # pragma: no cover + # Import will fail if SwipeRefreshLayout is not listed in dependencies + # No cover due to not being able to test in CI + SwipeRefreshLayout = None + + from .base import Widget @@ -89,6 +96,12 @@ def onRefresh(self): class DetailedList(Widget): def create(self): + if SwipeRefreshLayout is None: # pragma: no cover + raise RuntimeError( + "Unable to import SwipeRefreshLayout. Ensure that the AndroidX Swipe Refresh Layout " + "widget package (androidx.swiperefreshlayout:swiperefreshlayout:1.1.0)" + "is listed in your app's dependencies." + ) # get the selection color from the current theme attrs = [R.attr.colorBackground, R.attr.colorControlHighlight] typed_array = self._native_activity.obtainStyledAttributes(attrs) diff --git a/changes/2454.feature.rst b/changes/2454.feature.rst new file mode 100644 index 0000000000..9d4bf12915 --- /dev/null +++ b/changes/2454.feature.rst @@ -0,0 +1 @@ +Remove unnecessary dependencies from Android requirements. \ No newline at end of file diff --git a/docs/reference/api/widgets/detailedlist.rst b/docs/reference/api/widgets/detailedlist.rst index f679552281..55693e2bb2 100644 --- a/docs/reference/api/widgets/detailedlist.rst +++ b/docs/reference/api/widgets/detailedlist.rst @@ -139,6 +139,9 @@ Notes * The WinForms implementation currently uses a column layout similar to :any:`Table`, and does not support the primary, secondary or refresh actions. +* Using DetailedList on Android requires the AndroidX SwipeRefreshLayout widget in your project's Gradle dependencies. Ensure your app declares a dependency on ``androidx.swiperefreshlayout:swiperefreshlayout:1.1.0`` or later. + + Reference --------- From b60d2f8f0003e4cf27e8b258e12ee526acd114ca Mon Sep 17 00:00:00 2001 From: Gwen Sarapata Date: Wed, 22 May 2024 16:25:49 -0400 Subject: [PATCH 2/6] Removed extra android dependency from example projects --- android/src/toga_android/widgets/detailedlist.py | 16 +++++++++------- examples/activityindicator/pyproject.toml | 1 - examples/box/pyproject.toml | 1 - examples/button/pyproject.toml | 1 - examples/canvas/pyproject.toml | 1 - examples/colors/pyproject.toml | 1 - examples/command/pyproject.toml | 1 - examples/date_and_time/pyproject.toml | 1 - examples/dialogs/pyproject.toml | 1 - examples/divider/pyproject.toml | 1 - examples/documentapp/pyproject.toml | 1 - examples/examples_overview/pyproject.toml | 1 - examples/focus/pyproject.toml | 1 - examples/font/pyproject.toml | 1 - examples/font_size/pyproject.toml | 1 - examples/handlers/pyproject.toml | 1 - examples/hardware/pyproject.toml | 1 - examples/layout/pyproject.toml | 1 - examples/mapview/pyproject.toml | 1 - examples/multilinetextinput/pyproject.toml | 1 - examples/numberinput/pyproject.toml | 1 - examples/optioncontainer/pyproject.toml | 1 - examples/positron-django/pyproject.toml | 1 - examples/positron-static/pyproject.toml | 1 - examples/progressbar/pyproject.toml | 1 - examples/resize/pyproject.toml | 1 - examples/screenshot/pyproject.toml | 1 - examples/scrollcontainer/pyproject.toml | 1 - examples/selection/pyproject.toml | 1 - examples/slider/pyproject.toml | 1 - examples/splitcontainer/pyproject.toml | 1 - examples/switch_demo/pyproject.toml | 1 - examples/table/pyproject.toml | 1 - examples/table_source/pyproject.toml | 1 - examples/textinput/pyproject.toml | 1 - examples/tree/pyproject.toml | 1 - examples/tree_source/pyproject.toml | 1 - examples/tutorial0/pyproject.toml | 1 - examples/tutorial1/pyproject.toml | 1 - examples/tutorial2/pyproject.toml | 1 - examples/tutorial3/pyproject.toml | 1 - examples/tutorial4/pyproject.toml | 1 - examples/webview/pyproject.toml | 1 - examples/window/pyproject.toml | 1 - 44 files changed, 9 insertions(+), 50 deletions(-) diff --git a/android/src/toga_android/widgets/detailedlist.py b/android/src/toga_android/widgets/detailedlist.py index 1aa2ab8f4e..90484731fe 100644 --- a/android/src/toga_android/widgets/detailedlist.py +++ b/android/src/toga_android/widgets/detailedlist.py @@ -85,13 +85,15 @@ def onClick(self, dialog, which): self.actions[which].handler(row=self.row) -class OnRefreshListener(dynamic_proxy(SwipeRefreshLayout.OnRefreshListener)): - def __init__(self, interface): - super().__init__() - self._interface = interface +if SwipeRefreshLayout is not None: # prama: no cover + + class OnRefreshListener(dynamic_proxy(SwipeRefreshLayout.OnRefreshListener)): + def __init__(self, interface): + super().__init__() + self._interface = interface - def onRefresh(self): - self._interface.on_refresh() + def onRefresh(self): + self._interface.on_refresh() class DetailedList(Widget): @@ -99,7 +101,7 @@ def create(self): if SwipeRefreshLayout is None: # pragma: no cover raise RuntimeError( "Unable to import SwipeRefreshLayout. Ensure that the AndroidX Swipe Refresh Layout " - "widget package (androidx.swiperefreshlayout:swiperefreshlayout:1.1.0)" + "widget package (androidx.swiperefreshlayout:swiperefreshlayout:1.1.0) " "is listed in your app's dependencies." ) # get the selection color from the current theme diff --git a/examples/activityindicator/pyproject.toml b/examples/activityindicator/pyproject.toml index c96bc14e71..8835cff01e 100644 --- a/examples/activityindicator/pyproject.toml +++ b/examples/activityindicator/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/box/pyproject.toml b/examples/box/pyproject.toml index 08a3ea0d9b..2435bb18ec 100644 --- a/examples/box/pyproject.toml +++ b/examples/box/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/button/pyproject.toml b/examples/button/pyproject.toml index bd9cc98a33..4d71f86fbb 100644 --- a/examples/button/pyproject.toml +++ b/examples/button/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/canvas/pyproject.toml b/examples/canvas/pyproject.toml index 68a0f83b1a..854a82cae7 100644 --- a/examples/canvas/pyproject.toml +++ b/examples/canvas/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/colors/pyproject.toml b/examples/colors/pyproject.toml index d5558a2f9e..32dff51e01 100644 --- a/examples/colors/pyproject.toml +++ b/examples/colors/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/command/pyproject.toml b/examples/command/pyproject.toml index a28218b2a9..a8cf1881fd 100644 --- a/examples/command/pyproject.toml +++ b/examples/command/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/date_and_time/pyproject.toml b/examples/date_and_time/pyproject.toml index f753c5813c..4992af7c29 100644 --- a/examples/date_and_time/pyproject.toml +++ b/examples/date_and_time/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/dialogs/pyproject.toml b/examples/dialogs/pyproject.toml index 51e713543e..df17f7ea54 100644 --- a/examples/dialogs/pyproject.toml +++ b/examples/dialogs/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/divider/pyproject.toml b/examples/divider/pyproject.toml index e3d5e2489f..6b19a8da9e 100644 --- a/examples/divider/pyproject.toml +++ b/examples/divider/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/documentapp/pyproject.toml b/examples/documentapp/pyproject.toml index 2acb01d4fb..74f6618415 100644 --- a/examples/documentapp/pyproject.toml +++ b/examples/documentapp/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/examples_overview/pyproject.toml b/examples/examples_overview/pyproject.toml index 801dcd5586..da3e29a5cf 100644 --- a/examples/examples_overview/pyproject.toml +++ b/examples/examples_overview/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/focus/pyproject.toml b/examples/focus/pyproject.toml index 2864340dca..f306ffd2e2 100644 --- a/examples/focus/pyproject.toml +++ b/examples/focus/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/font/pyproject.toml b/examples/font/pyproject.toml index 78101b669b..2e3a5d7343 100644 --- a/examples/font/pyproject.toml +++ b/examples/font/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/font_size/pyproject.toml b/examples/font_size/pyproject.toml index 5b19cd1b89..0a7efb5aad 100644 --- a/examples/font_size/pyproject.toml +++ b/examples/font_size/pyproject.toml @@ -51,7 +51,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/handlers/pyproject.toml b/examples/handlers/pyproject.toml index 182f08da64..26f0b4568a 100644 --- a/examples/handlers/pyproject.toml +++ b/examples/handlers/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/hardware/pyproject.toml b/examples/hardware/pyproject.toml index 81eb140e06..35426bb632 100644 --- a/examples/hardware/pyproject.toml +++ b/examples/hardware/pyproject.toml @@ -56,6 +56,5 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", "org.osmdroid:osmdroid-android:6.1.0", ] diff --git a/examples/layout/pyproject.toml b/examples/layout/pyproject.toml index a75a314226..cd2f096623 100644 --- a/examples/layout/pyproject.toml +++ b/examples/layout/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/mapview/pyproject.toml b/examples/mapview/pyproject.toml index d27cca75f3..54dc2adf87 100644 --- a/examples/mapview/pyproject.toml +++ b/examples/mapview/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", "org.osmdroid:osmdroid-android:6.1.0", ] diff --git a/examples/multilinetextinput/pyproject.toml b/examples/multilinetextinput/pyproject.toml index 5260132314..d732a40589 100644 --- a/examples/multilinetextinput/pyproject.toml +++ b/examples/multilinetextinput/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/numberinput/pyproject.toml b/examples/numberinput/pyproject.toml index 46cc14bfc7..e1f516ae91 100644 --- a/examples/numberinput/pyproject.toml +++ b/examples/numberinput/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/optioncontainer/pyproject.toml b/examples/optioncontainer/pyproject.toml index 597896bb75..59c83d8d36 100644 --- a/examples/optioncontainer/pyproject.toml +++ b/examples/optioncontainer/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/positron-django/pyproject.toml b/examples/positron-django/pyproject.toml index 76b98578a6..6ab5b8247c 100644 --- a/examples/positron-django/pyproject.toml +++ b/examples/positron-django/pyproject.toml @@ -54,7 +54,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/positron-static/pyproject.toml b/examples/positron-static/pyproject.toml index 029e20c5a1..6b35c3be5c 100644 --- a/examples/positron-static/pyproject.toml +++ b/examples/positron-static/pyproject.toml @@ -53,7 +53,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/progressbar/pyproject.toml b/examples/progressbar/pyproject.toml index 4738496797..a2e503ae49 100644 --- a/examples/progressbar/pyproject.toml +++ b/examples/progressbar/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/resize/pyproject.toml b/examples/resize/pyproject.toml index 863301b255..479e98ed14 100644 --- a/examples/resize/pyproject.toml +++ b/examples/resize/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/screenshot/pyproject.toml b/examples/screenshot/pyproject.toml index eaf8b5712e..be4be7f864 100644 --- a/examples/screenshot/pyproject.toml +++ b/examples/screenshot/pyproject.toml @@ -53,6 +53,5 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", "org.osmdroid:osmdroid-android:6.1.0", ] diff --git a/examples/scrollcontainer/pyproject.toml b/examples/scrollcontainer/pyproject.toml index 9200df53e5..fccf4908a5 100644 --- a/examples/scrollcontainer/pyproject.toml +++ b/examples/scrollcontainer/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/selection/pyproject.toml b/examples/selection/pyproject.toml index e84cf6a4a8..0a73a602b8 100644 --- a/examples/selection/pyproject.toml +++ b/examples/selection/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/slider/pyproject.toml b/examples/slider/pyproject.toml index ddc72fc34b..b43280a7ff 100644 --- a/examples/slider/pyproject.toml +++ b/examples/slider/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/splitcontainer/pyproject.toml b/examples/splitcontainer/pyproject.toml index 2ca8df4836..c69450472e 100644 --- a/examples/splitcontainer/pyproject.toml +++ b/examples/splitcontainer/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/switch_demo/pyproject.toml b/examples/switch_demo/pyproject.toml index 916fa0d83d..4feafec702 100644 --- a/examples/switch_demo/pyproject.toml +++ b/examples/switch_demo/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/table/pyproject.toml b/examples/table/pyproject.toml index d9f029f6f7..5d76571554 100644 --- a/examples/table/pyproject.toml +++ b/examples/table/pyproject.toml @@ -51,7 +51,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/table_source/pyproject.toml b/examples/table_source/pyproject.toml index 643d50deed..2543624135 100644 --- a/examples/table_source/pyproject.toml +++ b/examples/table_source/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/textinput/pyproject.toml b/examples/textinput/pyproject.toml index 7dfa1431aa..5fdf2c1cb0 100644 --- a/examples/textinput/pyproject.toml +++ b/examples/textinput/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tree/pyproject.toml b/examples/tree/pyproject.toml index 0353fe7fcc..1fbcf4925b 100644 --- a/examples/tree/pyproject.toml +++ b/examples/tree/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tree_source/pyproject.toml b/examples/tree_source/pyproject.toml index 5261595f2c..090d331b9c 100644 --- a/examples/tree_source/pyproject.toml +++ b/examples/tree_source/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tutorial0/pyproject.toml b/examples/tutorial0/pyproject.toml index 2ea602c8d4..6d82395ddc 100644 --- a/examples/tutorial0/pyproject.toml +++ b/examples/tutorial0/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tutorial1/pyproject.toml b/examples/tutorial1/pyproject.toml index a6310f9f32..aefa481e7c 100644 --- a/examples/tutorial1/pyproject.toml +++ b/examples/tutorial1/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tutorial2/pyproject.toml b/examples/tutorial2/pyproject.toml index ddedb76aaa..663368288e 100644 --- a/examples/tutorial2/pyproject.toml +++ b/examples/tutorial2/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tutorial3/pyproject.toml b/examples/tutorial3/pyproject.toml index 52e5f6f8a3..e6c5009cc0 100644 --- a/examples/tutorial3/pyproject.toml +++ b/examples/tutorial3/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/tutorial4/pyproject.toml b/examples/tutorial4/pyproject.toml index 09398de29c..b71f2b4672 100644 --- a/examples/tutorial4/pyproject.toml +++ b/examples/tutorial4/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/webview/pyproject.toml b/examples/webview/pyproject.toml index 7380c44ba1..b956fbea39 100644 --- a/examples/webview/pyproject.toml +++ b/examples/webview/pyproject.toml @@ -51,7 +51,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment diff --git a/examples/window/pyproject.toml b/examples/window/pyproject.toml index ce41d60f82..66cb0c3775 100644 --- a/examples/window/pyproject.toml +++ b/examples/window/pyproject.toml @@ -52,7 +52,6 @@ base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", ] # Web deployment From 86ef42a8c3c1abb509f7bdf509c81e4bf9749d43 Mon Sep 17 00:00:00 2001 From: Gwen Sarapata Date: Wed, 22 May 2024 16:30:23 -0400 Subject: [PATCH 3/6] Update pragma coverage for android dependency --- android/src/toga_android/widgets/detailedlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/toga_android/widgets/detailedlist.py b/android/src/toga_android/widgets/detailedlist.py index 90484731fe..41cd4939e3 100644 --- a/android/src/toga_android/widgets/detailedlist.py +++ b/android/src/toga_android/widgets/detailedlist.py @@ -85,7 +85,7 @@ def onClick(self, dialog, which): self.actions[which].handler(row=self.row) -if SwipeRefreshLayout is not None: # prama: no cover +if SwipeRefreshLayout is not None: # pragma: no cover class OnRefreshListener(dynamic_proxy(SwipeRefreshLayout.OnRefreshListener)): def __init__(self, interface): From abe51ed5bd34995eee5b87496d51d0af2803c193 Mon Sep 17 00:00:00 2001 From: Gwen Sarapata Date: Wed, 22 May 2024 16:42:10 -0400 Subject: [PATCH 4/6] Updated changes for issue #2454 --- changes/2454.feature.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/2454.feature.rst b/changes/2454.feature.rst index 9d4bf12915..573b7f954f 100644 --- a/changes/2454.feature.rst +++ b/changes/2454.feature.rst @@ -1 +1 @@ -Remove unnecessary dependencies from Android requirements. \ No newline at end of file +Remove unnecessary dependencies from Android requirements. From 07257a5fdebe3059ddd292ab1e456865b42113de Mon Sep 17 00:00:00 2001 From: Gwen Sarapata Date: Wed, 22 May 2024 17:04:55 -0400 Subject: [PATCH 5/6] Adding AndroidX to spelling wordlist for the docs --- docs/spelling_wordlist | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index 743105bec5..aa4837f1be 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -101,3 +101,4 @@ whitespace Winforms Xcode zoomable +AndroidX From 745fe3a20a5d8fd534e577e2b7e9139ddf741eff Mon Sep 17 00:00:00 2001 From: Gwen Sarapata <111708541+gwen-sarapata@users.noreply.github.com> Date: Wed, 22 May 2024 17:05:20 -0400 Subject: [PATCH 6/6] Update changes/2454.feature.rst Co-authored-by: Russell Keith-Magee --- changes/2454.feature.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/2454.feature.rst b/changes/2454.feature.rst index 573b7f954f..cff7e64800 100644 --- a/changes/2454.feature.rst +++ b/changes/2454.feature.rst @@ -1 +1 @@ -Remove unnecessary dependencies from Android requirements. +Android deployments no longer require the SwipeRefreshLayout component unless the app uses the Toga DetailedList widget.