動態創建的按鈕之間添加空間我已經動態地創建了很多按鈕。如何在兩個按鈕之間添加空格。請幫幫我。在此先感謝如何在Android
我的代碼:
private LinearLayout LLDynamic;
private RelativeLayout.LayoutParams ParaOne;
ParaOne = new RelativeLayout.LayoutParams(280, 30);
Button button1= new Button(Twindo_fromEditGroup.this);
button1.setTextSize(16);
LLDynamic = new LinearLayout(Twindo_fromEditGroup.this);
LLDynamic.setOrientation(LinearLayout.VERTICAL);
LLDynamic.addView(button1,ParaOne);
添加利潤率..... http://stackoverflow.com/questions/4472429/change-the-right-margin-of-a-view-programmatically – Santhosh