android - Proportionately re-sizing ImageView when width is set to fill parent -


Is there a way to determine the height of an image view if the width is set to android: layout_width = "Fill_parent "? It appears that there is no direct way to adjust the view of an image, without it the dimension of any one seems strange that the app expects many screen sizes and proposals to support to be done.

You can use wrap_content for height and on the right scale (Either in the code or in the android: scaleType attribute in XML). You are probably looking for CENTER_INSIDE / Android: scaleType = "centerInside" .

View

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -