Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    I changed the layout_margin on the ImageView to padding instead, so I can have the same 100dp on the LinearLayout and ImageView and still contain the ImageView inside the LinearLayout (it will be 110dp if using margin). Commented Feb 27, 2018 at 12:02
  • @BadCash I am not getting. means any issue still remains or it is fully solved?? Commented Feb 27, 2018 at 12:05
  • 1
    It's fully solved, thanks. Just mentioning for others who might find this answer that they need to adjust the width to account for margins, or use padding instead. Commented Feb 27, 2018 at 13:52
  • @BadCash I think margin and padding are same in this case. instead if you want 100 dp image you can remove margin padding. padding provides space inside imageview then imageview will also 95 dp. stackoverflow.com/a/21959146/8089770 Commented Feb 28, 2018 at 4:09