Loading core/java/com/android/internal/app/ChooserActivity.java +5 −3 Original line number Diff line number Diff line Loading @@ -1808,15 +1808,17 @@ public class ChooserActivity extends ResolverActivity { offset += lastHeight; } if (lastHeight != 0 && isSendAction(getTargetIntent())) { boolean isPortrait = getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT; if (lastHeight != 0 && isSendAction(getTargetIntent()) && isPortrait) { // make sure to leave room for direct share 4->8 expansion int expansionArea = (int) (mResolverDrawerLayout.getUncollapsibleHeight() (int) (mResolverDrawerLayout.getAlwaysShowHeight() / DIRECT_SHARE_EXPANSION_RATE); offset = Math.min(offset, bottom - top - lastHeight - expansionArea); } mResolverDrawerLayout.setCollapsibleHeightReserved(offset); mResolverDrawerLayout.setCollapsibleHeightReserved(Math.min(offset, bottom - top)); }); } } Loading core/java/com/android/internal/widget/ResolverDrawerLayout.java +5 −4 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ public class ResolverDrawerLayout extends ViewGroup { private int mCollapsibleHeight; private int mUncollapsibleHeight; private int mAlwaysShowHeight; /** * The height in pixels of reserved space added to the top of the collapsed UI; Loading Loading @@ -832,7 +833,7 @@ public class ResolverDrawerLayout extends ViewGroup { } } final int alwaysShowHeight = heightUsed; mAlwaysShowHeight = heightUsed; // And now the rest. for (int i = 0; i < childCount; i++) { Loading @@ -854,7 +855,7 @@ public class ResolverDrawerLayout extends ViewGroup { final int oldCollapsibleHeight = mCollapsibleHeight; mCollapsibleHeight = Math.max(0, heightUsed - alwaysShowHeight - getMaxCollapsedHeight()); heightUsed - mAlwaysShowHeight - getMaxCollapsedHeight()); mUncollapsibleHeight = heightUsed - mCollapsibleHeight; updateCollapseOffset(oldCollapsibleHeight, !isDragging()); Loading @@ -871,8 +872,8 @@ public class ResolverDrawerLayout extends ViewGroup { /** * @return The space reserved by views with 'alwaysShow=true' */ public int getUncollapsibleHeight() { return mUncollapsibleHeight; public int getAlwaysShowHeight() { return mAlwaysShowHeight; } @Override Loading Loading
core/java/com/android/internal/app/ChooserActivity.java +5 −3 Original line number Diff line number Diff line Loading @@ -1808,15 +1808,17 @@ public class ChooserActivity extends ResolverActivity { offset += lastHeight; } if (lastHeight != 0 && isSendAction(getTargetIntent())) { boolean isPortrait = getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT; if (lastHeight != 0 && isSendAction(getTargetIntent()) && isPortrait) { // make sure to leave room for direct share 4->8 expansion int expansionArea = (int) (mResolverDrawerLayout.getUncollapsibleHeight() (int) (mResolverDrawerLayout.getAlwaysShowHeight() / DIRECT_SHARE_EXPANSION_RATE); offset = Math.min(offset, bottom - top - lastHeight - expansionArea); } mResolverDrawerLayout.setCollapsibleHeightReserved(offset); mResolverDrawerLayout.setCollapsibleHeightReserved(Math.min(offset, bottom - top)); }); } } Loading
core/java/com/android/internal/widget/ResolverDrawerLayout.java +5 −4 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ public class ResolverDrawerLayout extends ViewGroup { private int mCollapsibleHeight; private int mUncollapsibleHeight; private int mAlwaysShowHeight; /** * The height in pixels of reserved space added to the top of the collapsed UI; Loading Loading @@ -832,7 +833,7 @@ public class ResolverDrawerLayout extends ViewGroup { } } final int alwaysShowHeight = heightUsed; mAlwaysShowHeight = heightUsed; // And now the rest. for (int i = 0; i < childCount; i++) { Loading @@ -854,7 +855,7 @@ public class ResolverDrawerLayout extends ViewGroup { final int oldCollapsibleHeight = mCollapsibleHeight; mCollapsibleHeight = Math.max(0, heightUsed - alwaysShowHeight - getMaxCollapsedHeight()); heightUsed - mAlwaysShowHeight - getMaxCollapsedHeight()); mUncollapsibleHeight = heightUsed - mCollapsibleHeight; updateCollapseOffset(oldCollapsibleHeight, !isDragging()); Loading @@ -871,8 +872,8 @@ public class ResolverDrawerLayout extends ViewGroup { /** * @return The space reserved by views with 'alwaysShow=true' */ public int getUncollapsibleHeight() { return mUncollapsibleHeight; public int getAlwaysShowHeight() { return mAlwaysShowHeight; } @Override Loading