LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
ViewGroup.LayoutParams lp2 = new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);//设置宽高
layout.setLayoutParams(lp2);
Button btn = new Button(this);
btn.setText(str);
btn.setBackgroundResource(R.drawable.btn_orange_normal_shape);
btn.setTextColor(getResources().getColor(R.color.white));
layout.setPadding(0,10,0,0);
layout.addView(btn);
ll_layout.addView(layout);