Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86a41d1a authored by Alex Chau's avatar Alex Chau
Browse files

Avoid overlapping snackbar with nav buttons in tablets

Fix: 249378243
Test: manual
Change-Id: Ibbd0e917b1cbe657b2424acbad0134d6de807f62
parent 97db6097
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.widget.TextView;
import androidx.annotation.Nullable;

import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.compat.AccessibilityManagerCompat;
@@ -97,7 +98,11 @@ public class Snackbar extends AbstractFloatingView {
                dragLayer.getWidth() - maxMarginLeftRight * 2 - insets.left - insets.right,
                absoluteMaxWidth);
        params.width = minWidth;
        params.setMargins(0, 0, 0, marginBottom + insets.bottom);
        DeviceProfile deviceProfile = activity.getDeviceProfile();
        params.setMargins(0, 0, 0, marginBottom
                + (deviceProfile.isTaskbarPresent
                ? deviceProfile.taskbarSize + deviceProfile.getTaskbarOffsetY()
                : insets.bottom));

        TextView labelView = snackbar.findViewById(R.id.label);
        String labelText = res.getString(labelStringResId);