Skip to content

Commit

Permalink
- Changing spaces placeholder image.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelplazaspalacio committed Jun 22, 2023
1 parent 752576d commit bca548b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ package com.owncloud.android.presentation.spaces

import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.ImageView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.RecyclerView
Expand Down Expand Up @@ -69,13 +68,12 @@ class SpacesListAdapter(
ThumbnailsRequester.getPreviewUriForSpaceSpecial(spaceSpecialImage),
ThumbnailsRequester.getCoilImageLoader()
) {
placeholder(R.drawable.ic_spaces)
error(R.drawable.ic_spaces)
placeholder(R.drawable.ic_spaces_placeholder)
error(R.drawable.ic_spaces_placeholder)
}
} else {
spacesListItemImage.apply {
setImageResource(R.drawable.ic_spaces)
scaleType = ImageView.ScaleType.CENTER
setImageResource(R.drawable.ic_spaces_placeholder)
setBackgroundColor(ContextCompat.getColor(spacesViewHolder.itemView.context, R.color.spaces_card_background_color))
}
}
Expand Down
10 changes: 10 additions & 0 deletions owncloudApp/src/main/res/drawable/ic_spaces_placeholder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector android:height="48dp" android:viewportHeight="24"
android:viewportWidth="24" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<group
android:pivotX="12"
android:pivotY="12"
android:scaleX="0.25"
android:scaleY="0.25">
<path android:fillColor="#FF000000" android:pathData="M22,12.999L22,20a1,1 0,0 1,-1 1h-8v-8.001h9zM11,12.999L11,21L3,21a1,1 0,0 1,-1 -1v-7.001h9zM11,3v7.999L2,10.999L2,4a1,1 0,0 1,1 -1h8zM21,3a1,1 0,0 1,1 1v6.999h-9L13,3h8z"/>
</group>
</vector>

0 comments on commit bca548b

Please sign in to comment.