Merge "Load app icon in miniresolver." into tm-dev
This commit is contained in:
@@ -1471,10 +1471,14 @@ public class ResolverActivity extends Activity implements
|
|||||||
mMultiProfilePagerAdapter.getActiveListAdapter().mDisplayList.get(0);
|
mMultiProfilePagerAdapter.getActiveListAdapter().mDisplayList.get(0);
|
||||||
boolean inWorkProfile = getCurrentProfile() == PROFILE_WORK;
|
boolean inWorkProfile = getCurrentProfile() == PROFILE_WORK;
|
||||||
|
|
||||||
DisplayResolveInfo otherProfileResolveInfo =
|
ResolverListAdapter inactiveAdapter = mMultiProfilePagerAdapter.getInactiveListAdapter();
|
||||||
mMultiProfilePagerAdapter.getInactiveListAdapter().mDisplayList.get(0);
|
DisplayResolveInfo otherProfileResolveInfo = inactiveAdapter.mDisplayList.get(0);
|
||||||
|
|
||||||
|
// Load the icon asynchronously
|
||||||
ImageView icon = findViewById(R.id.icon);
|
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(
|
((TextView) findViewById(R.id.open_cross_profile)).setText(
|
||||||
getResources().getString(
|
getResources().getString(
|
||||||
@@ -1494,8 +1498,7 @@ public class ResolverActivity extends Activity implements
|
|||||||
prepareIntentForCrossProfileLaunch(intent);
|
prepareIntentForCrossProfileLaunch(intent);
|
||||||
}
|
}
|
||||||
safelyStartActivityAsUser(otherProfileResolveInfo,
|
safelyStartActivityAsUser(otherProfileResolveInfo,
|
||||||
mMultiProfilePagerAdapter.getInactiveListAdapter().mResolverListController
|
inactiveAdapter.mResolverListController.getUserHandle());
|
||||||
.getUserHandle());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,11 @@
|
|||||||
android:id="@id/contentPanel">
|
android:id="@id/contentPanel">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/title_container"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alwaysShow="true"
|
android:layout_alwaysShow="true"
|
||||||
android:elevation="@dimen/resolver_elevation"
|
android:elevation="@dimen/resolver_elevation"
|
||||||
android:paddingTop="@dimen/resolver_small_margin"
|
android:paddingTop="24dp"
|
||||||
android:paddingStart="@dimen/resolver_edge_margin"
|
android:paddingStart="@dimen/resolver_edge_margin"
|
||||||
android:paddingEnd="@dimen/resolver_edge_margin"
|
android:paddingEnd="@dimen/resolver_edge_margin"
|
||||||
android:paddingBottom="@dimen/resolver_title_padding_bottom"
|
android:paddingBottom="@dimen/resolver_title_padding_bottom"
|
||||||
@@ -47,8 +46,12 @@
|
|||||||
android:id="@+id/open_cross_profile"
|
android:id="@+id/open_cross_profile"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
android:layout_below="@id/icon"
|
android:layout_below="@id/icon"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:lineHeight="32sp"
|
||||||
|
android:gravity="center"
|
||||||
android:textColor="?android:textColorPrimary"
|
android:textColor="?android:textColorPrimary"
|
||||||
/>
|
/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -58,15 +61,11 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alwaysShow="true"
|
android:layout_alwaysShow="true"
|
||||||
|
android:paddingTop="32dp"
|
||||||
|
android:paddingBottom="@dimen/resolver_button_bar_spacing"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="?attr/colorBackground"
|
android:background="?attr/colorBackground"
|
||||||
android:layout_ignoreOffset="true">
|
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
|
<RelativeLayout
|
||||||
style="?attr/buttonBarStyle"
|
style="?attr/buttonBarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layoutDirection="locale"
|
android:layoutDirection="locale"
|
||||||
android:measureWithLargestChild="true"
|
android:measureWithLargestChild="true"
|
||||||
android:paddingTop="@dimen/resolver_button_bar_spacing"
|
|
||||||
android:paddingBottom="@dimen/resolver_button_bar_spacing"
|
android:paddingBottom="@dimen/resolver_button_bar_spacing"
|
||||||
android:paddingStart="@dimen/resolver_edge_margin"
|
android:paddingStart="@dimen/resolver_edge_margin"
|
||||||
android:paddingEnd="@dimen/resolver_small_margin"
|
android:paddingEnd="@dimen/resolver_small_margin"
|
||||||
|
|||||||
Reference in New Issue
Block a user