Android AB testing xml layouts -


i'm trying find easy way ab test layout, note layouts i'm talking minor changes in views width, height, text-size, margins... main problem single test requires change few of parameters requires me:

  • create duplicate layouts minor changes
  • or change parameters after view inflated

i tried implement layoutinflater.factory go on xml attributes , override them in following menor:

<view     android:layout_width="wrap_content"     android:layout_height="30dp"      override:layout_height="resolveheightforabtest()"      /> 

when factory sees override attribute, overrides original (calling specified method via reflection). implementation not complex however, original class implements layoutinflater.factory interface, seems impossible obtain instance without reflection. (i need delegate view creation class. don't want reimplement it.

any ideas on how can achieve? not solution above, can simplify ab testing multiple layouts awesome!

it might worthwhile @ ab testing capabilities provided mixpanel. can tweak things without pushing app update. haven't used though should share you: https://mixpanel.com/help/reference/android#ab_testing


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -