Grid children are given LinearLayoutParams almost everywhere, so their margins are taken from those as well as from GridLayoutParams, which gains margins. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>