Skip to content

Comments

Improved the Settings UI widgets and #2074

Open
feby-saji wants to merge 2 commits intoandroid:mainfrom
feby-saji:ui/settings-layout-improve
Open

Improved the Settings UI widgets and #2074
feby-saji wants to merge 2 commits intoandroid:mainfrom
feby-saji:ui/settings-layout-improve

Conversation

@feby-saji
Copy link

Replaced RadioButtons with SegmentedButton in Settings screen to align
with Material 3 component recommendations for single-choice selections.

Updated string from "System default" to "System" in feature\settings\impl\src\main\res\values\strings.xm file for consistency with
segmented button labels and improved visual clarity.

Open to feedback if this change conflicts with intended design.

@feby-saji feby-saji requested a review from dturner as a code owner February 20, 2026 12:55
@gemini-code-assist
Copy link

Summary of Changes

Hello @feby-saji, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the user interface of the settings dialog by migrating from traditional radio buttons to modern Material 3 segmented buttons for theme and dark mode preferences. This change improves the visual appeal and adheres to current design guidelines, providing a more polished and intuitive user experience. Additionally, minor string adjustments and essential dependency updates ensure the application remains current and stable.

Highlights

  • UI Component Update: Replaced RadioButtons with Material 3 SegmentedButton components for single-choice selections in the Settings screen, enhancing visual consistency and user experience.
  • String Resource Refinement: Updated the 'System default' string to 'System' in the settings UI for brevity and alignment with the new segmented button labels.
  • Dependency Updates: Upgraded the Android Gradle Plugin from 9.0.0 to 9.0.1 and Android Tools from 32.0.0 to 32.0.1.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • feature/settings/impl/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings/impl/SettingsDialog.kt
    • Replaced RadioButton usage with SegmentedButton and SingleChoiceSegmentedButtonRow for theme brand, dynamic color, and dark mode preferences.
    • Introduced new composable functions SettingsDialogThemeDynamicColorRow and SettingsDialogThemeDarkModeRow to encapsulate the new segmented button logic.
    • Adjusted imports to include new Material 3 components and removed specific DarkThemeConfig enum imports.
    • Modified the AlertDialog width calculation to use LocalWindowInfo.current.containerSize.width for better adaptability.
    • Renamed SettingsDialogThemeChooserRow to SettingsDialogThemeRadioBtn and updated its layout and padding.
  • feature/settings/impl/src/main/res/values/strings.xml
    • Updated the string resource feature_settings_impl_dark_mode_config_system_default from 'System default' to 'System'.
  • gradle/libs.versions.toml
    • Updated androidGradlePlugin from version 9.0.0 to 9.0.1.
    • Updated androidTools from version 32.0.0 to 32.0.1.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the Settings UI by replacing RadioButtons with SegmentedButtons, which aligns with Material 3 design recommendations. The changes are well-implemented and achieve the stated goal. I've added a few review comments with suggestions for improving code consistency and style. The main suggestion is to use the SingleChoiceSegmentedButtonRow component for the 'Dynamic Color' setting as well, to maintain consistency with the 'Dark Mode' setting. Other comments point out minor formatting and code cleanup opportunities.

Comment on lines +317 to +322
activeContainerColor = MaterialTheme.colorScheme.primary ,
activeContentColor = MaterialTheme.colorScheme.onPrimary,
inactiveContainerColor = Color.Transparent,
inactiveContentColor = MaterialTheme.colorScheme.onSurface
),
icon = {}

Choose a reason for hiding this comment

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

medium

A couple of small cleanups can be applied here:

  • There is a trailing space on line 317.
  • The icon = {} parameter on line 322 is redundant because SegmentedButton provides a default for it. It can be removed for cleaner code.
                    activeContainerColor = MaterialTheme.colorScheme.primary,
                    activeContentColor = MaterialTheme.colorScheme.onPrimary,
                    inactiveContainerColor = Color.Transparent,
                    inactiveContentColor = MaterialTheme.colorScheme.onSurface,
                ),

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.

1 participant