I have problem with organizing layout in android aplication. I\'m dynamically creating buttons and adding them with this code to my layout:
LayoutInflate
Setting layout_weight on the buttons themselves will cause the buttons to expand without having space between them. LinearLayout never adds space between its child views.
You should wrap each one in a FrameLayout and use layout_gravity="center" on your buttons, then set layout_weight="1" on the FrameLayout.