Closed noordawod closed 5 years ago
@deano2390 is this project active?
I tried this out as I was building an über version. I didn't like how the margins were set to 0, here's the changes I preferred in setTarget:
// If there's no custom gravity in place, we'll do automatic gravity calculation.
if (!mHasCustomGravity) {
if (yPos >= midPoint) {
// target is in lower half of screen, we'll sit above it
mGravity = Gravity.BOTTOM;
} else {
// target is in upper half of screen, we'll sit below it
mGravity = Gravity.TOP;
}
}
if (mGravity == Gravity.TOP) {
mContentTopMargin = yPos + radius + mShapePadding;
mContentBottomMargin = 0;
} else {
mContentTopMargin = 0;
mContentBottomMargin = (height - yPos) + radius + mShapePadding;
}
i'm so sorry for not responding, I'm just so busy I don't have the time to maintain this project at all. I have invited you as a collaborator if you want to merge your changes in.
Merged pull into master, thanks @deano2390.
@CapnSpellcheck can you please send a new pr?
What's going on here? Unfortunately I did not create a proper fork here, but pulled the source in as a module to my project (this was at a time when I was being very lazy). So I don't think I was the source of the PR but just gave the snippet above.....
If that happens, automatic gravity calculation will be ignored.