Reputation: 14571
I'm porting an application which uses icons that are not all the same size. Some are 32x48 others are 48x48. I'm displaying the icons next to some text in a listview but due to the inconsistent sizing, the text does not line up neatly in each listview item:
[p i c] TextTextText
[ p i c ] TextTextText
[ p i c ] TextTextText
What I want:
[ p i c ] TextTextText
[ p i c ] TextTextText
[ p i c ] TextTextText
Would I be better on to re-create all the icons as fixed sizes, or is there some easy fix for this in the layout.xml file? Thanks
Upvotes: 0
Views: 131
Reputation: 1626
for the icon, you can set a size in the xml (ex. layout_width=30dp and layout_height=30dp) then put scaletype="fitXY" and the pic will squeeze into the size.
Upvotes: 2