diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java index 96bfe7394440e..ed1b6a3485a14 100644 --- a/core/java/com/android/internal/app/ResolverActivity.java +++ b/core/java/com/android/internal/app/ResolverActivity.java @@ -396,13 +396,6 @@ public class ResolverActivity extends Activity implements | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); rdl.setOnApplyWindowInsetsListener(this::onApplyWindowInsets); - if (shouldShowTabs()) { - rdl.setMaxCollapsedHeight(getResources().getDimensionPixelSize( - R.dimen.resolver_empty_state_height_with_tabs)); - findViewById(R.id.profile_pager).setMinimumHeight( - getResources().getDimensionPixelSize(R.dimen.resolver_empty_state_height)); - } - mResolverDrawerLayout = rdl; } diff --git a/core/java/com/android/internal/app/ResolverViewPager.java b/core/java/com/android/internal/app/ResolverViewPager.java index 823901896bb2a..87a53161d7a59 100644 --- a/core/java/com/android/internal/app/ResolverViewPager.java +++ b/core/java/com/android/internal/app/ResolverViewPager.java @@ -18,13 +18,12 @@ package com.android.internal.app; import android.content.Context; import android.util.AttributeSet; -import android.view.MotionEvent; import android.view.View; import com.android.internal.widget.ViewPager; /** - * A {@link ViewPager} which wraps around its first child's height. + * A {@link ViewPager} which wraps around its tallest child's height. *

Normally {@link ViewPager} instances expand their height to cover all remaining space in * the layout. *

This class is used for the intent resolver's tabbed view. @@ -56,16 +55,17 @@ public class ResolverViewPager extends ViewPager { } widthMeasureSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY); int height = getMeasuredHeight(); - if (getChildCount() > 0) { - View child = getChildAt(0); + int maxHeight = 0; + for (int i = 0; i < getChildCount(); i++) { + View child = getChildAt(i); child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST)); - if (height > child.getMeasuredHeight()) { - height = child.getMeasuredHeight(); + if (maxHeight < child.getMeasuredHeight()) { + maxHeight = child.getMeasuredHeight(); } } - if (height < getMinimumHeight()) { - height = getMinimumHeight(); + if (maxHeight > 0) { + height = maxHeight; } heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY); super.onMeasure(widthMeasureSpec, heightMeasureSpec); diff --git a/core/res/res/layout/chooser_list_per_profile.xml b/core/res/res/layout/chooser_list_per_profile.xml index 38b1b529458cb..b833243a966c1 100644 --- a/core/res/res/layout/chooser_list_per_profile.xml +++ b/core/res/res/layout/chooser_list_per_profile.xml @@ -17,7 +17,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="8dp"> + android:paddingTop="8dp" + android:paddingBottom="8dp"> + android:layout_marginTop="48dp" + android:layout_width="24dp" + android:layout_height="24dp"/> + android:textSize="14sp"/>