Skip to content

Conversation

@amire80
Copy link
Collaborator

@amire80 amire80 commented Oct 16, 2025

Description (required)

Lint recommended replacing Switch with SwitchMaterial. This was a very simple replacement, and I tested it in the custom selector, where it is used, and it works as it worked previously.

Lint recommended replacing Switch with SwitchMaterial.
This was a very simple replacement, and I tested it in
the custom selector, where it is used, and it works as
it worked previously.
@github-actions
Copy link

✅ Generated APK variants!

@nicolas-raoul nicolas-raoul requested a review from Copilot October 18, 2025 04:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Replaces the framework Switch with Material Components SwitchMaterial to align with lint recommendations and ensure consistent Material styling.

  • Replace with <com.google.android.material.switchmaterial.SwitchMaterial> in XML layout
  • Update Kotlin type and imports from android.widget.Switch to com.google.android.material.switchmaterial.SwitchMaterial

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/src/main/res/layout/fragment_custom_selector.xml Replaces the widget tag to instantiate SwitchMaterial in the layout
app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageFragment.kt Updates the import and property type to SwitchMaterial

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nicolas-raoul nicolas-raoul merged commit 29b6d0f into commons-app:main Oct 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants