A true friend wouldn't have acted like that.

Literal

True [possessive-の] friend if, that-way [topic-には] act not-did would-probably.

あんなふうには ('in that manner') — あんな ('that kind of') + ふう ('manner') + には (contrastive topic). 行動しなかっただろう is counterfactual — 'wouldn't have acted.' The past tense + だろう creates a hypothetical about the past.