我动态地将我的图像添加到这样的活动中:
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.BELOW, POIdescription.getId());
ImageView imv=new ImageView(getApplicationContext());
imv.setImageBitmap(b);
imv.setId(presumed_id);
imv.setLayoutParams(params);
imv.setPadding(0, 0, 0, 0);
RelativeLayout rl=(RelativeLayout) findViewById(R.id.relativeLayout);
rl.addView(imv);
问题是,当我动态添加图像(比如说三个)时,它们之间的间距很大。我试图将 Padding 设置为 0,0,0,0 但这没有帮助。你知道吗,我的问题在哪里?
谢谢