refactor a bit initLayout to share some code in LayoutBase
make sure this is possible to get visual animation on removeView and fix missing require