mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-19 16:24:41 +01:00
Fix issue with multiselect boundary on photos and other media.
This commit is contained in:
@@ -896,16 +896,20 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||
}
|
||||
}
|
||||
|
||||
private static int getProjectionTop(@NonNull View child) {
|
||||
Projection projection = Projection.relativeToViewRoot(child, null);
|
||||
int y = (int) projection.getY();
|
||||
/**
|
||||
* Multiselect boundaries are drawn by an item decoration, so they are relative to the list
|
||||
* rather than to the view root.
|
||||
*/
|
||||
private int getProjectionTop(@NonNull View child) {
|
||||
Projection projection = Projection.relativeToParent(this, child, null);
|
||||
int y = (int) projection.getY() + getTop();
|
||||
projection.release();
|
||||
return y;
|
||||
}
|
||||
|
||||
private static int getProjectionBottom(@NonNull View child) {
|
||||
Projection projection = Projection.relativeToViewRoot(child, null);
|
||||
int bottom = (int) projection.getY() + projection.getHeight();
|
||||
private int getProjectionBottom(@NonNull View child) {
|
||||
Projection projection = Projection.relativeToParent(this, child, null);
|
||||
int bottom = (int) projection.getY() + projection.getHeight() + getTop();
|
||||
projection.release();
|
||||
return bottom;
|
||||
}
|
||||
@@ -2653,7 +2657,9 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||
return null;
|
||||
}
|
||||
|
||||
return Projection.relativeToViewRoot(bodyBubble, bodyBubbleCorners)
|
||||
return Projection.relativeToParent(this, bodyBubble, bodyBubbleCorners)
|
||||
.translateX(getLeft())
|
||||
.translateY(getTop())
|
||||
.translateX(bodyBubble.getTranslationX())
|
||||
.translateX(getTranslationX())
|
||||
.scale(bodyBubble.getScaleX());
|
||||
|
||||
+2
-2
@@ -465,8 +465,8 @@ public final class ConversationUpdateItem extends FrameLayout
|
||||
}
|
||||
|
||||
private int getCollapsedButtonBottom() {
|
||||
Projection projection = Projection.relativeToViewRoot(collapsedButton, null);
|
||||
int bottom = (int) projection.getY() + projection.getHeight();
|
||||
Projection projection = Projection.relativeToParent(this, collapsedButton, null);
|
||||
int bottom = (int) projection.getY() + projection.getHeight() + getTop();
|
||||
projection.release();
|
||||
return bottom;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user