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

Commit 7c3a2374 authored by Matt Casey's avatar Matt Casey
Browse files

Load app icon in miniresolver.

Awkwardly used LoadIconTask from ResovlerActivity, but trying to
constrain change as much as possible given release timeline.

Also:
- Update paddings and font sizes per mocks
  (https://www.figma.com/file/sGebzybgbcKrK8nBiBSWc9/Intent-Picker-%26-Sendkit?node-id=1252%3A6083)

Bug: 175433480
Test: Visual inspection.
Change-Id: Id7606d358183733efdf69f5ef687dd71605e853e
parent a47d028e
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1471,10 +1471,14 @@ public class ResolverActivity extends Activity implements
                mMultiProfilePagerAdapter.getActiveListAdapter().mDisplayList.get(0);
        boolean inWorkProfile = getCurrentProfile() == PROFILE_WORK;

        DisplayResolveInfo otherProfileResolveInfo =
                mMultiProfilePagerAdapter.getInactiveListAdapter().mDisplayList.get(0);
        ResolverListAdapter inactiveAdapter = mMultiProfilePagerAdapter.getInactiveListAdapter();
        DisplayResolveInfo otherProfileResolveInfo = inactiveAdapter.mDisplayList.get(0);

        // Load the icon asynchronously
        ImageView icon = findViewById(R.id.icon);
        // TODO: Set icon drawable to app icon.
        ResolverListAdapter.LoadIconTask iconTask = inactiveAdapter.new LoadIconTask(
                        otherProfileResolveInfo, new ResolverListAdapter.ViewHolder(icon));
        iconTask.execute();

        ((TextView) findViewById(R.id.open_cross_profile)).setText(
                getResources().getString(
@@ -1494,8 +1498,7 @@ public class ResolverActivity extends Activity implements
                prepareIntentForCrossProfileLaunch(intent);
            }
            safelyStartActivityAsUser(otherProfileResolveInfo,
                    mMultiProfilePagerAdapter.getInactiveListAdapter().mResolverListController
                            .getUserHandle());
                    inactiveAdapter.mResolverListController.getUserHandle());
        });
    }

+7 −9
Original line number Diff line number Diff line
@@ -24,12 +24,11 @@
    android:id="@id/contentPanel">

    <RelativeLayout
        android:id="@+id/title_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alwaysShow="true"
        android:elevation="@dimen/resolver_elevation"
        android:paddingTop="@dimen/resolver_small_margin"
        android:paddingTop="24dp"
        android:paddingStart="@dimen/resolver_edge_margin"
        android:paddingEnd="@dimen/resolver_edge_margin"
        android:paddingBottom="@dimen/resolver_title_padding_bottom"
@@ -47,8 +46,12 @@
            android:id="@+id/open_cross_profile"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingTop="16dp"
            android:layout_below="@id/icon"
            android:layout_centerHorizontal="true"
            android:textSize="24sp"
            android:lineHeight="32sp"
            android:gravity="center"
            android:textColor="?android:textColorPrimary"
        />
    </RelativeLayout>
@@ -58,15 +61,11 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alwaysShow="true"
        android:paddingTop="32dp"
        android:paddingBottom="@dimen/resolver_button_bar_spacing"
        android:orientation="vertical"
        android:background="?attr/colorBackground"
        android:layout_ignoreOffset="true">
        <View
            android:id="@+id/resolver_button_bar_divider"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="?attr/colorBackground"
            android:foreground="?attr/dividerVertical" />
        <RelativeLayout
            style="?attr/buttonBarStyle"
            android:layout_width="match_parent"
@@ -77,7 +76,6 @@
            android:orientation="horizontal"
            android:layoutDirection="locale"
            android:measureWithLargestChild="true"
            android:paddingTop="@dimen/resolver_button_bar_spacing"
            android:paddingBottom="@dimen/resolver_button_bar_spacing"
            android:paddingStart="@dimen/resolver_edge_margin"
            android:paddingEnd="@dimen/resolver_small_margin"