Skip to content

Commit

Permalink
Fix overlay position (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
valterc authored Jan 15, 2025
1 parent 1b4d43b commit 16b55aa
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
Expand Down Expand Up @@ -84,10 +85,12 @@ public void updatePosition() {

if (layoutParamsOverlay.width != ViewGroup.LayoutParams.MATCH_PARENT) {
layoutParamsParent.x = xValue;
layoutParamsParent.gravity |= Gravity.START;
}

if (layoutParamsOverlay.height != ViewGroup.LayoutParams.MATCH_PARENT) {
layoutParamsParent.y = yValue;
layoutParamsParent.gravity |= Gravity.TOP;
}

lastX = xValue;
Expand Down

0 comments on commit 16b55aa

Please sign in to comment.