From 9edffc5e64d5192e8bb513be29837d4d6c6602c2 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Thu, 28 Apr 2022 15:42:55 +0200 Subject: [PATCH] add progress bar for media items Signed-off-by: Marcel Hibbe --- .../talk/adapters/SharedItemsAdapter.kt | 2 +- app/src/main/res/layout/attachment_item.xml | 50 ++++++++++++++----- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/SharedItemsAdapter.kt b/app/src/main/java/com/nextcloud/talk/adapters/SharedItemsAdapter.kt index e9031f99b..07cf78af6 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/SharedItemsAdapter.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/SharedItemsAdapter.kt @@ -81,7 +81,7 @@ class SharedItemsAdapter : RecyclerView.Adapter() currentItem.path, currentItem.link, currentItem.mimeType, - null, + holder.binding.progressBar, null, it as SimpleDraweeView ) diff --git a/app/src/main/res/layout/attachment_item.xml b/app/src/main/res/layout/attachment_item.xml index 8e9adf731..fdc89bfc5 100644 --- a/app/src/main/res/layout/attachment_item.xml +++ b/app/src/main/res/layout/attachment_item.xml @@ -2,7 +2,9 @@ ~ Nextcloud Talk application ~ ~ @author Tim Krüger + ~ @author Marcel Hibbe ~ Copyright (C) 2022 Tim Krüger + ~ Copyright (C) 2022 Marcel Hibbe ~ ~ This program is free software: you can redistribute it and/or modify ~ it under the terms of the GNU General Public License as published by @@ -17,17 +19,41 @@ ~ You should have received a copy of the GNU General Public License ~ along with this program. If not, see . --> - + android:layout_height="wrap_content" + android:layout_marginStart="2dp" + android:layout_marginEnd="2dp" + android:adjustViewBounds="true" + app:layout_alignSelf="flex_start" + app:layout_flexGrow="1" + app:layout_wrapBefore="true"> + + + + + + +