stripe-android
stripe-android copied to clipboard
Networking Sign Up Pane (Native): Add back auto-focus
Summary
- Replaces activity resizing by insets (keyboard now smoothly animates)
- On signup pane, keeps bottom panel behind keyboard
- Focuses on email when empty
- Focuses on phone when email prefilled, but no phone prefilled
- Does not focus when both fields prefill.
https://github.com/stripe/stripe-android/assets/99293320/0dc86538-d549-4a43-98c2-bd9f50b9cefb
https://github.com/stripe/stripe-android/assets/99293320/3647bbb8-06f2-4a31-bd6a-b8c70684e329
https://github.com/stripe/stripe-android/assets/99293320/b39a9ab3-8cf7-4c84-b87f-5ff57ffec298
Motivation
:notebook_with_decorative_cover: Networking Sign Up Pane (Native): Add back auto-focus :globe_with_meridians: BANKCON-10945
On networking sign up pane:
- if user has no email, we will auto-focus the keyboard on email and the "Not Now" button will be behind the keyboard (user can still easily dismiss keyboard or press the "X" button)
- if user has no phone (but prefill email), we will auto-focus the keyboard on phone (other details apply as above ^)
- if we prefill both, we don't auto-focus
PR's that removed it:
Testing
- [ ] Added tests
- [ ] Modified tests
- [ ] Manually verified
Screenshots
| Before | After |
|---|---|
| before screenshot | after screenshot |
Changelog
Diffuse output:
OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)
│ compressed │ uncompressed
├───────────┬───────────┬──────┼───────────┬───────────┬──────
APK │ old │ new │ diff │ old │ new │ diff
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
dex │ 2 MiB │ 2 MiB │ -1 B │ 4.3 MiB │ 4.3 MiB │ 0 B
arsc │ 1 MiB │ 1 MiB │ 0 B │ 1 MiB │ 1 MiB │ 0 B
manifest │ 2.3 KiB │ 2.3 KiB │ 0 B │ 8.1 KiB │ 8.1 KiB │ 0 B
res │ 301.5 KiB │ 301.5 KiB │ 0 B │ 455 KiB │ 455 KiB │ 0 B
native │ 7.3 MiB │ 7.3 MiB │ 0 B │ 18.4 MiB │ 18.4 MiB │ 0 B
asset │ 1.5 MiB │ 1.5 MiB │ 0 B │ 1.5 MiB │ 1.5 MiB │ 0 B
other │ 87 KiB │ 87 KiB │ +8 B │ 161.5 KiB │ 161.5 KiB │ 0 B
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
total │ 12.2 MiB │ 12.2 MiB │ +7 B │ 25.8 MiB │ 25.8 MiB │ 0 B
DEX │ old │ new │ diff
─────────┼───────┼───────┼───────────
files │ 1 │ 1 │ 0
strings │ 21689 │ 21689 │ 0 (+1 -1)
types │ 6869 │ 6869 │ 0 (+0 -0)
classes │ 5634 │ 5634 │ 0 (+0 -0)
methods │ 31451 │ 31451 │ 0 (+0 -0)
fields │ 18315 │ 18315 │ 0 (+0 -0)
ARSC │ old │ new │ diff
─────────┼──────┼──────┼──────
configs │ 164 │ 164 │ 0
entries │ 3404 │ 3404 │ 0
APK
compressed │ uncompressed │
──────────┬──────┼──────────┬──────┤
size │ diff │ size │ diff │ path
──────────┼──────┼──────────┼──────┼───────────────────────────────────────────
29.1 KiB │ +7 B │ 64 KiB │ 0 B │ ∆ META-INF/CERT.SF
271 B │ +1 B │ 120 B │ 0 B │ ∆ META-INF/version-control-info.textproto
2 MiB │ -1 B │ 4.3 MiB │ 0 B │ ∆ classes.dex
1.2 KiB │ +1 B │ 1.2 KiB │ 0 B │ ∆ META-INF/CERT.RSA
25.9 KiB │ -1 B │ 63.9 KiB │ 0 B │ ∆ META-INF/MANIFEST.MF
──────────┼──────┼──────────┼──────┼───────────────────────────────────────────
2.1 MiB │ +7 B │ 4.4 MiB │ 0 B │ (total)
DEX
STRINGS:
old │ new │ diff
───────┼───────┼───────────
21689 │ 21689 │ 0 (+1 -1)
+ ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:eccad00,r8-mode:full,version:8.3.37}
- ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:0f80f6e,r8-mode:full,version:8.3.37}