Answer the question
In order to leave comments, you need to log in
Android. Vertical padding in LinearLayout?
There is a LinearLayout (vertical), controls are programmatically placed in it. A vertical gap appears between these controls. Setting android:verticalSpacing to zero in the layout did not give any results.
What can be done so that the controls placed in the LinearLayout are located close and do not have this gap?
Answer the question
In order to leave comments, you need to log in
It often happens that layouts in static are very different from those created on the fly. Try to shove the controls into separate XML and insert them through the inflater. Maybe additionally wrap it in a LinearLayout or RelativeLayout.
Margin and Padding (top or bottom) are also missing? In the layout and in the components themselves? You can try to force them to be set to 0.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question