上面图片和下面文字布局(命令)
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
LinearLayout.LayoutParams param =
new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
ImageView image = new ImageView(this);
image.setBackgroundResource(R.drawable .icon);
layout.addView(image, param);
TextView text;
text = new TextView(this);
text.setText("textview");
layout.addView(text, param);
setContentView(layout);