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

Commit fe0fc253 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Hide empty state icon and button in landscape mode." into rvc-dev am:...

Merge "Hide empty state icon and button in landscape mode." into rvc-dev am: 5e8e9e5f am: b4f696f6

Change-Id: Iae43f9d302b7ea26b0f512c24026ea7e6d8672f2
parents 94741b36 b4f696f6
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