Im trying to figure out, what is the cleanest solution to arrange a layout according to the item selected in my spinner.
In my spinner i have values representing pace for running MAS (max aerobic speed) - 800m - 1500m - 5000m - 10 000m - Half marathon & Marathon and for each of those the layout displayed gonna change.
For example if it's MAS selected there will be time indicator for 100m-200m-400m-1000m and various percentage for those distance like 85% - 90% - 100% - 105% so close 16 label + value textview
If the item selected is marathon, there will be time indicator for 1000m - 2000m - 5k - 10k- 15k - half - 30k - 40k - 42k195 so only 0 textview
Would it be better to create a single layout and set visible/invisible textview according to my needs ?
Or having "hardcoded" layout that i returned according to the item selected ?
Hope i'm clear enough, i know that lot of things are possible but i'm really trying to be as clean as possible and i'm not satisfied with either solutions i've written above
from What's the cleanest way to create dynamic layout according to selected item in a spinner?
No comments:
Post a Comment