diff options
| author | 2023-05-10 21:03:56 +0000 | |
|---|---|---|
| committer | 2023-05-10 21:03:56 +0000 | |
| commit | 2fbd1d66dbb4a9fe26052b161970cb79f44488bd (patch) | |
| tree | 2688bef6d8caf50df5c40e9452c0f0543262aa18 /java/res | |
| parent | 71f770aed21d7a1147c0582777a0f19200812941 (diff) | |
| parent | e2fd2b2491d9ac79c58691707b7d64657619cd2a (diff) | |
Merge "Modify thumbnails on landscape phones to UX spec" into udc-dev
Diffstat (limited to 'java/res')
| -rw-r--r-- | java/res/drawable-h480dp/content_preview_badge_bg.xml | 27 | ||||
| -rw-r--r-- | java/res/drawable/content_preview_badge_bg.xml | 7 | ||||
| -rw-r--r-- | java/res/drawable/ic_file_video.xml | 2 | ||||
| -rw-r--r-- | java/res/layout-h480dp/image_preview_image_item.xml | 53 | ||||
| -rw-r--r-- | java/res/layout/image_preview_image_item.xml | 14 |
5 files changed, 91 insertions, 12 deletions
diff --git a/java/res/drawable-h480dp/content_preview_badge_bg.xml b/java/res/drawable-h480dp/content_preview_badge_bg.xml new file mode 100644 index 00000000..cfd3a77a --- /dev/null +++ b/java/res/drawable-h480dp/content_preview_badge_bg.xml @@ -0,0 +1,27 @@ +<!-- + ~ 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. + --> + +<shape xmlns:android="http://schemas.android.com/apk/res/android" +android:shape="rectangle"> + <corners android:radius="@dimen/chooser_corner_radius_small" /> + <gradient + android:type="radial" + android:centerX="1" + android:centerY="0" + android:gradientRadius="@dimen/chooser_preview_image_height_tall" + android:startColor="#60000000" + android:endColor="#00000000" /> +</shape> diff --git a/java/res/drawable/content_preview_badge_bg.xml b/java/res/drawable/content_preview_badge_bg.xml index 7f7a1c6f..5ed53dc3 100644 --- a/java/res/drawable/content_preview_badge_bg.xml +++ b/java/res/drawable/content_preview_badge_bg.xml @@ -14,14 +14,15 @@ ~ limitations under the License. --> +<!-- Note that this is the drawable for landscape phones, the default is in drawable-480dp --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="@dimen/chooser_corner_radius_small" /> <gradient android:type="radial" - android:centerX="1" - android:centerY="0" - android:gradientRadius="@dimen/chooser_preview_image_height_tall" + android:centerX="0.5" + android:centerY="0.5" + android:gradientRadius="23dp" android:startColor="#60000000" android:endColor="#00000000" /> </shape> diff --git a/java/res/drawable/ic_file_video.xml b/java/res/drawable/ic_file_video.xml index d25b9ed0..ec6e290b 100644 --- a/java/res/drawable/ic_file_video.xml +++ b/java/res/drawable/ic_file_video.xml @@ -23,5 +23,5 @@ <path android:fillColor="@android:color/white" - android:pathData="M2 16C1.45 16 0.975 15.8083 0.575 15.425C0.191667 15.025 5.96046e-08 14.55 5.96046e-08 14V2C5.96046e-08 1.45 0.191667 0.983333 0.575 0.599998C0.975 0.199999 1.45 -9.53674e-07 2 -9.53674e-07H14C14.55 -9.53674e-07 15.0167 0.199999 15.4 0.599998C15.8 0.983333 16 1.45 16 2V6.5L20 2.5V13.5L16 9.5V14C16 14.55 15.8 15.025 15.4 15.425C15.0167 15.8083 14.55 16 14 16H2ZM2 14H14V2H2V14ZM2 14V2V14Z"/> + android:pathData="m4,20c-0.55,0 -1.02,-0.19 -1.42,-0.57c-0.39,-0.4 -0.58,-0.88 -0.58,-1.43l0,-12c0,-0.55 0.19,-1.02 0.58,-1.4c0.39,-0.4 0.87,-0.6 1.42,-0.6l12,0c0.55,0 1.02,0.2 1.4,0.6c0.4,0.38 0.6,0.85 0.6,1.4l0,4.5l4,-4l0,11l-4,-4l0,4.5c0,0.55 -0.2,1.03 -0.6,1.43c-0.38,0.38 -0.85,0.57 -1.4,0.57l-12,0zm0,-2l12,0l0,-12l-12,0l0,12zm0,0l0,-12l0,12z"/> </vector> diff --git a/java/res/layout-h480dp/image_preview_image_item.xml b/java/res/layout-h480dp/image_preview_image_item.xml new file mode 100644 index 00000000..52f88ea0 --- /dev/null +++ b/java/res/layout-h480dp/image_preview_image_item.xml @@ -0,0 +1,53 @@ +<!-- + ~ 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. + --> + +<androidx.constraintlayout.widget.ConstraintLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="wrap_content" + android:layout_height="@dimen/chooser_preview_image_height_tall"> + + <com.android.intentresolver.widget.RoundedRectImageView + android:id="@+id/image" + android:layout_width="0dp" + android:layout_height="match_parent" + app:layout_constraintDimensionRatio="W,1:1" + android:layout_alignParentTop="true" + android:adjustViewBounds="false" + android:scaleType="centerCrop" + app:radius="@dimen/chooser_corner_radius_small" /> + + <FrameLayout + android:id="@+id/badge_frame" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintStart_toStartOf="@+id/image" + app:layout_constraintEnd_toEndOf="@+id/image" + app:layout_constraintTop_toTopOf="@+id/image" + app:layout_constraintBottom_toBottomOf="@+id/image" + android:background="@drawable/content_preview_badge_bg"> + + <ImageView + android:id="@+id/badge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="center" + android:layout_marginEnd="6dp" + android:layout_marginTop="6dp" + android:tint="@android:color/white" + android:layout_gravity="top|end" /> + </FrameLayout> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/java/res/layout/image_preview_image_item.xml b/java/res/layout/image_preview_image_item.xml index 52f88ea0..3f534831 100644 --- a/java/res/layout/image_preview_image_item.xml +++ b/java/res/layout/image_preview_image_item.xml @@ -14,21 +14,21 @@ ~ limitations under the License. --> +<!-- Note that this is the layout for landscape phones, the default is in drawable-480dp --> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="wrap_content" - android:layout_height="@dimen/chooser_preview_image_height_tall"> + android:layout_width="46dp" + android:layout_height="46dp"> <com.android.intentresolver.widget.RoundedRectImageView android:id="@+id/image" - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="match_parent" - app:layout_constraintDimensionRatio="W,1:1" android:layout_alignParentTop="true" android:adjustViewBounds="false" android:scaleType="centerCrop" - app:radius="@dimen/chooser_corner_radius_small" /> + app:radius="8dp" /> <FrameLayout android:id="@+id/badge_frame" @@ -45,9 +45,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="center" - android:layout_marginEnd="6dp" - android:layout_marginTop="6dp" android:tint="@android:color/white" - android:layout_gravity="top|end" /> + android:layout_gravity="center" /> </FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout> |