OSDN Git Service

Fix shift in share sheet
authorJason Monk <jmonk@google.com>
Thu, 31 Aug 2017 19:42:51 +0000 (15:42 -0400)
committerJason Monk <jmonk@google.com>
Thu, 31 Aug 2017 19:42:51 +0000 (15:42 -0400)
Was counting the padding twice, its included in height already.

Test: visual
Change-Id: I012c6db585eb5fac0d5cee87971d94740c520f07
Fixes: 63647502

core/java/com/android/internal/app/ChooserActivity.java

index 54afc95..2cab009 100644 (file)
@@ -1470,10 +1470,8 @@ public class ChooserActivity extends ResolverActivity {
             }
 
             final int oldHeight = holder.row.getLayoutParams().height;
-            int measuredRowHeight = holder.measuredRowHeight + holder.row.getPaddingTop()
-                    + holder.row.getPaddingBottom();
             holder.row.getLayoutParams().height = Math.max(1,
-                    (int) (measuredRowHeight * getRowScale(rowPosition)));
+                    (int) (holder.measuredRowHeight * getRowScale(rowPosition)));
             if (holder.row.getLayoutParams().height != oldHeight) {
                 holder.row.requestLayout();
             }