संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
स्क्रोल करने वाले कंटेनर में Modifier.imeNestedScroll() लागू किया जा सकता है. इससे कंटेनर के सबसे नीचे स्क्रोल करने पर, IME अपने-आप खुल और बंद हो जाता है.
classWindowInsetsExampleActivity:AppCompatActivity(){overridefunonCreate(savedInstanceState:Bundle?){super.onCreate(savedInstanceState)WindowCompat.setDecorFitsSystemWindows(window,false)setContent{MaterialTheme{MyScreen()}}}}@OptIn(ExperimentalLayoutApi::class)@ComposablefunMyScreen(){Box{LazyColumn(modifier=Modifier.fillMaxSize()// fill the entire window.imePadding()// padding for the bottom for the IME.imeNestedScroll(),// scroll IME at the bottomcontent={})FloatingActionButton(modifier=Modifier.align(Alignment.BottomEnd).padding(16.dp)// normal 16dp of padding for FABs.navigationBarsPadding()// padding for navigation bar.imePadding(),// padding for when IME appearsonClick={}){Icon(imageVector=Icons.Filled.Add,contentDescription="Add")}}}
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-08-26 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-08-26 (UTC) को अपडेट किया गया."],[],[],null,["# Use keyboard IME animations\n\nYou can apply `Modifier.imeNestedScroll()` to a scrolling container to open and\nclose the IME automatically when scrolling to the bottom of the container.\n\n\n```kotlin\nclass WindowInsetsExampleActivity : AppCompatActivity() {\n override fun onCreate(savedInstanceState: Bundle?) {\n super.onCreate(savedInstanceState)\n\n WindowCompat.setDecorFitsSystemWindows(window, false)\n\n setContent {\n MaterialTheme {\n MyScreen()\n }\n }\n }\n}\n\n@OptIn(ExperimentalLayoutApi::class)\n@Composable\nfun MyScreen() {\n Box {\n LazyColumn(\n modifier = Modifier\n .fillMaxSize() // fill the entire window\n .imePadding() // padding for the bottom for the IME\n .imeNestedScroll(), // scroll IME at the bottom\n content = { }\n )\n FloatingActionButton(\n modifier = Modifier\n .align(Alignment.BottomEnd)\n .padding(16.dp) // normal 16dp of padding for FABs\n .navigationBarsPadding() // padding for navigation bar\n .imePadding(), // padding for when IME appears\n onClick = { }\n ) {\n Icon(imageVector = Icons.Filled.Add, contentDescription = \"Add\")\n }\n }\n}https://github.com/android/snippets/blob/dd30aee903e8c247786c064faab1a9ca8d10b46e/compose/snippets/src/main/java/com/example/compose/snippets/interop/MigrationOtherConsiderationsSnippets.kt#L66-L102\n```\n\n\u003cbr /\u003e\n\n**Figure 3.** IME animations."]]