Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Android Composeでの自動入力(作成:GPT-4o)
Search
tonionagauzzi
April 24, 2025
Programming
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android Composeでの自動入力(作成:GPT-4o)
tonionagauzzi
April 24, 2025
Transcript
7 slides
Android Composeでの自動入力 Jetpack Composeでの自動入力の有効化方法 ハマりどころと解決策 1
自動入力とは? パスワード入力欄にカーソルを当てると保存済みもしくは生成したパスワードを 自動で入力 従来のXML型Android Viewでは android:autofillHints プロパティを使用 2
Jetpack Composeでの自動入力 Compose UIを1.8.0以降にアップデート Modifier.semantics を使用して contentType を指定 Column {
TextField( value = username.value, onValueChange = {username.value = it}, modifier = Modifier.semantics { contentType = ContentType.Username } ) TextField( value = password.value, onValueChange = {password.value = it}, modifier = Modifier.semantics { contentType = ContentType.Password } ) } 3
ハマりどころ autofillManager?.commit() が動作しない場合 NewUsername と NewPassword の両方が1つのComposable内にある必要 4
解決策 CredentialManager を使用 androidx.credentials をインポート Column { val context =
LocalContext.current val coroutineScope = rememberCoroutineScope() TextField( value = newPassword.value, onValueChange = { newPassword.value = it }, modifier = Modifier.semantics { contentType = ContentType.NewPassword }, ) Button(onClick = { try { coroutineScope.launch { val credentialManager = CredentialManager.create(context) val request = CreatePasswordRequest(username, newPassword.value) credentialManager.createCredential( request = request, context = context, ) } } catch (e: CreateCredentialException) { 5
まとめ Jetpack Composeでの自動入力の有効化は簡単 CredentialManager を使うことで問題を回避可能 6
参考文献 Jetpack Composeでandroid:autofillHintsのような自動入力を有効にするには? Jetpack ComposeのTextFieldに入力されたパスワードを保存するには? 7
More Decks by tonionagauzzi
See All by tonionagauzzi
Androidエンジニアが大規模プロダクトのWebフロントエンドとバックエンドに越境して感じたギャップと習得したマインド
tonionagauzzi
0
530
Kotlin2.3明示的バッキングフィールド
tonionagauzzi
1
450
【Android】テキスト選択色の問題修正で心がけたこと
tonionagauzzi
0
320
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
430
Googleの新しいコーディングAIエージェントJulesを使ってみた
tonionagauzzi
0
910
Compose におけるパスワード自動入力とパスワード保存
tonionagauzzi
0
620
Androidテスト基礎講義
tonionagauzzi
0
450
Jetpack Composeで自動入力(Autofill)を実装しよう(作成:claude-3.7-sonnet)
tonionagauzzi
0
200
Jetpack Composeにおける自動入力の実装と注意点(作成者:Gemini 2.5 Pro Exp 03-25)
tonionagauzzi
0
210
Other Decks in Programming
See All in Programming
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
200
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
Spec-driven Development with AI
simas
PRO
0
2.3k
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
580
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
250
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
220
小さなアプリを作って公開するまで
onozaty
0
200
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
340
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
140
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.9k
HDC tutorial
michielstock
2
1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
640
Six Lessons from altMBA
skipperchong
29
4.6k
We Are The Robots
honzajavorek
0
450
Utilizing Notion as your number one productivity tool
mfonobong
4
650
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
600
Skip the Path - Find Your Career Trail
mkilby
1
290