ViewGroup add 2 properties

This commit is contained in:
侯歌 2024-07-01 09:43:18 +08:00
parent 3d7977690a
commit 7cb12ca75d

View File

@ -198,7 +198,6 @@ void ViewGroup::initFromAttributes(Context*ctx,const AttributeSet&atts){
},FOCUS_BEFORE_DESCENDANTS); },FOCUS_BEFORE_DESCENDANTS);
setDescendantFocusability(flags); setDescendantFocusability(flags);
setMotionEventSplittingEnabled(atts.getBoolean("splitMotionEvents",false));
if(atts.getBoolean("animateLayoutChanges",false)) if(atts.getBoolean("animateLayoutChanges",false))
setLayoutTransition(new LayoutTransition()); setLayoutTransition(new LayoutTransition());
const int layoutMode = atts.getInt("layoutMode",std::map<const std::string,int>{ const int layoutMode = atts.getInt("layoutMode",std::map<const std::string,int>{
@ -206,6 +205,9 @@ void ViewGroup::initFromAttributes(Context*ctx,const AttributeSet&atts){
{"clipBounds",LAYOUT_MODE_CLIP_BOUNDS}, {"clipBounds",LAYOUT_MODE_CLIP_BOUNDS},
{"opticalBounds",LAYOUT_MODE_OPTICAL_BOUNDS} {"opticalBounds",LAYOUT_MODE_OPTICAL_BOUNDS}
},LAYOUT_MODE_UNDEFINED); },LAYOUT_MODE_UNDEFINED);
setAddStatesFromChildren(atts.getBoolean("addStatesFromChildren",false));
setMotionEventSplittingEnabled(atts.getBoolean("splitMotionEvents",false));
setAlwaysDrawnWithCacheEnabled(atts.getBoolean("alwaysDrawnWithCache",false));
setLayoutMode(layoutMode); setLayoutMode(layoutMode);
setTransitionGroup(atts.getBoolean("transitionGroup",false)); setTransitionGroup(atts.getBoolean("transitionGroup",false));
setTouchscreenBlocksFocus(atts.getBoolean("touchscreenBlocksFocus",false)); setTouchscreenBlocksFocus(atts.getBoolean("touchscreenBlocksFocus",false));