So Im trying to add an imageview to my current xml design - and its working decently. Now my main problem is that I cant seem to find a way to set the attributes for the image like where it needs to be displayed etc.
RelativeLayout mRelativeLayout = (RelativeLayout) findViewById(R.id.board);
ImageView i = new ImageView(this); i.setImageResource(R.drawable.blue_1); i.setAdjustViewBounds(true); mRelativeLayout.addView(i); setContentView(mRelativeLayout);
i tried messing around with setlayoutparams but got absolutely no clue what to do with it.