Many of my views have a second version, a left-handed version where I simply switch alignment for all buttons and imagebuttons from right to left or left to right.
I'm currently simply copying each layout and creating a left-handed version of it manually. When the app runs, it checks whether it should be left-handed or normal and will get the right layout to inflate.
Recently, my app started reporting many exceptions and I finally discovered that it's because I've added a new element to one of the layouts and forgot to add it in the corresponding left-handed version which caused crashes for people using the left-handed setting.
My question is:
What's a better way to have a second version of each layout where all left/right alignments are flipped, including relative layouts? Is there any way to share some of the layout?