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
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android Composeでの自動入力(作成:GPT-4o)
tonionagauzzi
April 24, 2025
More Decks by tonionagauzzi
See All by tonionagauzzi
Androidエンジニアが大規模プロダクトのWebフロントエンドとバックエンドに越境して感じたギャップと習得したマインド
tonionagauzzi
0
480
Kotlin2.3明示的バッキングフィールド
tonionagauzzi
1
420
【Android】テキスト選択色の問題修正で心がけたこと
tonionagauzzi
0
290
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
420
Googleの新しいコーディングAIエージェントJulesを使ってみた
tonionagauzzi
0
880
Compose におけるパスワード自動入力とパスワード保存
tonionagauzzi
0
570
Androidテスト基礎講義
tonionagauzzi
0
430
Jetpack Composeで自動入力(Autofill)を実装しよう(作成:claude-3.7-sonnet)
tonionagauzzi
0
190
Jetpack Composeにおける自動入力の実装と注意点(作成者:Gemini 2.5 Pro Exp 03-25)
tonionagauzzi
0
200
Other Decks in Programming
See All in Programming
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
sbt 2.0: takeoff
eed3si9n
0
120
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
Are APIs Still Relevant in the AI Era?
soyuka
0
450
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Domain-Driven Transformation
hschwentner
2
2.3k
残高管理から台帳サービスへの進化
artoy
0
180
速習iPhone Duo対応
yuukiw00w
2
980
mrbgem 三角測量 開発
ogom
0
230
Java 27新機能 / Java 27 new features
kishida
2
220
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
240
パーソナライズPodcastを作った話
repunit11
0
130
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
880
Git: the NoSQL Database
bkeepers
PRO
433
67k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Bash Introduction
62gerente
615
220k
Believing is Seeing
oripsolob
1
240
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Statistics for Hackers
jakevdp
799
230k
Test your architecture with Archunit
thirion
2
2.4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
First, design no harm
axbom
PRO
2
1.3k
Transcript
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