Prevent Gallery layout from jumping when loading