stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

Update PrimaryButtonUiStateMapper to use resolvableString

Open tjclawson-stripe opened this issue 1 year ago • 2 comments

Summary

Update PrimaryButtonUiStateMapper to use resolvableString to handle per app localization

Motivation

Needed for merchants using per-app localization that are below API 33

To test:

  1. Add
val appLocales = LocaleListCompat.forLanguageTags("fr")
AppCompatDelegate.setApplicationLocales(appLocales)

to PaymentSheetPlaygroundActivity.onCreate()

  1. Add French to System Languages

Testing

  • [ ] Added tests
  • [X] Modified tests
  • [X] Manually verified

Screenshots

Before After
Screenshot_1719001901 Screenshot_1719001689

Changelog

tjclawson-stripe avatar Jun 21 '24 20:06 tjclawson-stripe

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stripe-android ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 8:32pm

vercel[bot] avatar Jun 21 '24 20:06 vercel[bot]

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │           compressed           │         uncompressed          
          ├───────────┬───────────┬────────┼───────────┬───────────┬───────
 APK      │ old       │ new       │ diff   │ old       │ new       │ diff  
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼───────
      dex │     4 MiB │     4 MiB │ +287 B │   8.8 MiB │   8.8 MiB │ +68 B 
     arsc │   2.3 MiB │   2.3 MiB │    0 B │   2.3 MiB │   2.3 MiB │   0 B 
 manifest │   5.1 KiB │   5.1 KiB │    0 B │  25.6 KiB │  25.6 KiB │   0 B 
      res │ 918.5 KiB │ 918.5 KiB │    0 B │   1.5 MiB │   1.5 MiB │   0 B 
   native │   2.6 MiB │   2.6 MiB │    0 B │     6 MiB │     6 MiB │   0 B 
    asset │   2.9 MiB │   2.9 MiB │  +15 B │   2.9 MiB │   2.9 MiB │ +15 B 
    other │   195 KiB │   195 KiB │   +2 B │ 428.4 KiB │ 428.4 KiB │   0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼───────
    total │  12.8 MiB │  12.8 MiB │ +304 B │  21.8 MiB │  21.8 MiB │ +83 B 

 DEX     │ old   │ new   │ diff         
─────────┼───────┼───────┼──────────────
   files │     1 │     1 │  0           
 strings │ 43639 │ 43639 │  0 (+2 -2)   
   types │ 15006 │ 15006 │  0 (+0 -0)   
 classes │ 12681 │ 12681 │  0 (+0 -0)   
 methods │ 62103 │ 62102 │ -1 (+17 -18) 
  fields │ 41026 │ 41025 │ -1 (+11 -12) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6043 │ 6043 │  0
APK
    compressed     │   uncompressed    │                               
──────────┬────────┼───────────┬───────┤                               
 size     │ diff   │ size      │ diff  │ path                          
──────────┼────────┼───────────┼───────┼───────────────────────────────
    4 MiB │ +287 B │   8.8 MiB │ +68 B │ ∆ classes.dex                 
  7.3 KiB │  +15 B │   7.2 KiB │ +15 B │ ∆ assets/dexopt/baseline.prof 
 52.9 KiB │   +1 B │ 117.2 KiB │   0 B │ ∆ META-INF/CERT.SF            
  1.2 KiB │   +1 B │   1.2 KiB │   0 B │ ∆ META-INF/CERT.RSA           
──────────┼────────┼───────────┼───────┼───────────────────────────────
  4.1 MiB │ +304 B │   8.9 MiB │ +83 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   43639 │ 43639 │ 0 (+2 -2) 
  
  + VLZLLLLLLL
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:7be0d45,r8-mode:full,version:8.3.37}
  
  - VLLZLLLLLLL
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:978c158,r8-mode:full,version:8.3.37}
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   62103 │ 62102 │ -1 (+17 -18) 
  
  + I6.a <init>(String, boolean, Integer)
  + com.stripe.android.paymentsheet.ui.PrimaryButton getExternalLabel_paymentsheet_release() → b
  + com.stripe.android.paymentsheet.ui.PrimaryButton setExternalLabel_paymentsheet_release(b)
  + com.stripe.android.paymentsheet.ui.PrimaryButton setLabel(b)
  + e0.H <init>(b, n, u, boolean, boolean)
  + i7.A j() → b
  + i7.E c() → a
  + i7.t <init>(Integer, b, boolean)
  + i7.t j() → b
  + i7.u <init>(x, String, String, String, b, String)
  + i7.u j() → b
  + i7.y <init>(String, String, String, String, b, String)
  + i7.y j() → b
  + i7.z <init>(r, String, String, b, String)
  + i7.z j() → b
  + q7.V0 <init>(b, a, boolean, boolean)
  + s7.B <init>(C0, boolean, b, b, b, W, o0, o0, a)
  
  - I6.a <init>(Integer, String, boolean)
  - X7.a d(Resources) → String
  - com.stripe.android.paymentsheet.ui.PrimaryButton getExternalLabel_paymentsheet_release() → String
  - com.stripe.android.paymentsheet.ui.PrimaryButton setExternalLabel_paymentsheet_release(String)
  - com.stripe.android.paymentsheet.ui.PrimaryButton setLabel(String)
  - e0.H <init>(n, String, u, boolean, boolean)
  - i7.A j() → String
  - i7.E c() → String
  - i7.t <init>(Integer, String, boolean)
  - i7.t j() → String
  - i7.u <init>(x, String, String, String, String, String)
  - i7.u j() → String
  - i7.y <init>(String, String, String, String, String, String)
  - i7.y j() → String
  - i7.z <init>(r, String, String, String, String)
  - i7.z j() → String
  - q7.V0 <init>(String, a, boolean, boolean)
  - s7.B <init>(Application, C0, boolean, b, b, b, W, o0, o0, a)
  

FIELDS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   41026 │ 41025 │ -1 (+11 -12) 
  
  + com.stripe.android.paymentsheet.ui.PrimaryButton V: b
  + com.stripe.android.paymentsheet.ui.PrimaryButton a0: b
  + i7.t V: b
  + i7.u Y: b
  + i7.y Y: b
  + i7.z X: b
  + q7.V0 a: b
  + s7.B a: C0
  + s7.B b: boolean
  + s7.B c: m0
  + s7.B i: a
  
  - com.stripe.android.paymentsheet.ui.PrimaryButton V: String
  - com.stripe.android.paymentsheet.ui.PrimaryButton a0: String
  - i7.t V: String
  - i7.u Y: String
  - i7.y Y: String
  - i7.z X: String
  - q7.V0 a: String
  - s7.B a: Context
  - s7.B b: C0
  - s7.B c: boolean
  - s7.B i: m0
  - s7.B j: a

github-actions[bot] avatar Jun 21 '24 20:06 github-actions[bot]