saulmm / CoordinatorBehaviorExample

2.71k stars 590 forks source link

What's the value of maybeInitProperties()? #34

Open Jrodseth opened 7 years ago

Jrodseth commented 7 years ago

Why check if any of the private fields need to be initialized every time onDependentViewChanged is called? Do you expect the values to be reset to 0 by something?

@Override public boolean onDependentViewChanged(CoordinatorLayout parent, CircleImageView child, View dependency) { maybeInitProperties(child, dependency);

I would think initializing them once would be enough so I'm wondering if I'm missing something that requires this approach?

drinfernoo commented 6 years ago

Also, the mCustom... attributes are set from XML in the constructor, but never read?