There are two kinds of Riya - Showing off-Ostentation ie pure ostentation and adulterated ostention. In pure ostentation "Riya" a man does a good deed only for worldly benefit. In Adulterated ostentation, a man does a good deed with the intention of reaping the benefits of the world as well as of the Hereafter.
Al-GhazaliHalf of disbelief in Allah in the world is caused by people who make religion look ugly due to their bad conduct and ignorance
Al-Ghazali