diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt index 88ecd3abe1..e9c5cc70ab 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt @@ -290,15 +290,17 @@ class OCFileListDelegate( } } - @Suppress("MagicNumber") private fun setItemLayoutBackgroundColor(file: OCFile, gridViewHolder: ListGridImageViewHolder) { + val cornerRadius = context.resources.getDimension(R.dimen.selected_grid_container_radius) + val itemLayoutBackgroundColorId: Int = if (file.fileId == highlightedItem?.fileId || isCheckedFile(file)) { R.color.selected_item_background } else { R.color.bg_default } + gridViewHolder.itemLayout.apply { - outlineProvider = createRoundedOutline(context, 16f) + outlineProvider = createRoundedOutline(context, cornerRadius) clipToOutline = true setBackgroundColor(ContextCompat.getColor(context, itemLayoutBackgroundColorId)) } diff --git a/app/src/main/res/layout/grid_image.xml b/app/src/main/res/layout/grid_image.xml index 6c19776640..df407e5811 100644 --- a/app/src/main/res/layout/grid_image.xml +++ b/app/src/main/res/layout/grid_image.xml @@ -65,7 +65,7 @@ android:layout_marginBottom="@dimen/grid_layout_margin_bottom" android:alpha="0.9" android:background="@drawable/rounded_rect" - android:backgroundTint="@color/grid_background_color" + android:backgroundTint="@color/grid_file_features_background_color" android:orientation="horizontal" android:padding="@dimen/standard_quarter_padding" android:translationZ="4dp" @@ -88,7 +88,7 @@ android:contentDescription="@string/video_overlay_icon" android:src="@drawable/video_white" android:visibility="gone" - app:tint="@color/grid_icon_color" + app:tint="@color/grid_file_features_icon_color" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/grid_item.xml b/app/src/main/res/layout/grid_item.xml index 02ba96e58f..61551dba16 100644 --- a/app/src/main/res/layout/grid_item.xml +++ b/app/src/main/res/layout/grid_item.xml @@ -65,7 +65,7 @@ android:layout_marginBottom="@dimen/grid_layout_margin_bottom" android:alpha="0.9" android:background="@drawable/rounded_rect" - android:backgroundTint="@color/grid_background_color" + android:backgroundTint="@color/grid_file_features_background_color" android:orientation="horizontal" android:padding="@dimen/standard_quarter_padding" android:translationZ="4dp" @@ -89,7 +89,7 @@ android:contentDescription="@string/video_overlay_icon" android:src="@drawable/video_white" android:visibility="gone" - app:tint="@color/grid_icon_color" + app:tint="@color/grid_file_features_icon_color" tools:visibility="visible" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 0d3c0162e9..58fcdecf1f 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -23,8 +23,8 @@ #ffffff #B3FFFFFF #333333 - #303034 - #E9E8EB + #303034 + #E9E8EB @color/secondary_text_color #ffffff #ff888888 diff --git a/app/src/main/res/values/dims.xml b/app/src/main/res/values/dims.xml index 9caf7fae2e..8a70efd18b 100644 --- a/app/src/main/res/values/dims.xml +++ b/app/src/main/res/values/dims.xml @@ -109,6 +109,7 @@ 24dp 24dp 4dp + 4dp 130dp 120dp 80dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 92692302e4..ce27d03b87 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -808,6 +808,7 @@ No App available to handle maps Hide download Unread comments exist + This icon indicates availability of live photo Failed to load document! Create new document Create new spreadsheet