i would like to have three buttons taking equal amount of available space horizontally in a row.
I used android:layout_gravity. What is the problem?
layout
besides of setting a layout_weight you have to set layout_width or layout_height to 0dp. So if you want for example to distribute the buttons horizontally , layout_width should be 0dp and layout_weight .2 or any number as long as is equal through the buttons you have.
so your layout should be like this