Yahya related to me from Malik that he had heard that Ali ibn Abi Talib said, "Things that pass in front of a man praying do not break his prayer."
USC-MSA web (English) reference: Book 9, Hadith 43
Arabic reference: Book 9, Hadith 372
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.