We should not stop doing what is prescribed for fear of showing off
Question

Sometimes I want to do a righteous deed such as praying or reading Quran, then someone comes in and I stop reading in the Mushaf or I don’t start praying, or I shorten my prayer if I have started it. Is it correct to do this?
Praise be to Allah.Ibn Muflih said: 
“We should not stop doing what is prescribed in Islam for fear of showing off.” 
One of the things that may happen to a person is that he wants to do an act of worship, but something happens that makes him stop doing it for fear that he may be showing off in some way. He should not pay attention to that. We should do what Allah has commanded and encouraged us to do, and seek the help of Allah, and put our trust in Him that He will help us to do the action in the manner prescribed in sharee’ah. 
Shaykh Muhiy al-Deen al-Nawawi (may Allah have mercy on him) said: We should not stop remembering Allah (dhikr) with our tongues as well as in our hearts for fear that people may think that we are showing off; rather we should remember Allah with both, seeking the pleasure of Allah thereby. He mentioned what al-Fudayl ibn ‘Iyaad (may Allah have mercy on him) said: that not doing something because of people was (a form of) showing off, and doing something because of people was (a form of) shirk. He said: if we start to pay attention to people and try to protect ourselves from their thinking badly of us, that would stop us from doing a lot of good deeds. Abu’l-Faraj ibn al-Jawzi said: As for not doing an act of worship for fear of showing off, if the motive for doing that act of worship is something other than religious commitment, then he should refrain from doing it, because it is a sin. But if the motive for doing it is religious commitment and he does it sincerely for the sake of Allah, then he should not refrain from doing it, because the motive is religious commitment. Similarly, if he refrains from doing a righteous deed for fear that he will be called a show-off, he should not do that (refrain from that deed) because this is one of the traps of the Shaytaan. 
Ibraaheem al-Nakha’i said: if the Shaytaan comes to you whilst you are praying and says, “you are showing off,” then make your prayer longer. With regard to the report that one of the salaf stopped praying for fear of showing off, this is to be interpreted as meaning that they felt as if they were showing off, so they gave up. This is as he said. For example, al-A’mash said, “I was with Ibraaheem al-Nakha’i and he was reading Quran. A man asked permission to enter and he covered the Mus-haf and said, ‘He should not think that I read it all the time.’ If we should not stop doing acts of worship for fear of showing off, then it is more appropriate that we should not refrain from doing them for fear of the self-admiration that may come after doing them. 
We have discussed above the issue of self-admiration before the chapters on enjoining what is good and forbidding what is evil. We mentioned before the chapter on clothing the issue of visiting the ruler in order to enjoin what is good and forbid what is evil, and we quoted the opinion of Dawood al-Taa’i who said, ‘I fear that he may be punished by the whip.’ It was said to him, ‘He can bear that.’ He said, ‘I fear that he may be executed by the sword.’ It was said to him, ‘He can bear that.’ Then he said, ‘I fear that he may be afflicted by the hidden disease’, i.e., self-admiration.