mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 09:18:49 +00:00
Clip reactions mask if the view falls below the input panel.
This commit is contained in:
parent
5e59f77f83
commit
21cf390d0e
@ -74,7 +74,9 @@ public class MaskView extends View {
|
||||
target.getDrawingRect(drawingRect);
|
||||
activityContentView.offsetDescendantRectToMyCoords(target, drawingRect);
|
||||
|
||||
Bitmap mask = Bitmap.createBitmap(target.getWidth(), target.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
drawingRect.bottom = Math.min(drawingRect.bottom, getBottom() - getPaddingBottom());
|
||||
|
||||
Bitmap mask = Bitmap.createBitmap(target.getWidth(), drawingRect.height(), Bitmap.Config.ARGB_8888);
|
||||
Canvas maskCanvas = new Canvas(mask);
|
||||
|
||||
target.draw(maskCanvas);
|
||||
|
@ -516,6 +516,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
if (emojiDrawerStub.resolved() && container.getCurrentInput() == emojiDrawerStub.get()) {
|
||||
container.hideAttachedInput(true);
|
||||
}
|
||||
|
||||
if (reactionOverlay != null && reactionOverlay.isShowing()) {
|
||||
reactionOverlay.hide();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2797,7 +2801,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
{
|
||||
reactionOverlay.setOnToolbarItemClickedListener(toolbarListener);
|
||||
reactionOverlay.setOnHideListener(onHideListener);
|
||||
reactionOverlay.show(this, maskTarget, messageRecord);
|
||||
reactionOverlay.show(this, maskTarget, messageRecord, inputPanel.getMeasuredHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -129,7 +129,7 @@ public final class ConversationReactionOverlay extends RelativeLayout {
|
||||
initAnimators();
|
||||
}
|
||||
|
||||
public void show(@NonNull Activity activity, @NonNull View maskTarget, @NonNull MessageRecord messageRecord) {
|
||||
public void show(@NonNull Activity activity, @NonNull View maskTarget, @NonNull MessageRecord messageRecord, int maskPaddingBottom) {
|
||||
|
||||
if (overlayState != OverlayState.HIDDEN) {
|
||||
return;
|
||||
@ -168,6 +168,7 @@ public final class ConversationReactionOverlay extends RelativeLayout {
|
||||
verticalScrubBoundary.update(lastSeenDownPoint.y - distanceFromTouchDownPointToTopOfScrubberDeadZone,
|
||||
lastSeenDownPoint.y + distanceFromTouchDownPointToBottomOfScrubberDeadZone);
|
||||
|
||||
maskView.setPadding(0, 0, 0, maskPaddingBottom);
|
||||
maskView.setTarget(maskTarget);
|
||||
|
||||
hideAnimatorSet.end();
|
||||
@ -177,7 +178,7 @@ public final class ConversationReactionOverlay extends RelativeLayout {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
this.activity = activity;
|
||||
originalStatusBarColor = activity.getWindow().getStatusBarColor();
|
||||
activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, R.color.core_grey_45));
|
||||
activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, R.color.action_mode_status_bar));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user