How do you programmatically set the width of an ImageView inside a TableRow? I do NOT want the cell width to change, only the width of the image inside the cell.
Another way that u resized the bitmap
ImageView img=(ImageView)findViewById(R.id.ImageView01);
Bitmap bmp=BitmapFactory.decodeResource(getResources(), R.drawable.sc01);
int width=200;
int height=200;
Bitmap resizedbitmap=Bitmap.createScaledBitmap(bmp, width, height, true);
img.setImageBitmap(resizedbitmap);
Do you want to scale the image? Or crop it?
To scale, try ImageView.setImageMatrix and Matrix.preScale.
If you don't want to figure out the Matrices, you could try Rects (bounding boxes). Get the original rect with ImageView.getDrawingRect and then define whatever Rect you want and use Matrix.setRectToRect to create your image matrix.
Otherwise, have you tried ImageView.setMaxWidth?