saulmm / CoordinatorBehaviorExample

2.71k stars 590 forks source link

How can I use mFinalLeftAvatarPadding? #18

Open CeccoCQ opened 8 years ago

CeccoCQ commented 8 years ago

I'm working with NavigationIcon (?homeAsUpIndicator), can I set the left margin to avatar to avoid overlapping of the image above the indicator?

I've added:

        child.setY(mStartYPosition - distanceYToSubtract);
        if(mStartXPosition - distanceXToSubtract > mFinalLeftAvatarPadding) {
            child.setX(mStartXPosition - distanceXToSubtract);
        }

into onDependentViewChanged. My spacing_normal size is 32dp + 8dp (size of indicator + default padding).

jkwiecien commented 8 years ago

+1

macr00 commented 8 years ago

One solution is to replace R.dimen.abc_action_bar_content_inset_material in line 124 with a dimen allowing for navigation icon (I replaced it with a dimen resource of 40dp)

drinfernoo commented 6 years ago

@macr00 Does this require the code added by @CeccoCQ? And does it work?