layout_centerHorizontal="true", layout_centerInParent="true" - one of them isn't needed
layout_width="match_parent", layout_centerHorizontal="true" - no need to center if it's all size. This is a bit problematic because in code the size might change, so maybe have this disabled by default, or a weak warning, or something.
And of course any layout configuration that doesn't belong to the parent. such as layout_centerHorizontal for a child of LinearLayout and many more. These happen when copy-pasting and when converting from one layout to another without noticing them.
Examples:
layout_centerHorizontal="true"
,layout_centerInParent="true"
- one of them isn't neededlayout_width="match_parent"
,layout_centerHorizontal="true"
- no need to center if it's all size. This is a bit problematic because in code the size might change, so maybe have this disabled by default, or a weak warning, or something.And of course any layout configuration that doesn't belong to the parent. such as
layout_centerHorizontal
for a child of LinearLayout and many more. These happen when copy-pasting and when converting from one layout to another without noticing them.