我正在尝试使用布局参数将图像视图放置在另一个图像视图下方,但它不起作用..我想做到这一点:http: //imgur.com/eZfEI
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
iv_album[i] = new ImageView(main.this);
iv_album[i].setImageBitmap(resized_a_p);
iv_album[i].setPadding(0, 5, 5, 0);
iv_album[i].setId(i);
iv_album[i].setOnLongClickListener(main.this);
iv_album[i].setOnClickListener(main.this);
if (i>1){
params.addRule(RelativeLayout.BELOW, iv_album[i].getId() - 1);
}
怎么了 ?