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

Commit 2e17bcaa authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Simplifying widget cell layout" into udc-dev

parents 1aee68df 8de41994
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
        android:layout_weight="1"
        android:importantForAccessibility="noHideDescendants"
        android:hapticFeedbackEnabled="false"
        android:clipChildren="false"
        android:layout_marginVertical="8dp">
        <!-- The image of the widget. This view does not support padding. Any placement adjustment
             should be done using margins. Width & height are set at runtime after scaling the
+9 −2
Original line number Diff line number Diff line
@@ -157,8 +157,15 @@ public class PendingItemDragHelper extends DragPreviewProvider {
                previewBounds.right -= padding;
            }
            if (mAppWidgetHostViewPreview != null) {
                previewWidth = mAppWidgetHostViewPreview.getMeasuredWidth();
                previewHeight = mAppWidgetHostViewPreview.getMeasuredHeight();
                float previewScale = mAppWidgetHostViewPreview.getScaleX();
                int widgetWidth = mAppWidgetHostViewPreview.getMeasuredWidth();
                int widgetHeight = mAppWidgetHostViewPreview.getMeasuredHeight();
                previewWidth = Math.round(widgetWidth * previewScale);
                previewHeight = Math.round(widgetHeight * previewScale);

                previewBounds.offset(
                        Math.round(widgetWidth * (previewScale - 1) / 2),
                        Math.round(widgetHeight * (previewScale - 1) / 2));
            } else {
                previewWidth = preview.getIntrinsicWidth();
                previewHeight = preview.getIntrinsicHeight();
+82 −251

File changed.

Preview size limit exceeded, changes collapsed.