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: 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. 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" />
Comments
Post a Comment