Regulating strain in perovskite thin films through charge-transport layers