Migrate views to Material Components 1.14.0#7
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Begins migrating view rendering from framework
android.widget.*to Material Components for Android 1.14.0, so controls pick up Material 3 styling, theme colors, and dark mode support.Changes
com.google.android.material:materialvia the version catalog).android:Theme.Material.Light.NoActionBartoTheme.Material3.DayNight.NoActionBar— required for MDC widgets to construct, gives every widget Material 3 styling and surface tinting, and adds automatic dark mode support.Buttonrenders withMaterialButton— a drop-in since the binding extendsButton; text label variants get the filled Material 3 style with theme colors and full rounding.Dividerrenders withMaterialDivider— replaces the hand-rolled 2px translucent view with the self-styling Material divider (theme outline color, 1dp, dark mode aware).Not yet migrated
Text→MaterialTextViewis queued behind Add MaterialTextView binding Android#44, which adds the missing binding (already verified at runtime against this branch).Buttonvariant stays onImageButton(needsDrawableplumbing forMaterialButtonicons).TabView(TabLayout/BottomNavigationViewneed menu and listener bridges) and sheet presentation viaBottomSheetDialog/BottomSheetBehavior(would bring real drag-between-detents) are natural follow-ups.Testing
Verified on an emulator (API 36, arm64) with the gallery app: Material 3 theme applied throughout, buttons render in the filled Material style with working click handling, and dividers render with the theme outline color.