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

Commit 5612bb29 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
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
parents 22bae3bd 6e5c9074
Loading
Loading
Loading
Loading
+10 −5
Original line number Original line Diff line number Diff line
@@ -387,9 +387,6 @@ public abstract class AbstractMultiProfilePagerAdapter extends PagerAdapter {
        resetViewVisibilitiesForWorkProfileEmptyState(emptyStateView);
        resetViewVisibilitiesForWorkProfileEmptyState(emptyStateView);
        emptyStateView.setVisibility(View.VISIBLE);
        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);
        TextView title = emptyStateView.findViewById(R.id.resolver_empty_state_title);
        title.setText(titleRes);
        title.setText(titleRes);


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


        ImageView icon = emptyStateView.findViewById(R.id.resolver_empty_state_icon);
        Button button = emptyStateView.findViewById(R.id.resolver_empty_state_button);
        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.setVisibility(buttonOnClick != null ? View.VISIBLE : View.GONE);
            button.setOnClickListener(buttonOnClick);
            button.setOnClickListener(buttonOnClick);
        } else {
            icon.setVisibility(View.GONE);
            button.setVisibility(View.GONE);
        }


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


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


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