Replying to text messages during the Friday khutbah comes under the heading of idle actions, which are prohibited. There is a clear prohibition on that which is less serious than that, in the words of the Prophet (blessings and peace of Allah be upon him): “…whoever touches the pebbles has engaged in an idle action.” Narrated by Muslim, 857.
Al-Qadi `Iyad (may Allah have mercy on him) said: “…whoever touches the pebbles has engaged in an idle action” – that is because by moving them and being distracted by them, he is engaging in an idle action and distracting others from hearing the khutbah with the sound of the pebbles being moved.
End quote from Ikmal al-Mu`allim bi Fawa’id Muslim, 3/253.
An-Nawawi (may Allah have mercy on him) said: The Prophet’s words “…whoever touches the pebbles has engaged in an idle action” indicate that it is prohibited to touch the pebbles or anything else by way of fidgeting whilst listening to the khutbah. This indicates that one should focus one’s mind on the khutbah and keep still.
End quote from Sharh an-Nawawi `ala Muslim, 6/147.
Shaykh Muhammad ibn Isma`il al-`Imrani (may Allah have mercy on him) said: Moving the beads of the masbahah is like moving the pebbles, and moving the pebbles is prohibited in the hadith “…whoever touches the pebbles has engaged in an idle action.”
End quote from Nayl al-Amani min Fatawa al-Qadi al-`Imrani, 1/383.
If merely moving the beads of the masbahah during the khutbah comes under the heading of idle actions, then undoubtedly responding to text messages on a mobile phone is more serious than that.
Shaykh Salih al-Fawzan (may Allah preserve him) said: It is not permissible to fidget with one’s mobile phone, or a siwak or pen, during the Friday khutbah; Rather one must sit still and listen attentively.
For more information, see the answer to question no. 119636.
And Allah knows best.