protected boolean hasDividerBeforeChildAt(int childIndex) { final View childBefore = getChildAt(childIndex - 1); final View child = getChildAt(childIndex); boolean result = false; if (childIndex < getChildCount() && childBefore instanceof ActionMenuChildView) { result |= ((ActionMenuChildView) childBefore).needsDividerAfter(); } if (childIndex > 0 && child instanceof ActionMenuChildView) { result |= ((ActionMenuChildView) child).needsDividerBefore(); } return result; }
final int childCount = getChildCount(); final int midVertical = (top + bottom) / 2; final int dividerWidth = 0;//getDividerWidth();
protected boolean hasDividerBeforeChildAt(int childIndex) { if (childIndex == 0) { return false; } final View childBefore = getChildAt(childIndex - 1); final View child = getChildAt(childIndex); boolean result = false; if (childIndex < getChildCount() && childBefore instanceof ActionMenuChildView) { result |= ((ActionMenuChildView) childBefore).needsDividerAfter(); } if (childIndex > 0 && child instanceof ActionMenuChildView) { result |= ((ActionMenuChildView) child).needsDividerBefore(); } return result; }
final int childCount = getChildCount(); final int midVertical = (top + bottom) / 2; final int dividerWidth = 0;//getDividerWidth();
final View child = getChildAt(i); if (child.getVisibility() != GONE && !(child == mMenuView && mMenuView.getChildCount() == 0)) { visibleChildren++;
final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final View child = getChildAt(i);
final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final View child = getChildAt(i);
final View child = getChildAt(i); if (child.getVisibility() != GONE && !(child == mMenuView && mMenuView.getChildCount() == 0)) { visibleChildren++;
private Animator makeOutAnimation() { ObjectAnimator buttonAnimator = ObjectAnimator.ofFloat(mClose, "translationX", -mClose.getWidth() - ((MarginLayoutParams) mClose.getLayoutParams()).leftMargin); buttonAnimator.setDuration(200); buttonAnimator.addListener(this); buttonAnimator.setInterpolator(new DecelerateInterpolator()); AnimatorSet set = new AnimatorSet(); AnimatorSet.Builder b = set.play(buttonAnimator); if (mMenuView != null) { final int count = mMenuView.getChildCount(); if (count > 0) { for (int i = 0; i < 0; i++) { AnimatorProxy child = AnimatorProxy.wrap(mMenuView.getChildAt(i)); child.setScaleY(0); ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0); a.setDuration(100); a.setStartDelay(i * 70); b.with(a); } } } return set; }
private Animator makeOutAnimation() { ObjectAnimator buttonAnimator = ObjectAnimator.ofFloat(mClose, "translationX", -mClose.getWidth() - ((MarginLayoutParams) mClose.getLayoutParams()).leftMargin); buttonAnimator.setDuration(200); buttonAnimator.addListener(this); buttonAnimator.setInterpolator(new DecelerateInterpolator()); AnimatorSet set = new AnimatorSet(); AnimatorSet.Builder b = set.play(buttonAnimator); if (mMenuView != null) { final int count = mMenuView.getChildCount(); if (count > 0) { for (int i = 0; i < 0; i++) { AnimatorProxy child = AnimatorProxy.wrap(mMenuView.getChildAt(i)); child.setScaleY(0); ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0); a.setDuration(100); a.setStartDelay(i * 70); b.with(a); } } } return set; }
private Animator makeInAnimation() { mClose.setTranslationX(-mClose.getWidth() - ((MarginLayoutParams) mClose.getLayoutParams()).leftMargin); ObjectAnimator buttonAnimator = ObjectAnimator.ofFloat(mClose, "translationX", 0); buttonAnimator.setDuration(200); buttonAnimator.addListener(this); buttonAnimator.setInterpolator(new DecelerateInterpolator()); AnimatorSet set = new AnimatorSet(); AnimatorSet.Builder b = set.play(buttonAnimator); if (mMenuView != null) { final int count = mMenuView.getChildCount(); if (count > 0) { for (int i = count - 1, j = 0; i >= 0; i--, j++) { AnimatorProxy child = AnimatorProxy.wrap(mMenuView.getChildAt(i)); child.setScaleY(0); ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0, 1); a.setDuration(100); a.setStartDelay(j * 70); b.with(a); } } } return set; }
private Animator makeInAnimation() { mClose.setTranslationX(-mClose.getWidth() - ((MarginLayoutParams) mClose.getLayoutParams()).leftMargin); ObjectAnimator buttonAnimator = ObjectAnimator.ofFloat(mClose, "translationX", 0); buttonAnimator.setDuration(200); buttonAnimator.addListener(this); buttonAnimator.setInterpolator(new DecelerateInterpolator()); AnimatorSet set = new AnimatorSet(); AnimatorSet.Builder b = set.play(buttonAnimator); if (mMenuView != null) { final int count = mMenuView.getChildCount(); if (count > 0) { for (int i = count - 1, j = 0; i >= 0; i--, j++) { AnimatorProxy child = AnimatorProxy.wrap(mMenuView.getChildAt(i)); child.setScaleY(0); ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0, 1); a.setDuration(100); a.setStartDelay(j * 70); b.with(a); } } } return set; }