Skip to content Skip to sidebar Skip to footer

Resizing An Imageview Within A Tablelayout Programmatically

If I have a TableLayout structure (below) which defines 2 ImageViews. One which also specifies pixel values for width/height. This works as I would expect - Pic one is resized to 5

Solution 1:

Ok I've managed to solve this. Instead of using:

imageViewOne.setLayoutParams(newLayoutParams(50, 50));

I used this instead:

imageViewOne.setLayoutParams(new TableRow.LayoutParams(50, 50));

Post a Comment for "Resizing An Imageview Within A Tablelayout Programmatically"