as the title states, i would like to add some space between added Buttons.
Code:
ConstraintLayout cst= (ConstraintLayout) findViewById(R.id.idButtonset);
cst.addView(this.addButton("Buttname0", R.id.svId));
Button fbutton= new Button(this);
fbutton.setText("Button 1");
Button sbutton = new Button(this);
sbutton.setText("Button 2");
cst.addView(fbutton);
cst.addView(sbutton);
Issue: It adds the buttons on top of each other.
What i tried:
fbutton.setPadding(30,30,30,30);
sbutton.setPadding(40,35,40,35);
Issue: margin isn't supported, padding - works but it isn't creating space between added Buttons.
Question: How to add Buttons i such a way in which they are added with space between ?