我正在获取运行时图像视图,如何将这些图像视图添加到一个单一的线性布局中。
LinearLayout linearLayout=new LinearLayout(this);
linearLayout.setOrientation(LinearLayout.HORIZONTAL);
LinearLayout.LayoutParams vp=new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
ImageView imageView= new ImageView(this);
imageView.setImageBitmap(bitMap);
imageView.setVisibility(View.VISIBLE);
imageView.setBackgroundColor(0xFFFF00FF);
//linearLayout=LinearLayout+imageView;
LinearLayout.LayoutParams Iv=new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
linearLayout.setLayoutParams(Iv);
linearLayout.addView(imageView);
setContentView(linearLayout,vp);