I have the following requirement in Android:
Given a horizontal LinearLayout
, I have five buttons in it. All the buttons should have equal width and height. The height of each button is same as their parent LinearLayout
and spacing between them should remain constant. The height of LinearLayout
is not constant and depends on form factor and other layouts sizing. Therefore, I can not assign fixed with/height to each button.
While I can easily achieve that very easily in iOS with the help of constraints, I am not sure how to achieve this in Android at design time. Is there some way to achieve this or is it possible programatically only?