[{"data":1,"prerenderedAt":219},["ShallowReactive",2],{"public-settings":3,"post-migrate-compose-material-2-to-material-3-1-5":15,"article-code-1837wwo":218},{"site_title":4,"tagline":5,"site_url":6,"footer_text":5,"social_twitter":7,"social_github":7,"social_youtube":7,"social_linkedin":7,"social_mastodon":7,"og_image":8,"comments_enabled":9,"ads_mode":10,"ads_publisher_id":7,"ads_adtest":11,"ads_in_article_enabled":9,"ads_in_article_slot":7,"ads_in_article_paragraph":12,"ads_end_of_post_enabled":9,"ads_end_of_post_slot":7,"ads_feed_enabled":9,"ads_feed_slot":7,"ads_feed_every":13,"ads_sidebar_enabled":9,"ads_sidebar_slot":7,"ads_consent_enabled":11,"seo_enabled":9,"llms_enabled":9,"verification_google":7,"verification_bing":7,"performance_lcp_preload":9,"pwa_enabled":9,"bookmarks_enabled":9,"comments_moderation":9,"home_carousel_featured":9,"home_carousel_latest":9,"home_carousel_latest_mode":14,"home_carousel_series":9,"home_carousel_topics":9},"Android Learner","Practical Android development, explained clearly.","https:\u002F\u002Fwww.androidlearner.com","","\u002Fmedia\u002Fseed\u002Fcover-llm.webp","1","demo","0","2","3","latest",{"post":16,"comments":217},{"id":17,"title":18,"slug":19,"path":20,"excerpt":21,"cover_image":22,"cover_media_id":23,"status":24,"publish_at":25,"reading_time":26,"seo_title":27,"seo_description":28,"og_image":22,"canonical_url":29,"noindex":30,"featured":30,"faq":31,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":39,"series":38,"tags":44,"author":59,"created_at":64,"updated_at":65,"body_md":66,"body_html":67,"related":68},20,"Material 2 Is Deprecated: Move to Material 3 1.5 and TextFieldState","migrate-compose-material-2-to-material-3-1-5","\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5","Material 3 1.5.0 is stable and Material 2 is no longer actively maintained. This guide covers the theme swap, component move, and TextFieldState migration.","\u002Fmedia\u002F2026\u002F11\u002Faf355ed5e362f80d.webp",57,"published","2026-11-25 01:00:00",8,"Migrate from Compose Material 2 to Material 3 1.5","Compose Material 2 is no longer maintained. Adopt Material 3 1.5.0 and replace deprecated value-based TextField APIs with TextFieldState.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5",false,[32,35],{"question":33,"answer":34},"Is Material 2 removed from the Compose BOM?","No. It is deprecated and no longer actively maintained, but existing Material 2 screens still compile. Plan the migration if you want ongoing bug fixes and the current design language.",{"question":36,"answer":37},"Are Material 3 value-based TextField overloads deprecated in 1.5.0?","No. Android Developers say those Material 3 overloads are not deprecated yet in 1.5.0, but they already recommend the state-based TextField and OutlinedTextField APIs. Value-based BasicTextField and Material 2 TextField are deprecated in Compose 1.13.",null,{"id":40,"name":41,"slug":42,"description":43},2,"Jetpack Compose","jetpack-compose","Modern Android UI.",[45,49,53,55],{"id":46,"name":47,"slug":48,"description":38},28,"Android","android",{"id":50,"name":51,"slug":52,"description":38},4,"Compose","compose",{"id":54,"name":41,"slug":42,"description":38},18,{"id":56,"name":57,"slug":58,"description":38},46,"Material 3","material-3",{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},1,"Super Admin","superadmin","\u002Fu\u002Fsuperadmin","2026-11-24 19:51:49","2026-11-24 19:53:11","Compose Material 3 **1.5.0** became stable on 18 November 2026, in the same train as Jetpack Compose 1.13. The [Material Design blog](https:\u002F\u002Fm3.material.io\u002Fblog\u002Fcompose-material-3-is-stable) and the [Compose November ‘26 release post](https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release) say the same thing in plain language: as Material 3 enters its sixth year, the **Compose Material 2 library is deprecated and no longer actively maintained**.\n\nThat is stronger than “we prefer Material 3.” `androidx.compose.material` will not get new features, and Google is no longer actively maintaining it. The library is not being deleted in this release. Existing Material 2 screens still compile. But if you want bug fixes, accessibility work, and the current Android design language, Material 3 1.5.0 is the supported toolkit.\n\nThis guide covers the migration you should actually do now: swap the dependency and theme, move components to their Material 3 equivalents, and replace deprecated value-based text fields with `TextFieldState`. For the BOM, Kotlin 2.2, and `compileSdk 37.1` requirements that come with this train, start with [What’s new in Jetpack Compose 1.13](\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur).\n\n![Editorial comparison of deprecated Compose Material 2 and stable Material 3 1.5.0.](\u002Fmedia\u002F2026\u002F11\u002Fa9e59cc803c3bab6.webp)\n\n## What 1.5.0 actually ships\n\nMaterial’s own stable-release post is the best checklist. In 1.5.0:\n\n- Experimental annotations dropped from 120 to 58, a cut the Compose release post puts at 52 percent.\n- Almost every new **Expressive** component graduated to stable, including split buttons, button groups, shape-morphing toggle buttons and chips, floating toolbars, wavy progress indicators, and nested menus.\n- Long-standing components such as app bars, search, sliders, carousels, and `BasicAlertDialog` are stable.\n- `Slider` and `RangeSlider` moved to a stateful model with `SliderState`.\n- Expressive color schemes, shapes, and motion are stable. You can set a custom brand font across the type scale at once.\n- The `material3-ripple` artifact adds inset focus rings.\n- Focus order and keyboard support improved across date pickers, time pickers, sliders, scaffolds, and navigation components.\n\nThe important product claim, also from Material: **every core Material 2 component now has a stable Material 3 equivalent.** You are no longer waiting on a missing widget to start the migration.\n\n## Step 1: add Material 3 beside Material 2\n\nThe official [Material 2 to Material 3 migration guide](https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial2-material3) still recommends adding Material 3 alongside Material 2 so you can move screen by screen. With BOM `2026.11.01`, the version is already pinned:\n\n```kotlin\n\u002F\u002F app\u002Fbuild.gradle.kts\ndependencies {\n    implementation(platform(\"androidx.compose:compose-bom:2026.11.01\"))\n    implementation(\"androidx.compose.material3:material3\")\n    \u002F\u002F Keep this only while leftover M2 screens remain:\n    implementation(\"androidx.compose.material:material\")\n}\n```\n\nUse fully qualified imports or a clear package split (`theme.m2` versus `theme.m3`) so a file cannot silently call the wrong `MaterialTheme` or `Button`. When the last `androidx.compose.material` import is gone, drop the Material 2 artifact.\n\n## Step 2: rebuild the theme\n\nMaterial 2 themes are built with `lightColors` \u002F `darkColors` and passed as `colors`. Material 3 uses `lightColorScheme` \u002F `darkColorScheme` and `colorScheme`. Typography and shapes also changed; do not copy a Material 2 `Typography` object across and expect the type scale to line up.\n\n```kotlin\n\u002F\u002F Theme.kt\nimport androidx.compose.foundation.isSystemInDarkTheme\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compose.material3.darkColorScheme\nimport androidx.compose.material3.lightColorScheme\nimport androidx.compose.runtime.Composable\n\nprivate val LightColors = lightColorScheme()\nprivate val DarkColors = darkColorScheme()\n\n@Composable\nfun AndroidLearnerTheme(\n    darkTheme: Boolean = isSystemInDarkTheme(),\n    content: @Composable () -> Unit,\n) {\n    MaterialTheme(\n        colorScheme = if (darkTheme) DarkColors else LightColors,\n        content = content,\n    )\n}\n```\n\nReplace those default schemes with your brand palette. Android Developers still point teams at [Material Theme Builder](https:\u002F\u002Fm3.material.io\u002Ftheme-builder) to expand a primary color into a full Material 3 scheme, which is a better starting point than hand-mapping every Material 2 role. Watch for names that look similar and are not: `primaryVariant` is gone; surface, container, and “on” roles are more specific than in Material 2.\n\nWrap one migrated screen at a time in the Material 3 theme. A mixed screen, where a Material 2 list item sits inside a Material 3 scaffold, is how you get contrast and padding bugs that look like “the migration broke our design.”\n\n## Step 3: move components, then delete Material 2\n\nThere is no automatic rewrite that is safe on a large app. Do it by surface: theme, then scaffold and app bars, then buttons, then lists, then dialogs, then text fields. The official catalog is the [Compose Material 3 catalog](https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial3). Prefer that over memory of Material 2 parameter names; several APIs changed shape as well as package.\n\nA few mechanical patterns show up in almost every module:\n\n- `androidx.compose.material.*` imports become `androidx.compose.material3.*`.\n- `MaterialTheme.colors.primary` becomes `MaterialTheme.colorScheme.primary`.\n- Elevation and surface usage often need a second look, because Material 3 leans on surface containers and tone rather than a single `elevation` number.\n- View-based Material components are a separate issue. Material Views is in maintenance mode; Google’s Material 3 post tells teams to migrate those screens to Compose when they can. That is not a 1.5.0 requirement, and it should not block a Compose Material 2 to Material 3 change.\n\n## Step 4: replace value-based text fields with TextFieldState\n\nThis is the part of the release that will generate compiler warnings if you skip it. In Compose 1.13, value-based `BasicTextField`, Material 2 `TextField`, and `VisualTransformation` are deprecated. The [state-based migration guide](https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Ftext\u002Fmigrate-state-based), last updated 18 November 2026, is the source for the snippets below.\n\nMaterial 3’s value-based `TextField` overloads are **not deprecated yet** in 1.5.0. Google still recommends moving to the state-based `TextField` and `OutlinedTextField` overloads now, for synchronous state, performance, and upcoming features. If you are still on Material 2, migrate directly to Material 3’s state-based fields rather than investing in the deprecated Material 2 API.\n\nThe simple case loses `value`, `onValueChange`, and `singleLine`:\n\n```kotlin\n\u002F\u002F Before: value-based\n@Composable\nfun OldSimpleTextField() {\n    var state by rememberSaveable { mutableStateOf(\"\") }\n    TextField(\n        value = state,\n        onValueChange = { state = it },\n        singleLine = true,\n    )\n}\n\n\u002F\u002F After: state-based\n@Composable\nfun NewSimpleTextField() {\n    TextField(\n        state = rememberTextFieldState(),\n        lineLimits = TextFieldLineLimits.SingleLine,\n    )\n}\n```\n\nInput filtering moves out of `onValueChange` and into `InputTransformation`, which runs immediately after user input and updates a `TextFieldBuffer`. That is the point of the new model: it avoids the IME synchronization issues of a round-trip through hoisted string state. Display formatting, such as adding dashes to a card number, moves to `OutputTransformation`. You no longer write an `OffsetMapping` by hand; the output transformation inserts characters and mapping is handled for you.\n\n```kotlin\n@Composable\nfun CardNumberField() {\n    val state = rememberTextFieldState()\n    TextField(\n        state = state,\n        inputTransformation = InputTransformation.maxLength(16),\n        outputTransformation = OutputTransformation {\n            if (length > 4) insert(4, \"-\")\n            if (length > 9) insert(9, \"-\")\n            if (length > 14) insert(14, \"-\")\n        },\n    )\n}\n```\n\nTo set text from a repository or a paste action, call `TextFieldState.setTextAndPlaceCursorAtEnd` or edit the buffer with `state.edit { ... }`. `maxLines = 10` becomes `lineLimits = TextFieldLineLimits.MultiLine(maxHeightInLines = 10)`. Passwords use `SecureTextField`.\n\n![Editorial diagram contrasting deprecated value-based TextField callbacks with recommended TextFieldState, InputTransformation, and OutputTransformation.](\u002Fmedia\u002F2026\u002F11\u002F464092b2ac0ac219.webp)\n\n## Where does the state live?\n\nThis is the question that stalls most migrations, especially if you already hoist a `UiState` data class through a `StateFlow` the way we described in [Compose state hoisting](\u002Fposts\u002Fjetpack-compose-state-hoisting) and in [Kotlin coroutines and Flow](\u002Fposts\u002Fkotlin-coroutines-and-flow).\n\nGoogle’s migration guide is direct: `TextFieldState` is a state holder backed by the Snapshot system, in the same category as `StateFlow`, not a View. **Keeping a `TextFieldState` on the ViewModel is not an inherently bad practice.** The recommended simple approach is to take `username: String` out of `UiState` and hold `val usernameState = TextFieldState()` on the ViewModel, then pass that object to `TextField`.\n\n```kotlin\nclass LoginViewModel : ViewModel() {\n    val usernameState = TextFieldState()\n    val passwordState = TextFieldState()\n}\n\n@Composable\nfun LoginForm(loginViewModel: LoginViewModel, modifier: Modifier = Modifier) {\n    Column(modifier) {\n        TextField(state = loginViewModel.usernameState)\n        SecureTextField(state = loginViewModel.passwordState)\n    }\n}\n```\n\nIf you cannot change the ViewModel yet, the guide documents a conforming approach: create a `rememberTextFieldState` from the current `UiState` strings, then push changes back with `snapshotFlow { state.text.toString() }` inside a `LaunchedEffect`. The `StateFlow` remains a store, but it is no longer the source of truth that drives the field. That split is what avoids the IME races described in Google’s “Effective state management for TextField in Compose” guidance, which the migration page cites.\n\n`rememberTextFieldState()` already includes save-and-restore. If you construct `TextFieldState` in a ViewModel yourself, you have to hook saved state separately, as the [Saved State module for ViewModel](https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Flibraries\u002Farchitecture\u002Fviewmodel\u002Fviewmodel-savedstate) documentation describes.\n\n## A migration order that will actually finish\n\n1. Add Material 3 1.5.0 through BOM `2026.11.01`.\n2. Build a Material 3 theme and use it on one new or low-risk screen.\n3. Move scaffolds, buttons, and lists on that screen, then repeat by feature.\n4. Replace text fields with `TextFieldState` as you touch each form. Do not leave Material 2 `TextField` in a “later” bucket; it is already deprecated.\n5. Remove `androidx.compose.material` when nothing imports it.\n\nYou do not need to rewrite the entire app in a single pull request. You do need a finish line. Material 2 will not start getting the bug fixes and keyboard work that 1.5.0 just shipped on Material 3.\n\n## FAQ\n\n**Is Material 2 removed from the BOM?** No. It is deprecated and no longer actively maintained. Your existing screens still compile. Plan the migration anyway; this is not a “wait for removal” situation if you want ongoing fixes.\n\n**Are Material 3 value-based TextField overloads deprecated in 1.5.0?** No. The official release post says they are not deprecated yet, and still recommends the state-based overloads. Value-based `BasicTextField` and Material 2 `TextField` *are* deprecated in Compose 1.13.\n\n**Do I have to put TextFieldState in my ViewModel?** No, but Google recommends it when the field’s source of truth lives off the composable. A `String` inside `UiState` driven back into `value`\u002F`onValueChange` is the pattern the new API is designed to leave behind.\n\n## Sources\n\n- [Compose Material 3 1.5.0 is stable](https:\u002F\u002Fm3.material.io\u002Fblog\u002Fcompose-material-3-is-stable), Material Android, 18 November 2026.\n- [What’s new in the Jetpack Compose November ‘26 release](https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release), 18 November 2026.\n- [Migrate from Material 2 to Material 3 in Compose](https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial2-material3).\n- [Migrate to state-based text fields](https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Ftext\u002Fmigrate-state-based), last updated 18 November 2026.\n- [Compose Material 3 release notes](https:\u002F\u002Fdeveloper.android.com\u002Fjetpack\u002Fandroidx\u002Freleases\u002Fcompose-material3).\n\n*Diagrams are original editorial illustrations for Android Learner, not Google or Material Design assets.*\n","\u003Cp>Compose Material 3 \u003Cstrong>1.5.0\u003C\u002Fstrong> became stable on 18 November 2026, in the same train as Jetpack Compose 1.13. The \u003Ca href=\"https:\u002F\u002Fm3.material.io\u002Fblog\u002Fcompose-material-3-is-stable\">Material Design blog\u003C\u002Fa> and the \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release\">Compose November ‘26 release post\u003C\u002Fa> say the same thing in plain language: as Material 3 enters its sixth year, the \u003Cstrong>Compose Material 2 library is deprecated and no longer actively maintained\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>That is stronger than “we prefer Material 3.” \u003Ccode>androidx.compose.material\u003C\u002Fcode> will not get new features, and Google is no longer actively maintaining it. The library is not being deleted in this release. Existing Material 2 screens still compile. But if you want bug fixes, accessibility work, and the current Android design language, Material 3 1.5.0 is the supported toolkit.\u003C\u002Fp>\n\u003Cp>This guide covers the migration you should actually do now: swap the dependency and theme, move components to their Material 3 equivalents, and replace deprecated value-based text fields with \u003Ccode>TextFieldState\u003C\u002Fcode>. For the BOM, Kotlin 2.2, and \u003Ccode>compileSdk 37.1\u003C\u002Fcode> requirements that come with this train, start with \u003Ca href=\"\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur\">What’s new in Jetpack Compose 1.13\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002F2026\u002F11\u002Fa9e59cc803c3bab6.webp\" alt=\"Editorial comparison of deprecated Compose Material 2 and stable Material 3 1.5.0.\" \u002F>\u003C\u002Fp>\n\u003Ch2 id=\"what-1-5-0-actually-ships\">What 1.5.0 actually ships\u003C\u002Fh2>\n\u003Cp>Material’s own stable-release post is the best checklist. In 1.5.0:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Experimental annotations dropped from 120 to 58, a cut the Compose release post puts at 52 percent.\u003C\u002Fli>\n\u003Cli>Almost every new \u003Cstrong>Expressive\u003C\u002Fstrong> component graduated to stable, including split buttons, button groups, shape-morphing toggle buttons and chips, floating toolbars, wavy progress indicators, and nested menus.\u003C\u002Fli>\n\u003Cli>Long-standing components such as app bars, search, sliders, carousels, and \u003Ccode>BasicAlertDialog\u003C\u002Fcode> are stable.\u003C\u002Fli>\n\u003Cli>\u003Ccode>Slider\u003C\u002Fcode> and \u003Ccode>RangeSlider\u003C\u002Fcode> moved to a stateful model with \u003Ccode>SliderState\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Expressive color schemes, shapes, and motion are stable. You can set a custom brand font across the type scale at once.\u003C\u002Fli>\n\u003Cli>The \u003Ccode>material3-ripple\u003C\u002Fcode> artifact adds inset focus rings.\u003C\u002Fli>\n\u003Cli>Focus order and keyboard support improved across date pickers, time pickers, sliders, scaffolds, and navigation components.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The important product claim, also from Material: \u003Cstrong>every core Material 2 component now has a stable Material 3 equivalent.\u003C\u002Fstrong> You are no longer waiting on a missing widget to start the migration.\u003C\u002Fp>\n\u003Ch2 id=\"step-1-add-material-3-beside-material-2\">Step 1: add Material 3 beside Material 2\u003C\u002Fh2>\n\u003Cp>The official \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial2-material3\">Material 2 to Material 3 migration guide\u003C\u002Fa> still recommends adding Material 3 alongside Material 2 so you can move screen by screen. With BOM \u003Ccode>2026.11.01\u003C\u002Fcode>, the version is already pinned:\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F app\u002Fbuild.gradle.kts\ndependencies {\n    implementation(platform(&quot;androidx.compose:compose-bom:2026.11.01&quot;))\n    implementation(&quot;androidx.compose.material3:material3&quot;)\n    \u002F\u002F Keep this only while leftover M2 screens remain:\n    implementation(&quot;androidx.compose.material:material&quot;)\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Use fully qualified imports or a clear package split (\u003Ccode>theme.m2\u003C\u002Fcode> versus \u003Ccode>theme.m3\u003C\u002Fcode>) so a file cannot silently call the wrong \u003Ccode>MaterialTheme\u003C\u002Fcode> or \u003Ccode>Button\u003C\u002Fcode>. When the last \u003Ccode>androidx.compose.material\u003C\u002Fcode> import is gone, drop the Material 2 artifact.\u003C\u002Fp>\n\u003Ch2 id=\"step-2-rebuild-the-theme\">Step 2: rebuild the theme\u003C\u002Fh2>\n\u003Cp>Material 2 themes are built with \u003Ccode>lightColors\u003C\u002Fcode> \u002F \u003Ccode>darkColors\u003C\u002Fcode> and passed as \u003Ccode>colors\u003C\u002Fcode>. Material 3 uses \u003Ccode>lightColorScheme\u003C\u002Fcode> \u002F \u003Ccode>darkColorScheme\u003C\u002Fcode> and \u003Ccode>colorScheme\u003C\u002Fcode>. Typography and shapes also changed; do not copy a Material 2 \u003Ccode>Typography\u003C\u002Fcode> object across and expect the type scale to line up.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F Theme.kt\nimport androidx.compose.foundation.isSystemInDarkTheme\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compose.material3.darkColorScheme\nimport androidx.compose.material3.lightColorScheme\nimport androidx.compose.runtime.Composable\n\nprivate val LightColors = lightColorScheme()\nprivate val DarkColors = darkColorScheme()\n\n@Composable\nfun AndroidLearnerTheme(\n    darkTheme: Boolean = isSystemInDarkTheme(),\n    content: @Composable () -&gt; Unit,\n) {\n    MaterialTheme(\n        colorScheme = if (darkTheme) DarkColors else LightColors,\n        content = content,\n    )\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Replace those default schemes with your brand palette. Android Developers still point teams at \u003Ca href=\"https:\u002F\u002Fm3.material.io\u002Ftheme-builder\">Material Theme Builder\u003C\u002Fa> to expand a primary color into a full Material 3 scheme, which is a better starting point than hand-mapping every Material 2 role. Watch for names that look similar and are not: \u003Ccode>primaryVariant\u003C\u002Fcode> is gone; surface, container, and “on” roles are more specific than in Material 2.\u003C\u002Fp>\n\u003Cp>Wrap one migrated screen at a time in the Material 3 theme. A mixed screen, where a Material 2 list item sits inside a Material 3 scaffold, is how you get contrast and padding bugs that look like “the migration broke our design.”\u003C\u002Fp>\n\u003Ch2 id=\"step-3-move-components-then-delete-material-2\">Step 3: move components, then delete Material 2\u003C\u002Fh2>\n\u003Cp>There is no automatic rewrite that is safe on a large app. Do it by surface: theme, then scaffold and app bars, then buttons, then lists, then dialogs, then text fields. The official catalog is the \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial3\">Compose Material 3 catalog\u003C\u002Fa>. Prefer that over memory of Material 2 parameter names; several APIs changed shape as well as package.\u003C\u002Fp>\n\u003Cp>A few mechanical patterns show up in almost every module:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>androidx.compose.material.*\u003C\u002Fcode> imports become \u003Ccode>androidx.compose.material3.*\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>MaterialTheme.colors.primary\u003C\u002Fcode> becomes \u003Ccode>MaterialTheme.colorScheme.primary\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Elevation and surface usage often need a second look, because Material 3 leans on surface containers and tone rather than a single \u003Ccode>elevation\u003C\u002Fcode> number.\u003C\u002Fli>\n\u003Cli>View-based Material components are a separate issue. Material Views is in maintenance mode; Google’s Material 3 post tells teams to migrate those screens to Compose when they can. That is not a 1.5.0 requirement, and it should not block a Compose Material 2 to Material 3 change.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"step-4-replace-value-based-text-fields-with-textfieldstate\">Step 4: replace value-based text fields with TextFieldState\u003C\u002Fh2>\n\u003Cp>This is the part of the release that will generate compiler warnings if you skip it. In Compose 1.13, value-based \u003Ccode>BasicTextField\u003C\u002Fcode>, Material 2 \u003Ccode>TextField\u003C\u002Fcode>, and \u003Ccode>VisualTransformation\u003C\u002Fcode> are deprecated. The \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Ftext\u002Fmigrate-state-based\">state-based migration guide\u003C\u002Fa>, last updated 18 November 2026, is the source for the snippets below.\u003C\u002Fp>\n\u003Cp>Material 3’s value-based \u003Ccode>TextField\u003C\u002Fcode> overloads are \u003Cstrong>not deprecated yet\u003C\u002Fstrong> in 1.5.0. Google still recommends moving to the state-based \u003Ccode>TextField\u003C\u002Fcode> and \u003Ccode>OutlinedTextField\u003C\u002Fcode> overloads now, for synchronous state, performance, and upcoming features. If you are still on Material 2, migrate directly to Material 3’s state-based fields rather than investing in the deprecated Material 2 API.\u003C\u002Fp>\n\u003Cp>The simple case loses \u003Ccode>value\u003C\u002Fcode>, \u003Ccode>onValueChange\u003C\u002Fcode>, and \u003Ccode>singleLine\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F Before: value-based\n@Composable\nfun OldSimpleTextField() {\n    var state by rememberSaveable { mutableStateOf(&quot;&quot;) }\n    TextField(\n        value = state,\n        onValueChange = { state = it },\n        singleLine = true,\n    )\n}\n\n\u002F\u002F After: state-based\n@Composable\nfun NewSimpleTextField() {\n    TextField(\n        state = rememberTextFieldState(),\n        lineLimits = TextFieldLineLimits.SingleLine,\n    )\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Input filtering moves out of \u003Ccode>onValueChange\u003C\u002Fcode> and into \u003Ccode>InputTransformation\u003C\u002Fcode>, which runs immediately after user input and updates a \u003Ccode>TextFieldBuffer\u003C\u002Fcode>. That is the point of the new model: it avoids the IME synchronization issues of a round-trip through hoisted string state. Display formatting, such as adding dashes to a card number, moves to \u003Ccode>OutputTransformation\u003C\u002Fcode>. You no longer write an \u003Ccode>OffsetMapping\u003C\u002Fcode> by hand; the output transformation inserts characters and mapping is handled for you.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">@Composable\nfun CardNumberField() {\n    val state = rememberTextFieldState()\n    TextField(\n        state = state,\n        inputTransformation = InputTransformation.maxLength(16),\n        outputTransformation = OutputTransformation {\n            if (length &gt; 4) insert(4, &quot;-&quot;)\n            if (length &gt; 9) insert(9, &quot;-&quot;)\n            if (length &gt; 14) insert(14, &quot;-&quot;)\n        },\n    )\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>To set text from a repository or a paste action, call \u003Ccode>TextFieldState.setTextAndPlaceCursorAtEnd\u003C\u002Fcode> or edit the buffer with \u003Ccode>state.edit { ... }\u003C\u002Fcode>. \u003Ccode>maxLines = 10\u003C\u002Fcode> becomes \u003Ccode>lineLimits = TextFieldLineLimits.MultiLine(maxHeightInLines = 10)\u003C\u002Fcode>. Passwords use \u003Ccode>SecureTextField\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002F2026\u002F11\u002F464092b2ac0ac219.webp\" alt=\"Editorial diagram contrasting deprecated value-based TextField callbacks with recommended TextFieldState, InputTransformation, and OutputTransformation.\" \u002F>\u003C\u002Fp>\n\u003Ch2 id=\"where-does-the-state-live\">Where does the state live?\u003C\u002Fh2>\n\u003Cp>This is the question that stalls most migrations, especially if you already hoist a \u003Ccode>UiState\u003C\u002Fcode> data class through a \u003Ccode>StateFlow\u003C\u002Fcode> the way we described in \u003Ca href=\"\u002Fposts\u002Fjetpack-compose-state-hoisting\">Compose state hoisting\u003C\u002Fa> and in \u003Ca href=\"\u002Fposts\u002Fkotlin-coroutines-and-flow\">Kotlin coroutines and Flow\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>Google’s migration guide is direct: \u003Ccode>TextFieldState\u003C\u002Fcode> is a state holder backed by the Snapshot system, in the same category as \u003Ccode>StateFlow\u003C\u002Fcode>, not a View. \u003Cstrong>Keeping a \u003Ccode>TextFieldState\u003C\u002Fcode> on the ViewModel is not an inherently bad practice.\u003C\u002Fstrong> The recommended simple approach is to take \u003Ccode>username: String\u003C\u002Fcode> out of \u003Ccode>UiState\u003C\u002Fcode> and hold \u003Ccode>val usernameState = TextFieldState()\u003C\u002Fcode> on the ViewModel, then pass that object to \u003Ccode>TextField\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">class LoginViewModel : ViewModel() {\n    val usernameState = TextFieldState()\n    val passwordState = TextFieldState()\n}\n\n@Composable\nfun LoginForm(loginViewModel: LoginViewModel, modifier: Modifier = Modifier) {\n    Column(modifier) {\n        TextField(state = loginViewModel.usernameState)\n        SecureTextField(state = loginViewModel.passwordState)\n    }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>If you cannot change the ViewModel yet, the guide documents a conforming approach: create a \u003Ccode>rememberTextFieldState\u003C\u002Fcode> from the current \u003Ccode>UiState\u003C\u002Fcode> strings, then push changes back with \u003Ccode>snapshotFlow { state.text.toString() }\u003C\u002Fcode> inside a \u003Ccode>LaunchedEffect\u003C\u002Fcode>. The \u003Ccode>StateFlow\u003C\u002Fcode> remains a store, but it is no longer the source of truth that drives the field. That split is what avoids the IME races described in Google’s “Effective state management for TextField in Compose” guidance, which the migration page cites.\u003C\u002Fp>\n\u003Cp>\u003Ccode>rememberTextFieldState()\u003C\u002Fcode> already includes save-and-restore. If you construct \u003Ccode>TextFieldState\u003C\u002Fcode> in a ViewModel yourself, you have to hook saved state separately, as the \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Flibraries\u002Farchitecture\u002Fviewmodel\u002Fviewmodel-savedstate\">Saved State module for ViewModel\u003C\u002Fa> documentation describes.\u003C\u002Fp>\n\u003Ch2 id=\"a-migration-order-that-will-actually-finish\">A migration order that will actually finish\u003C\u002Fh2>\n\u003Col>\n\u003Cli>Add Material 3 1.5.0 through BOM \u003Ccode>2026.11.01\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Build a Material 3 theme and use it on one new or low-risk screen.\u003C\u002Fli>\n\u003Cli>Move scaffolds, buttons, and lists on that screen, then repeat by feature.\u003C\u002Fli>\n\u003Cli>Replace text fields with \u003Ccode>TextFieldState\u003C\u002Fcode> as you touch each form. Do not leave Material 2 \u003Ccode>TextField\u003C\u002Fcode> in a “later” bucket; it is already deprecated.\u003C\u002Fli>\n\u003Cli>Remove \u003Ccode>androidx.compose.material\u003C\u002Fcode> when nothing imports it.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>You do not need to rewrite the entire app in a single pull request. You do need a finish line. Material 2 will not start getting the bug fixes and keyboard work that 1.5.0 just shipped on Material 3.\u003C\u002Fp>\n\u003Ch2 id=\"faq\">FAQ\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Is Material 2 removed from the BOM?\u003C\u002Fstrong> No. It is deprecated and no longer actively maintained. Your existing screens still compile. Plan the migration anyway; this is not a “wait for removal” situation if you want ongoing fixes.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Are Material 3 value-based TextField overloads deprecated in 1.5.0?\u003C\u002Fstrong> No. The official release post says they are not deprecated yet, and still recommends the state-based overloads. Value-based \u003Ccode>BasicTextField\u003C\u002Fcode> and Material 2 \u003Ccode>TextField\u003C\u002Fcode> \u003Cem>are\u003C\u002Fem> deprecated in Compose 1.13.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Do I have to put TextFieldState in my ViewModel?\u003C\u002Fstrong> No, but Google recommends it when the field’s source of truth lives off the composable. A \u003Ccode>String\u003C\u002Fcode> inside \u003Ccode>UiState\u003C\u002Fcode> driven back into \u003Ccode>value\u003C\u002Fcode>\u002F\u003Ccode>onValueChange\u003C\u002Fcode> is the pattern the new API is designed to leave behind.\u003C\u002Fp>\n\u003Ch2 id=\"sources\">Sources\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fm3.material.io\u002Fblog\u002Fcompose-material-3-is-stable\">Compose Material 3 1.5.0 is stable\u003C\u002Fa>, Material Android, 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release\">What’s new in the Jetpack Compose November ‘26 release\u003C\u002Fa>, 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial2-material3\">Migrate from Material 2 to Material 3 in Compose\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Ftext\u002Fmigrate-state-based\">Migrate to state-based text fields\u003C\u002Fa>, last updated 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fjetpack\u002Fandroidx\u002Freleases\u002Fcompose-material3\">Compose Material 3 release notes\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cem>Diagrams are original editorial illustrations for Android Learner, not Google or Material Design assets.\u003C\u002Fem>\u003C\u002Fp>\n",[69,108,147,183],{"id":70,"title":71,"slug":72,"path":73,"excerpt":74,"cover_image":75,"cover_media_id":76,"status":24,"publish_at":77,"reading_time":26,"seo_title":78,"seo_description":79,"og_image":75,"canonical_url":80,"noindex":30,"featured":30,"faq":81,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":88,"series":38,"tags":93,"author":105,"created_at":106,"updated_at":107},22,"Google Play's 16 KB Page Size Rule: What to Fix Before 1 February 2027","android-16kb-page-size-google-play-deadline","\u002Fposts\u002Fandroid-16kb-page-size-google-play-deadline","Apps that target API 35+ and ship native code must support 16 KB pages before 1 February 2027 or Play will block updates. Pure Kotlin and Java apps are already compatible.","\u002Fmedia\u002F2026\u002F11\u002F723c07ce07ee95c5.webp",62,"2026-11-25 02:00:00","Android 16 KB page size: Play deadline 1 February 2027","If your app targets API 35+ and ships native code, Google Play will block updates after 1 February 2027 unless you support 16 KB pages. How to check, rebuild, and test.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fandroid-16kb-page-size-google-play-deadline",[82,85],{"question":83,"answer":84},"Does a pure Kotlin or Java app need a native rebuild?","No. Android Developers say that if the app and all of its libraries are written only in Java or Kotlin, it already supports 16 KB devices. They still recommend testing on a 16 KB emulator image.",{"question":86,"answer":87},"Will Google remove my app from Play on 1 February 2027 if I miss the deadline?","The official compatibility section says you will not be able to release updates that do not support 16 KB pages. It does not say existing listings are removed. Check Play Console for the wording on your own app, and re-read the page-sizes guide for the current date.",{"id":89,"name":90,"slug":91,"description":92},5,"Performance","performance","Startup, frames, and profiles.",[94,95,99,103],{"id":46,"name":47,"slug":48,"description":38},{"id":96,"name":97,"slug":98,"description":38},49,"Google Play","google-play",{"id":100,"name":101,"slug":102,"description":38},50,"NDK","ndk",{"id":104,"name":90,"slug":91,"description":38},12,{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 19:51:51","2026-11-24 19:53:15",{"id":109,"title":110,"slug":111,"path":112,"excerpt":113,"cover_image":114,"cover_media_id":115,"status":24,"publish_at":116,"reading_time":117,"seo_title":118,"seo_description":119,"og_image":114,"canonical_url":120,"noindex":30,"featured":30,"faq":121,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":128,"series":38,"tags":132,"author":144,"created_at":145,"updated_at":146},21,"Type-Safe Deep Links in Jetpack Navigation 3","jetpack-navigation-3-type-safe-deep-links","\u002Fposts\u002Fjetpack-navigation-3-type-safe-deep-links","Navigation 3 1.2 turns incoming URIs into typed NavKeys. This tutorial covers intent filters, UriDeepLinkMatcher, custom serializers, and synthetic back stacks.","\u002Fmedia\u002F2026\u002F11\u002F6efbb3f253329bad.webp",60,"2026-11-25 01:30:00",6,"Type-safe deep links with Jetpack Navigation 3 1.2","Map URIs to @Serializable NavKeys with UriDeepLinkMatcher, Kotlin Serialization, and DeepLinkSerializer in Navigation 3 1.2.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fjetpack-navigation-3-type-safe-deep-links",[122,125],{"question":123,"answer":124},"Does Navigation 3 replace AndroidManifest intent filters?","No. Navigation 3 1.2 matches a DeepLinkRequest after the system has already delivered an Intent to your activity. You still have to declare intent filters for the URIs you handle.",{"question":126,"answer":127},"What happens if a deep link argument has the wrong type?","UriDeepLinkMatcher.match returns null for ordinary parse misses, such as a non-integer value for an Int property, so another matcher can still run. Unsupported key shapes like Map arguments can throw at match time.",{"id":50,"name":129,"slug":130,"description":131},"Architecture","architecture","App architecture and data layers.",[133,134,136,140],{"id":46,"name":47,"slug":48,"description":38},{"id":135,"name":129,"slug":130,"description":38},48,{"id":137,"name":138,"slug":139,"description":38},24,"Jetpack","jetpack",{"id":141,"name":142,"slug":143,"description":38},47,"Navigation","navigation",{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 19:51:50","2026-11-24 19:53:13",{"id":148,"title":149,"slug":150,"path":151,"excerpt":152,"cover_image":153,"cover_media_id":154,"status":24,"publish_at":155,"reading_time":156,"seo_title":157,"seo_description":158,"og_image":153,"canonical_url":159,"noindex":30,"featured":30,"faq":160,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":167,"series":38,"tags":168,"author":180,"created_at":181,"updated_at":182},19,"What's New in Jetpack Compose 1.13 (November 2026)","jetpack-compose-1-13-flexbox-grid-progressive-blur","\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur","Compose 1.13 is stable in BOM 2026.11.01. Here is how to upgrade, when to use FlexBox and Grid, and what progressive blur and the new deprecations actually mean.","\u002Fmedia\u002F2026\u002F11\u002F6fab1724acc6e8e3.webp",54,"2026-11-25 00:30:00",7,"Jetpack Compose 1.13: FlexBox, Grid, and Progressive Blur","Upgrade to Compose BOM 2026.11.01. Stable FlexBox and Grid, progressive blur, PolygonShape, and the Kotlin 2.2 \u002F compileSdk 37.1 requirements.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur",[161,164],{"question":162,"answer":163},"Do I need Kotlin 2.2 to use Compose 1.13?","Yes. The official 18 November 2026 Compose release post requires Kotlin 2.2 or newer and compileSdk 37.1 when you upgrade to Compose BOM 2026.11.01.",{"question":165,"answer":166},"Should I replace FlowRow and FlowColumn immediately?","Not necessarily. Android Developers say FlexBox supersedes the Flow layouts and recommend FlexBox for new code. Existing Flow call sites still compile; move them when you next touch those screens.",{"id":40,"name":41,"slug":42,"description":43},[169,170,171,175,179],{"id":46,"name":47,"slug":48,"description":38},{"id":50,"name":51,"slug":52,"description":38},{"id":172,"name":173,"slug":174,"description":38},44,"FlexBox","flexbox",{"id":176,"name":177,"slug":178,"description":38},45,"Grid","grid",{"id":54,"name":41,"slug":42,"description":38},{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 19:51:47","2026-11-24 19:53:09",{"id":54,"title":184,"slug":185,"path":186,"excerpt":187,"cover_image":188,"cover_media_id":172,"status":24,"publish_at":189,"reading_time":190,"seo_title":191,"seo_description":192,"og_image":188,"canonical_url":193,"noindex":30,"featured":30,"faq":194,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":195,"series":38,"tags":199,"author":215,"created_at":216,"updated_at":216},"Can You Play GTA 6 on Android? Official Platforms, Remote Play, and Fake APKs","can-you-play-gta-6-on-android","\u002Fposts\u002Fcan-you-play-gta-6-on-android","As of 24 November 2026, GTA 6 is not a native Android game. Here is what Rockstar actually released, how official Remote Play works, and how to spot unofficial APK offers.","\u002Fmedia\u002F2026\u002F11\u002F7e0bf4b732de8bdb.webp","2026-11-24 06:00:00",11,"Can You Play GTA 6 on Android? Official Facts (Nov 2026)","GTA 6 launched 19 Nov 2026 on PS5 and Xbox Series X|S only. This guide covers official Remote Play, what cloud posts actually say, and how to avoid unofficial APK downloads.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fcan-you-play-gta-6-on-android",[],{"id":117,"name":196,"slug":197,"description":198},"Android Development","android-development","Tutorials and guides imported from the original Android Learner blog.",[200,201,204,208,212],{"id":46,"name":47,"slug":48,"description":38},{"id":202,"name":203,"slug":203,"description":38},40,"gaming",{"id":205,"name":206,"slug":207,"description":38},41,"GTA 6","gta-6",{"id":209,"name":210,"slug":211,"description":38},42,"Remote Play","remote-play",{"id":213,"name":214,"slug":214,"description":38},43,"security",{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 06:24:53",[],"\u003Cp>Compose Material 3 \u003Cstrong>1.5.0\u003C\u002Fstrong> became stable on 18 November 2026, in the same train as Jetpack Compose 1.13. The \u003Ca href=\"https:\u002F\u002Fm3.material.io\u002Fblog\u002Fcompose-material-3-is-stable\">Material Design blog\u003C\u002Fa> and the \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release\">Compose November ‘26 release post\u003C\u002Fa> say the same thing in plain language: as Material 3 enters its sixth year, the \u003Cstrong>Compose Material 2 library is deprecated and no longer actively maintained\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>That is stronger than “we prefer Material 3.” \u003Ccode>androidx.compose.material\u003C\u002Fcode> will not get new features, and Google is no longer actively maintaining it. The library is not being deleted in this release. Existing Material 2 screens still compile. But if you want bug fixes, accessibility work, and the current Android design language, Material 3 1.5.0 is the supported toolkit.\u003C\u002Fp>\n\u003Cp>This guide covers the migration you should actually do now: swap the dependency and theme, move components to their Material 3 equivalents, and replace deprecated value-based text fields with \u003Ccode>TextFieldState\u003C\u002Fcode>. For the BOM, Kotlin 2.2, and \u003Ccode>compileSdk 37.1\u003C\u002Fcode> requirements that come with this train, start with \u003Ca href=\"\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur\">What’s new in Jetpack Compose 1.13\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002F2026\u002F11\u002Fa9e59cc803c3bab6.webp\" alt=\"Editorial comparison of deprecated Compose Material 2 and stable Material 3 1.5.0.\" \u002F>\u003C\u002Fp>\n\u003Ch2 id=\"what-1-5-0-actually-ships\">What 1.5.0 actually ships\u003C\u002Fh2>\n\u003Cp>Material’s own stable-release post is the best checklist. In 1.5.0:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Experimental annotations dropped from 120 to 58, a cut the Compose release post puts at 52 percent.\u003C\u002Fli>\n\u003Cli>Almost every new \u003Cstrong>Expressive\u003C\u002Fstrong> component graduated to stable, including split buttons, button groups, shape-morphing toggle buttons and chips, floating toolbars, wavy progress indicators, and nested menus.\u003C\u002Fli>\n\u003Cli>Long-standing components such as app bars, search, sliders, carousels, and \u003Ccode>BasicAlertDialog\u003C\u002Fcode> are stable.\u003C\u002Fli>\n\u003Cli>\u003Ccode>Slider\u003C\u002Fcode> and \u003Ccode>RangeSlider\u003C\u002Fcode> moved to a stateful model with \u003Ccode>SliderState\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Expressive color schemes, shapes, and motion are stable. You can set a custom brand font across the type scale at once.\u003C\u002Fli>\n\u003Cli>The \u003Ccode>material3-ripple\u003C\u002Fcode> artifact adds inset focus rings.\u003C\u002Fli>\n\u003Cli>Focus order and keyboard support improved across date pickers, time pickers, sliders, scaffolds, and navigation components.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The important product claim, also from Material: \u003Cstrong>every core Material 2 component now has a stable Material 3 equivalent.\u003C\u002Fstrong> You are no longer waiting on a missing widget to start the migration.\u003C\u002Fp>\n\u003Ch2 id=\"step-1-add-material-3-beside-material-2\">Step 1: add Material 3 beside Material 2\u003C\u002Fh2>\n\u003Cp>The official \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial2-material3\">Material 2 to Material 3 migration guide\u003C\u002Fa> still recommends adding Material 3 alongside Material 2 so you can move screen by screen. With BOM \u003Ccode>2026.11.01\u003C\u002Fcode>, the version is already pinned:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F app\u002Fbuild.gradle.kts\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">dependencies\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    implementation\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">platform\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"androidx.compose:compose-bom:2026.11.01\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">))\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    implementation\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"androidx.compose.material3:material3\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">    \u002F\u002F Keep this only while leftover M2 screens remain:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    implementation\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"androidx.compose.material:material\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Use fully qualified imports or a clear package split (\u003Ccode>theme.m2\u003C\u002Fcode> versus \u003Ccode>theme.m3\u003C\u002Fcode>) so a file cannot silently call the wrong \u003Ccode>MaterialTheme\u003C\u002Fcode> or \u003Ccode>Button\u003C\u002Fcode>. When the last \u003Ccode>androidx.compose.material\u003C\u002Fcode> import is gone, drop the Material 2 artifact.\u003C\u002Fp>\n\u003Ch2 id=\"step-2-rebuild-the-theme\">Step 2: rebuild the theme\u003C\u002Fh2>\n\u003Cp>Material 2 themes are built with \u003Ccode>lightColors\u003C\u002Fcode> \u002F \u003Ccode>darkColors\u003C\u002Fcode> and passed as \u003Ccode>colors\u003C\u002Fcode>. Material 3 uses \u003Ccode>lightColorScheme\u003C\u002Fcode> \u002F \u003Ccode>darkColorScheme\u003C\u002Fcode> and \u003Ccode>colorScheme\u003C\u002Fcode>. Typography and shapes also changed; do not copy a Material 2 \u003Ccode>Typography\u003C\u002Fcode> object across and expect the type scale to line up.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F Theme.kt\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> androidx.compose.foundation.isSystemInDarkTheme\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> androidx.compose.material3.MaterialTheme\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> androidx.compose.material3.darkColorScheme\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> androidx.compose.material3.lightColorScheme\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> androidx.compose.runtime.Composable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">private\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> LightColors \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> lightColorScheme\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">private\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> DarkColors \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> darkColorScheme\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Composable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> AndroidLearnerTheme\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    darkTheme: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Boolean\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> isSystemInDarkTheme\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    content: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">@Composable\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> () \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> Unit,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    MaterialTheme\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        colorScheme \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (darkTheme) DarkColors \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">else\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> LightColors,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        content \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> content,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    )\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Replace those default schemes with your brand palette. Android Developers still point teams at \u003Ca href=\"https:\u002F\u002Fm3.material.io\u002Ftheme-builder\">Material Theme Builder\u003C\u002Fa> to expand a primary color into a full Material 3 scheme, which is a better starting point than hand-mapping every Material 2 role. Watch for names that look similar and are not: \u003Ccode>primaryVariant\u003C\u002Fcode> is gone; surface, container, and “on” roles are more specific than in Material 2.\u003C\u002Fp>\n\u003Cp>Wrap one migrated screen at a time in the Material 3 theme. A mixed screen, where a Material 2 list item sits inside a Material 3 scaffold, is how you get contrast and padding bugs that look like “the migration broke our design.”\u003C\u002Fp>\n\u003Ch2 id=\"step-3-move-components-then-delete-material-2\">Step 3: move components, then delete Material 2\u003C\u002Fh2>\n\u003Cp>There is no automatic rewrite that is safe on a large app. Do it by surface: theme, then scaffold and app bars, then buttons, then lists, then dialogs, then text fields. The official catalog is the \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial3\">Compose Material 3 catalog\u003C\u002Fa>. Prefer that over memory of Material 2 parameter names; several APIs changed shape as well as package.\u003C\u002Fp>\n\u003Cp>A few mechanical patterns show up in almost every module:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>androidx.compose.material.*\u003C\u002Fcode> imports become \u003Ccode>androidx.compose.material3.*\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>MaterialTheme.colors.primary\u003C\u002Fcode> becomes \u003Ccode>MaterialTheme.colorScheme.primary\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Elevation and surface usage often need a second look, because Material 3 leans on surface containers and tone rather than a single \u003Ccode>elevation\u003C\u002Fcode> number.\u003C\u002Fli>\n\u003Cli>View-based Material components are a separate issue. Material Views is in maintenance mode; Google’s Material 3 post tells teams to migrate those screens to Compose when they can. That is not a 1.5.0 requirement, and it should not block a Compose Material 2 to Material 3 change.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"step-4-replace-value-based-text-fields-with-textfieldstate\">Step 4: replace value-based text fields with TextFieldState\u003C\u002Fh2>\n\u003Cp>This is the part of the release that will generate compiler warnings if you skip it. In Compose 1.13, value-based \u003Ccode>BasicTextField\u003C\u002Fcode>, Material 2 \u003Ccode>TextField\u003C\u002Fcode>, and \u003Ccode>VisualTransformation\u003C\u002Fcode> are deprecated. The \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Ftext\u002Fmigrate-state-based\">state-based migration guide\u003C\u002Fa>, last updated 18 November 2026, is the source for the snippets below.\u003C\u002Fp>\n\u003Cp>Material 3’s value-based \u003Ccode>TextField\u003C\u002Fcode> overloads are \u003Cstrong>not deprecated yet\u003C\u002Fstrong> in 1.5.0. Google still recommends moving to the state-based \u003Ccode>TextField\u003C\u002Fcode> and \u003Ccode>OutlinedTextField\u003C\u002Fcode> overloads now, for synchronous state, performance, and upcoming features. If you are still on Material 2, migrate directly to Material 3’s state-based fields rather than investing in the deprecated Material 2 API.\u003C\u002Fp>\n\u003Cp>The simple case loses \u003Ccode>value\u003C\u002Fcode>, \u003Ccode>onValueChange\u003C\u002Fcode>, and \u003Ccode>singleLine\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F Before: value-based\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Composable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> OldSimpleTextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    var\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">by\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> rememberSaveable\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> { \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">mutableStateOf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    TextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        value\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> state,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        onValueChange \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> { state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> it },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        singleLine \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> true\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    )\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F After: state-based\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Composable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> NewSimpleTextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    TextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> rememberTextFieldState\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        lineLimits \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> TextFieldLineLimits.SingleLine,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    )\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Input filtering moves out of \u003Ccode>onValueChange\u003C\u002Fcode> and into \u003Ccode>InputTransformation\u003C\u002Fcode>, which runs immediately after user input and updates a \u003Ccode>TextFieldBuffer\u003C\u002Fcode>. That is the point of the new model: it avoids the IME synchronization issues of a round-trip through hoisted string state. Display formatting, such as adding dashes to a card number, moves to \u003Ccode>OutputTransformation\u003C\u002Fcode>. You no longer write an \u003Ccode>OffsetMapping\u003C\u002Fcode> by hand; the output transformation inserts characters and mapping is handled for you.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Composable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> CardNumberField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> rememberTextFieldState\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    TextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> state,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        inputTransformation \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> InputTransformation.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">maxLength\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">16\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        outputTransformation \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> OutputTransformation\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (length \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 4\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">insert\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">4\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"-\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (length \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 9\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">insert\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">9\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"-\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (length \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 14\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">insert\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">14\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"-\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    )\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>To set text from a repository or a paste action, call \u003Ccode>TextFieldState.setTextAndPlaceCursorAtEnd\u003C\u002Fcode> or edit the buffer with \u003Ccode>state.edit { ... }\u003C\u002Fcode>. \u003Ccode>maxLines = 10\u003C\u002Fcode> becomes \u003Ccode>lineLimits = TextFieldLineLimits.MultiLine(maxHeightInLines = 10)\u003C\u002Fcode>. Passwords use \u003Ccode>SecureTextField\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002F2026\u002F11\u002F464092b2ac0ac219.webp\" alt=\"Editorial diagram contrasting deprecated value-based TextField callbacks with recommended TextFieldState, InputTransformation, and OutputTransformation.\" \u002F>\u003C\u002Fp>\n\u003Ch2 id=\"where-does-the-state-live\">Where does the state live?\u003C\u002Fh2>\n\u003Cp>This is the question that stalls most migrations, especially if you already hoist a \u003Ccode>UiState\u003C\u002Fcode> data class through a \u003Ccode>StateFlow\u003C\u002Fcode> the way we described in \u003Ca href=\"\u002Fposts\u002Fjetpack-compose-state-hoisting\">Compose state hoisting\u003C\u002Fa> and in \u003Ca href=\"\u002Fposts\u002Fkotlin-coroutines-and-flow\">Kotlin coroutines and Flow\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>Google’s migration guide is direct: \u003Ccode>TextFieldState\u003C\u002Fcode> is a state holder backed by the Snapshot system, in the same category as \u003Ccode>StateFlow\u003C\u002Fcode>, not a View. \u003Cstrong>Keeping a \u003Ccode>TextFieldState\u003C\u002Fcode> on the ViewModel is not an inherently bad practice.\u003C\u002Fstrong> The recommended simple approach is to take \u003Ccode>username: String\u003C\u002Fcode> out of \u003Ccode>UiState\u003C\u002Fcode> and hold \u003Ccode>val usernameState = TextFieldState()\u003C\u002Fcode> on the ViewModel, then pass that object to \u003Ccode>TextField\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> LoginViewModel\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> : \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">ViewModel\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> usernameState \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> TextFieldState\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> passwordState \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> TextFieldState\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Composable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> LoginForm\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(loginViewModel: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">LoginViewModel\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, modifier: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Modifier\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> Modifier) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    Column\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(modifier) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">        TextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> loginViewModel.usernameState)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">        SecureTextField\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(state \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> loginViewModel.passwordState)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>If you cannot change the ViewModel yet, the guide documents a conforming approach: create a \u003Ccode>rememberTextFieldState\u003C\u002Fcode> from the current \u003Ccode>UiState\u003C\u002Fcode> strings, then push changes back with \u003Ccode>snapshotFlow { state.text.toString() }\u003C\u002Fcode> inside a \u003Ccode>LaunchedEffect\u003C\u002Fcode>. The \u003Ccode>StateFlow\u003C\u002Fcode> remains a store, but it is no longer the source of truth that drives the field. That split is what avoids the IME races described in Google’s “Effective state management for TextField in Compose” guidance, which the migration page cites.\u003C\u002Fp>\n\u003Cp>\u003Ccode>rememberTextFieldState()\u003C\u002Fcode> already includes save-and-restore. If you construct \u003Ccode>TextFieldState\u003C\u002Fcode> in a ViewModel yourself, you have to hook saved state separately, as the \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Flibraries\u002Farchitecture\u002Fviewmodel\u002Fviewmodel-savedstate\">Saved State module for ViewModel\u003C\u002Fa> documentation describes.\u003C\u002Fp>\n\u003Ch2 id=\"a-migration-order-that-will-actually-finish\">A migration order that will actually finish\u003C\u002Fh2>\n\u003Col>\n\u003Cli>Add Material 3 1.5.0 through BOM \u003Ccode>2026.11.01\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Build a Material 3 theme and use it on one new or low-risk screen.\u003C\u002Fli>\n\u003Cli>Move scaffolds, buttons, and lists on that screen, then repeat by feature.\u003C\u002Fli>\n\u003Cli>Replace text fields with \u003Ccode>TextFieldState\u003C\u002Fcode> as you touch each form. Do not leave Material 2 \u003Ccode>TextField\u003C\u002Fcode> in a “later” bucket; it is already deprecated.\u003C\u002Fli>\n\u003Cli>Remove \u003Ccode>androidx.compose.material\u003C\u002Fcode> when nothing imports it.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>You do not need to rewrite the entire app in a single pull request. You do need a finish line. Material 2 will not start getting the bug fixes and keyboard work that 1.5.0 just shipped on Material 3.\u003C\u002Fp>\n\u003Ch2 id=\"faq\">FAQ\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Is Material 2 removed from the BOM?\u003C\u002Fstrong> No. It is deprecated and no longer actively maintained. Your existing screens still compile. Plan the migration anyway; this is not a “wait for removal” situation if you want ongoing fixes.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Are Material 3 value-based TextField overloads deprecated in 1.5.0?\u003C\u002Fstrong> No. The official release post says they are not deprecated yet, and still recommends the state-based overloads. Value-based \u003Ccode>BasicTextField\u003C\u002Fcode> and Material 2 \u003Ccode>TextField\u003C\u002Fcode> \u003Cem>are\u003C\u002Fem> deprecated in Compose 1.13.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Do I have to put TextFieldState in my ViewModel?\u003C\u002Fstrong> No, but Google recommends it when the field’s source of truth lives off the composable. A \u003Ccode>String\u003C\u002Fcode> inside \u003Ccode>UiState\u003C\u002Fcode> driven back into \u003Ccode>value\u003C\u002Fcode>\u002F\u003Ccode>onValueChange\u003C\u002Fcode> is the pattern the new API is designed to leave behind.\u003C\u002Fp>\n\u003Ch2 id=\"sources\">Sources\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fm3.material.io\u002Fblog\u002Fcompose-material-3-is-stable\">Compose Material 3 1.5.0 is stable\u003C\u002Fa>, Material Android, 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release\">What’s new in the Jetpack Compose November ‘26 release\u003C\u002Fa>, 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Fdesignsystems\u002Fmaterial2-material3\">Migrate from Material 2 to Material 3 in Compose\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fdevelop\u002Fui\u002Fcompose\u002Ftext\u002Fmigrate-state-based\">Migrate to state-based text fields\u003C\u002Fa>, last updated 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fjetpack\u002Fandroidx\u002Freleases\u002Fcompose-material3\">Compose Material 3 release notes\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cem>Diagrams are original editorial illustrations for Android Learner, not Google or Material Design assets.\u003C\u002Fem>\u003C\u002Fp>\n",1795550404298]