Fix margins in linearLayout, add test for vertical case