diff --git a/android/java/org/chromium/chrome/browser/ntp_background_images/util/NTPUtil.java b/android/java/org/chromium/chrome/browser/ntp_background_images/util/NTPUtil.java index 55fb7f2688594..1db06599dd411 100644 --- a/android/java/org/chromium/chrome/browser/ntp_background_images/util/NTPUtil.java +++ b/android/java/org/chromium/chrome/browser/ntp_background_images/util/NTPUtil.java @@ -109,12 +109,11 @@ public static int correctImageCreditLayoutTopPosition(NTPImage ntpImage) { // Correction defaults to tablet BackgroundImage imageCreditCorrection = isLandscape ? (int) (pxHeight * (isCompensate ? 0.48 : 0.54)) : (int) (pxHeight * (isCompensate ? 0.60 : 0.30)); - if (ntpImage instanceof BackgroundImage) { if (!isTablet) { imageCreditCorrection = isLandscape ? (int) (pxHeight * (isCompensate ? 0.12 : 0.88)) - : (int) (pxHeight * (isCompensate ? 0.53 : 0.59)); + : (int) (pxHeight - dpToPx(activity, 355)); } if (!ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_NEWS)) { imageCreditCorrection = (int) imageCreditCorrection - (int) (pxHeight * 0.04); @@ -123,7 +122,7 @@ public static int correctImageCreditLayoutTopPosition(NTPImage ntpImage) { if (!isTablet) { imageCreditCorrection = isLandscape ? (int) (pxHeight * (isCompensate ? 0.02 : 0.98)) - : (int) (pxHeight * (isCompensate ? 0.36 : 0.50)); + : (int) (pxHeight - dpToPx(activity, 480)); } else { imageCreditCorrection = isLandscape ? (int) (pxHeight * (isCompensate ? 0.28 : 0.72)) @@ -205,6 +204,7 @@ public static void updateOrientedUI( layoutParams.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL; layoutParams.setMargins(0, 0, 0, dpToPx(context, 5)); } + parentLayout.setOrientation(LinearLayout.VERTICAL); imageCreditLayout.setLayoutParams(imageCreditLayoutParams);