to show off, to seek attention
Rafael não para de falar sobre seu carro novo caríssimo, se quer aparecer, que coloque uma melancia na cabeça!
Rafael won't stop talking about his expensive new car. If he wants to show off, he might as well wear a watermelon on his head!
The expression colocar melancia na cabeça ("to put a watermelon on one's head") rests on a piece of comic folk imagery rather than a documented historical event: someone walking around with a watermelon balanced on their head simply cannot go unnoticed.
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.