I have a ListView (will move to RecyclerView) with a ListView Item XML layout that contains 3 TextViews inside a LinearLayout. My user preferences allow for left-handed or right-handed use. In which case, I want to change the order of the TextViews in the Item Layout file.
What is the preferred Design Pattern here? How do I do that?
- Do I create two different Item XML Layout files, one for left-hand and one for right-hand? Which seems like a duplication of effort with same TextViews duplicated in different XML layout files; just changing the order.
- Do I programmatically alter the order of the TextViews in code? How?
- Is there some other way I am not aware of?
Just looking to learn and do it the right way.