I have following UI hierarchy
Scroll View –>TableLayout–>Rows [each row has TextView+EditText]
Problem
Inside a row, each View should not exceed 50% of width of parent (TableRow). if an EditText is created to enter, say Username with max characters N; then width of EditText ideally should be exactly N chars long but must not exceed 50% limit.
I’ve tried many permutations and combination and could not get it right so far.
I have to do it programmatically as per the project requirement.
thanks.
I had to scrap TableLayout in order to be my own layouts effective. Layout params in TableRows seems ineffective. LinearLayout looks more flexible.
Now I have following Layout hierarchy and it works.
Scroll View –>LinearLayout instead of TableLayout–> [Individual fields encapuslated in LinearLayout instead of TableRows]