android - How to set imageview fit to sreen? -


I used Android studio and to fit the image using a relative background image to fit the image I give layout top margins and set Android: layout_height = "match_parent" android: paddingLeft = "@ dimen / activity_horizontal_margin" Android: Android: PaddingRight = "@ dimen / activity_horizontal_margin" Android: paddingTop = "@ dimen / activity_vertical_margin" Android: paddingBottom = "@ dimen / activity_vertical_margin" Android: Background Min = "@draubable / backdrop" & gt; & Lt; ImageView android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_marginTop = "500dp" Android: background = "@drawable / blacksquare" Android: alpha = ".33" />

The following image tags in your parents' layout Write. Android: Image_view Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: scaleType = "fitXY" Android: background = "@drawable / blackscare" / & gt;

You can also remove padding from your parent layout tag to fit the image view on the screen without padding.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -