mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 05:37:53 +08:00
ViewGroup add 2 properties
This commit is contained in:
parent
3d7977690a
commit
7cb12ca75d
@ -198,7 +198,6 @@ void ViewGroup::initFromAttributes(Context*ctx,const AttributeSet&atts){
|
||||
},FOCUS_BEFORE_DESCENDANTS);
|
||||
setDescendantFocusability(flags);
|
||||
|
||||
setMotionEventSplittingEnabled(atts.getBoolean("splitMotionEvents",false));
|
||||
if(atts.getBoolean("animateLayoutChanges",false))
|
||||
setLayoutTransition(new LayoutTransition());
|
||||
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},
|
||||
{"opticalBounds",LAYOUT_MODE_OPTICAL_BOUNDS}
|
||||
},LAYOUT_MODE_UNDEFINED);
|
||||
setAddStatesFromChildren(atts.getBoolean("addStatesFromChildren",false));
|
||||
setMotionEventSplittingEnabled(atts.getBoolean("splitMotionEvents",false));
|
||||
setAlwaysDrawnWithCacheEnabled(atts.getBoolean("alwaysDrawnWithCache",false));
|
||||
setLayoutMode(layoutMode);
|
||||
setTransitionGroup(atts.getBoolean("transitionGroup",false));
|
||||
setTouchscreenBlocksFocus(atts.getBoolean("touchscreenBlocksFocus",false));
|
||||
@ -213,7 +215,7 @@ void ViewGroup::initFromAttributes(Context*ctx,const AttributeSet&atts){
|
||||
|
||||
ViewGroup::~ViewGroup() {
|
||||
while(mChildren.size()){
|
||||
View*v=mChildren[0];
|
||||
View*v = mChildren[0];
|
||||
removeViewAt(0);
|
||||
delete v;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user