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.
One can no more keep the mind from returning to an idea than the sea from returning to a shore. For a sailor, this is called the tide; in the case of the guilty it is called remorse. God stirs up the soul as well as the ocean.
For wisdom is the property of the dead,
A something incompatible with life; and power,
Like everything that has the stain of blood,
A property of the living; but no stain
Can come upon the visage of the moon
When it has looked in glory from a cloud.