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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
430
Kotlin2.3明示的バッキングフィールド
tonionagauzzi
1
410
【Android】テキスト選択色の問題修正で心がけたこと
tonionagauzzi
0
290
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
410
Googleの新しいコーディングAIエージェントJulesを使ってみた
tonionagauzzi
0
870
Compose におけるパスワード自動入力とパスワード保存
tonionagauzzi
0
550
Androidテスト基礎講義
tonionagauzzi
0
420
Jetpack Composeで自動入力(Autofill)を実装しよう(作成:claude-3.7-sonnet)
tonionagauzzi
0
180
Jetpack Composeにおける自動入力の実装と注意点(作成者:Gemini 2.5 Pro Exp 03-25)
tonionagauzzi
0
190
Other Decks in Programming
See All in Programming
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
260
setup-vp GitLab対応の裏側
naokihaba
0
140
アクセシビリティから考える情報設計
high_g_engineer
0
420
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
220
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
590
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.5k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.8k
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
110
AHC070解法紹介
eijirou
0
140
Security issues being discussed on Web Platforms
petamoriken
0
1.3k
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
540
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
170
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Leo the Paperboy
mayatellez
10
2.3k
Documentation Writing (for coders)
carmenintech
77
5.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
480
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
710
Thoughts on Productivity
jonyablonski
76
5.4k
4 Signs Your Business is Dying
shpigford
187
23k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
How to build a perfect <img>
jonoalderson
1
6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
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