Managed to set preview text declaratively.