Updates layout margins with the given values
if layoutParams is not a type of ViewGroup.MarginLayoutParams