Add XViewLayoutModel but not fix all bugs yet.