summaryrefslogtreecommitdiff
path: root/java/res/layout
diff options
context:
space:
mode:
author Andrey Epin <ayepin@google.com> 2023-01-31 14:09:01 -0800
committer Andrey Epin <ayepin@google.com> 2023-02-03 14:34:42 -0800
commit150f8b476d622b592ce9192aed2e106076f2f67e (patch)
tree463a6c4e3b34c0af1c7d61f1cb40a12e0f452da1 /java/res/layout
parent3a9ca304f41a13c42f13f8f26eb9a714de24a267 (diff)
Enable scrollable image preview view
Enable scrollable image preview view under a feature flag. Bug: 262280076 Test: manual test Test: atest IntentResolverUnitTests with the both flag values Change-Id: I86050f1e9193412d15fb35a162a0405cf8287401
Diffstat (limited to 'java/res/layout')
-rw-r--r--java/res/layout/chooser_grid_preview_image.xml6
-rw-r--r--java/res/layout/chooser_image_preview_view.xml24
-rw-r--r--java/res/layout/chooser_image_preview_view_internals.xml (renamed from java/res/layout/image_preview_view.xml)0
-rw-r--r--java/res/layout/scrollable_image_preview_view.xml24
4 files changed, 51 insertions, 3 deletions
diff --git a/java/res/layout/chooser_grid_preview_image.xml b/java/res/layout/chooser_grid_preview_image.xml
index d43a26de..6af0af11 100644
--- a/java/res/layout/chooser_grid_preview_image.xml
+++ b/java/res/layout/chooser_grid_preview_image.xml
@@ -16,7 +16,6 @@
* limitations under the License.
*/
-->
-<!-- Layout Option: Supporting up to 3 images for preview -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
@@ -32,8 +31,9 @@
android:gravity="center_horizontal"
android:layout_marginBottom="@dimen/chooser_view_spacing">
- <com.android.intentresolver.widget.ChooserImagePreviewView
- android:id="@androidprv:id/content_preview_image_area"
+ <ViewStub
+ android:id="@+id/image_preview_stub"
+ android:inflatedId="@androidprv:id/content_preview_image_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/chooser_edge_margin_normal"
diff --git a/java/res/layout/chooser_image_preview_view.xml b/java/res/layout/chooser_image_preview_view.xml
new file mode 100644
index 00000000..a111b923
--- /dev/null
+++ b/java/res/layout/chooser_image_preview_view.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<com.android.intentresolver.widget.ChooserImagePreviewView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:paddingBottom="@dimen/chooser_view_spacing"
+ android:background="?android:attr/colorBackground" />
diff --git a/java/res/layout/image_preview_view.xml b/java/res/layout/chooser_image_preview_view_internals.xml
index 8730fc30..8730fc30 100644
--- a/java/res/layout/image_preview_view.xml
+++ b/java/res/layout/chooser_image_preview_view_internals.xml
diff --git a/java/res/layout/scrollable_image_preview_view.xml b/java/res/layout/scrollable_image_preview_view.xml
new file mode 100644
index 00000000..ff2f273f
--- /dev/null
+++ b/java/res/layout/scrollable_image_preview_view.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<com.android.intentresolver.widget.ScrollableImagePreviewView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:paddingBottom="@dimen/chooser_view_spacing"
+ android:background="?android:attr/colorBackground" />