Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the FooterBarBehavior. #2

Merged
merged 1 commit into from May 5, 2016

Conversation

manuel-martos
Copy link

HI @devunwired.
I've been working on merging a version that relies on offsetTopAndBottom() but no way to make it stable. I've to add some state variables and fix their values over the application life cicle and sometimes those changes aren't obious at all, making the solution really complex. That's why I'm pull requesting the simplified version that works with setTranslationY().

@devunwired
Copy link
Owner

You could achieve the same effect without adding any state tracking:

int offset = -dependency.getTop();
int newTop = parent.getBottom() - child.getHeight() + offset;
child.offsetTopAndBottom(newTop - child.getTop());
return true;

However, I looked into it a bit more and I like the simpler way just as well. It's not the code I want people focusing on in this sample repo anyway…so I'm good with it as-is.

@devunwired devunwired merged commit b569fd1 into devunwired:master May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants