RelativeLayout overlay = new RelativeLayout(this);
addContentView(overlay, new LayoutParams(LayoutParams.FILL_PARENT, px));
overlay.setBackgroundColor(Color.BLACK);
border = new ImageView(this);
border.setImageResource(R.drawable.featured_bar);
border.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
overlay.addView(border);
我希望我的边框imageview位于我的relativelayout 的底部, programmatically
或当然。
基本上,我希望我的装饰边框处于相对于分辨率的某个位置,因为我不知道如何使用x y值进行定位,所以我采用了这种方法。
答案 0 :(得分:1)