Merge "Only add vertical resolver_list padding if showing tabs." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-03-05 17:36:08 +00:00
committed by Android (Google) Code Review
8 changed files with 15 additions and 10 deletions

View File

@@ -2447,6 +2447,11 @@ public class ChooserActivity extends ResolverActivity implements
offset += findViewById(R.id.tabs).getHeight();
}
View tabDivider = findViewById(R.id.resolver_tab_divider);
if (tabDivider.getVisibility() == View.VISIBLE) {
offset += tabDivider.getHeight();
}
int directShareHeight = 0;
rowsToShow = Math.min(4, rowsToShow);
mLastNumberOfChildren = recyclerView.getChildCount();

View File

@@ -645,7 +645,7 @@ public class ResolverActivity extends Activity implements
final DisplayResolveInfo dri =
mMultiProfilePagerAdapter.getActiveListAdapter().getOtherProfile();
if (dri != null && !ENABLE_TABBED_VIEW) {
if (dri != null && !shouldShowTabs()) {
mProfileView.setVisibility(View.VISIBLE);
View text = mProfileView.findViewById(R.id.profile_button);
if (!(text instanceof TextView)) {
@@ -1331,7 +1331,7 @@ public class ResolverActivity extends Activity implements
}
// We partially rebuild the inactive adapter to determine if we should auto launch
boolean rebuildCompleted = mMultiProfilePagerAdapter.rebuildActiveTab(true);
if (hasWorkProfile() && ENABLE_TABBED_VIEW) {
if (shouldShowTabs()) {
boolean rebuildInactiveCompleted = mMultiProfilePagerAdapter.rebuildInactiveTab(false);
rebuildCompleted = rebuildCompleted && rebuildInactiveCompleted;
}

View File

@@ -16,9 +16,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="8dp"
android:paddingBottom="8dp">
android:layout_height="match_parent">
<com.android.internal.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -100,7 +100,8 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/colorBackgroundFloating"
android:foreground="?attr/dividerVertical" />
android:foreground="?attr/dividerVertical"
android:layout_marginBottom="@dimen/resolver_tab_divider_bottom_padding"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"

View File

@@ -17,9 +17,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="8dp"
android:paddingBottom="8dp">
android:layout_height="match_parent">
<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"

View File

@@ -183,7 +183,8 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/colorBackgroundFloating"
android:foreground="?attr/dividerVertical" />
android:foreground="?attr/dividerVertical"
android:layout_marginBottom="@dimen/resolver_tab_divider_bottom_padding"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"

View File

@@ -776,6 +776,7 @@
<dimen name="resolver_empty_state_height_with_tabs">268dp</dimen>
<dimen name="resolver_max_collapsed_height">192dp</dimen>
<dimen name="resolver_max_collapsed_height_with_tabs">248dp</dimen>
<dimen name="resolver_tab_divider_bottom_padding">8dp</dimen>
<dimen name="chooser_action_button_icon_size">18dp</dimen>

View File

@@ -3899,6 +3899,7 @@
<java-symbol type="dimen" name="resolver_empty_state_height_with_tabs" />
<java-symbol type="dimen" name="resolver_max_collapsed_height_with_tabs" />
<java-symbol type="bool" name="sharesheet_show_content_preview" />
<java-symbol type="dimen" name="resolver_tab_divider_bottom_padding" />
<!-- Toast message for background started foreground service while-in-use permission restriction feature -->
<java-symbol type="string" name="allow_while_in_use_permission_in_fgs" />