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

Commit f5dbcd54 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Hide empty state icon and button in landscape mode." into...

Merge "Merge "Hide empty state icon and button in landscape mode." into rvc-dev am: 5e8e9e5f am: 27fcb962" into rvc-d1-dev-plus-aosp am: 5612bb29

Change-Id: I9741b4cfbcfc8a8b6808d7d059b6762b5491f902
parents e72ca7b5 5612bb29
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -387,9 +387,6 @@ public abstract class AbstractMultiProfilePagerAdapter extends PagerAdapter {
        resetViewVisibilitiesForWorkProfileEmptyState(emptyStateView);
        emptyStateView.setVisibility(View.VISIBLE);

        ImageView icon = emptyStateView.findViewById(R.id.resolver_empty_state_icon);
        icon.setImageResource(iconRes);

        TextView title = emptyStateView.findViewById(R.id.resolver_empty_state_title);
        title.setText(titleRes);

@@ -401,9 +398,17 @@ public abstract class AbstractMultiProfilePagerAdapter extends PagerAdapter {
            subtitle.setVisibility(View.GONE);
        }

        ImageView icon = emptyStateView.findViewById(R.id.resolver_empty_state_icon);
        Button button = emptyStateView.findViewById(R.id.resolver_empty_state_button);
        if (!getContext().getResources().getBoolean(R.bool.resolver_landscape_phone)) {
            icon.setVisibility(View.VISIBLE);
            icon.setImageResource(iconRes);
            button.setVisibility(buttonOnClick != null ? View.VISIBLE : View.GONE);
            button.setOnClickListener(buttonOnClick);
        } else {
            icon.setVisibility(View.GONE);
            button.setVisibility(View.GONE);
        }

        activeListAdapter.markTabLoaded();
    }
+1 −1
Original line number Diff line number Diff line
@@ -2674,7 +2674,7 @@ public class ChooserActivity extends ResolverActivity implements
     */
    private boolean shouldShowStickyContentPreview() {
        return shouldShowStickyContentPreviewNoOrientationCheck()
                && getResources().getBoolean(R.bool.sharesheet_show_content_preview);
                && !getResources().getBoolean(R.bool.resolver_landscape_phone);
    }

    private boolean shouldShowStickyContentPreviewNoOrientationCheck() {
+1 −1
Original line number Diff line number Diff line
@@ -22,11 +22,11 @@
    android:orientation="vertical"
    android:gravity="center_horizontal"
    android:visibility="gone"
    android:paddingTop="48dp"
    android:paddingStart="24dp"
    android:paddingEnd="24dp">
    <ImageView
        android:id="@+id/resolver_empty_state_icon"
        android:layout_marginTop="48dp"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_centerHorizontal="true" />
+1 −1
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@
  -->

<resources>
    <bool name="sharesheet_show_content_preview">true</bool>
    <bool name="resolver_landscape_phone">false</bool>
</resources>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -29,5 +29,5 @@
         <p>The main purpose is for OEMs to customize the rendering of the
         lockscreen, setting this to true should come with customized drawables. -->
    <bool name="use_lock_pattern_drawable">false</bool>
    <bool name="sharesheet_show_content_preview">false</bool>
    <bool name="resolver_landscape_phone">true</bool>
</resources>
Loading