From f1870096ee8ad86d45887b1de5aee70a7f93dea3 Mon Sep 17 00:00:00 2001 From: Andrey Epin Date: Fri, 17 Mar 2023 02:31:04 -0700 Subject: Maintain previews aspect ratio Content preview preserves previews apspect raio (limiting between 0.4 and 2.5). ScrollableImagePreviewView now makes an initial pass over provided URIs to determine preview aspect ratio; previews that successfully loaded are progressively added to the dislay list. Previews that failed to load counted in the "+N" item at the list end. Previews are displayed in the order they are loaded (concurrently) to facilitate the fastest preview display. Preivew item height and spacings are change accroding to the latest specs. Bug: 271613784 Test: manual testing Change-Id: I430f1e7fb39c97da91bdc25914a0cb804a2b6ffa --- .../src/com/android/intentresolver/UnbundledChooserActivityTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/tests') diff --git a/java/tests/src/com/android/intentresolver/UnbundledChooserActivityTest.java b/java/tests/src/com/android/intentresolver/UnbundledChooserActivityTest.java index 596b546e..8b9aaa60 100644 --- a/java/tests/src/com/android/intentresolver/UnbundledChooserActivityTest.java +++ b/java/tests/src/com/android/intentresolver/UnbundledChooserActivityTest.java @@ -1030,7 +1030,7 @@ public class UnbundledChooserActivityTest { setupResolverControllers(resolvedComponentInfos); mActivityRule.launchActivity(Intent.createChooser(sendIntent, null)); waitForIdle(); - onView(withId(com.android.internal.R.id.content_preview_image_area)) + onView(withId(R.id.scrollable_image_preview)) .perform(RecyclerViewActions.scrollToLastPosition()) .check((view, exception) -> { if (exception != null) { -- cgit v1.2.3-59-g8ed1b