change css flex to declarative layout