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
510
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
200
Other Decks in Programming
See All in Programming
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
230
Distance field of Julia set
kinakomoti321
0
320
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
180
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
4.2k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
310
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
420
AI-Powered Domain-Driven Design
ziobrando
0
440
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
11k
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
220
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
330
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
180
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Git: the NoSQL Database
bkeepers
PRO
433
67k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
560
The SEO identity crisis: Don't let AI make you average
varn
0
630
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
A designer walks into a library…
pauljervisheath
211
25k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
The Limits of Empathy - UXLibs8
cassininazir
2
780
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.8k
Six Lessons from altMBA
skipperchong
29
4.6k
How to Think Like a Performance Engineer
csswizardry
28
2.9k