guest86
guest86

Reputation: 2956

Android images in table layout

I have a dynamic table layout in my Android app. Number of rows and cols may vary, but each "cell" should contain an image. What would be the proper way of populating my table with those images but scaling them so regardless of number of rows and cols they scale to perfectly fit the table and keep their aspect ration?

Upvotes: 0

Views: 683

Answers (2)

Namenlos
Namenlos

Reputation: 1615

Hope I got you right.

Try setStretchAllColumns(true) to stretch all of your columns. So your columns fit on every number of columns.

Upvotes: 0

CAM-Dev
CAM-Dev

Reputation: 186

Why not use a Gridview for this, check the Android docs.

Upvotes: 1

Related Questions