issue #5047, refactor LayoutParameterType
issue #5057, refactor LinearGravity