Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soften runtime requirement for Android SwipeRefreshLayout #2454

Closed
freakboy3742 opened this issue Mar 14, 2024 · 2 comments
Closed

Soften runtime requirement for Android SwipeRefreshLayout #2454

freakboy3742 opened this issue Mar 14, 2024 · 2 comments
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features. good first issue Is this your first time contributing? This could be a good place to start!

Comments

@freakboy3742
Copy link
Member

What is the problem or limitation you are having?

The Android backend currently requires that androidx.swiperefreshlayout:swiperefreshlayout:1.1.0 be available as a runtime dependency, even if you're not using the DetailedList widget where it is used.

Describe the solution you'd like

Briefcase now allows for end-user customisation of gradle dependencies. The dependency on SwipeRefreshLayout should only be required if you actually use the DetailedList widget. If you don't, an app should run without this dependency being declared.

Describe alternatives you've considered

Do nothing. Apps will continue to work; there's just an extra dependency that isn't used.

Additional context

Three changes are required:

  1. Catch an ImportError related to importing SwipeRefreshLayout in DetailedList if the package isn't available.
  2. Raise an error in the DetailedList `create() method if the import wasn't successful
  3. Add note in the DetailedList documentation notes section, that clarifies the required dependency.

The implementation of MapView will be a useful point of comparison - it has ImportError handling when OSMMapView isn't available, raises an error if MapView is used when OSMMapView isn't available, and has documentation describing the required dependency

@freakboy3742 freakboy3742 added enhancement New features, or improvements to existing features. good first issue Is this your first time contributing? This could be a good place to start! android The issue relates to Android mobile support. labels Mar 14, 2024
@gwen-sarapata
Copy link
Contributor

I'll take a look at this at PyCon US 2024

gwen-sarapata added a commit to gwen-sarapata/toga that referenced this issue May 22, 2024
@mhsmith
Copy link
Member

mhsmith commented May 24, 2024

Fixed by #2595.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features. good first issue Is this your first time contributing? This could be a good place to start!
Projects
None yet
Development

No branches or pull requests

3 participants