diff options
| author | 2023-08-08 20:43:32 -0700 | |
|---|---|---|
| committer | 2023-08-15 21:31:27 +0000 | |
| commit | 3864b3fb003144dad57924ae0143fa5a4df6c849 (patch) | |
| tree | e469bb9fbba2e1dbecc1f44c657e80a1d174114f /java/res/layout | |
| parent | e3360fa4f978bdea5a974189b72949a79c148d22 (diff) | |
Add loading state to the image preview UI
Preview headline loading label is based on the target intent's mime
type.
Circular indeterminated indicator gets shown for loading previews.
Bug: 292157413
Test: manual testing with ShareTest app; unit tests.
Change-Id: I55ec1036a65720fa73c18828fc7a7686de70fa57
Diffstat (limited to 'java/res/layout')
| -rw-r--r-- | java/res/layout/image_preview_loading_item.xml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/java/res/layout/image_preview_loading_item.xml b/java/res/layout/image_preview_loading_item.xml new file mode 100644 index 00000000..85020e9a --- /dev/null +++ b/java/res/layout/image_preview_loading_item.xml @@ -0,0 +1,32 @@ +<!-- + ~ 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. + --> + +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" + android:layout_width="@dimen/chooser_preview_image_width" + android:layout_height="@dimen/chooser_preview_image_height_tall"> + + <ProgressBar + android:id="@+id/loading_indicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:indeterminate="true" + android:indeterminateTint="?androidprv:attr/materialColorPrimary" + android:indeterminateTintMode="src_in" /> + +</FrameLayout> |