Skip to content

Commit

Permalink
added place holder for all images
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLordPouya committed Jul 11, 2019
1 parent 08a9e74 commit edd9652
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class AlbumDetailsActivity : BaseActivity() {
*/
private fun setImagesTexts(album: AlbumDatabaseEntity) {
if (album.image.isNotEmpty())
Picasso.get().load(album.image).into(imgAlbum)
Picasso.get().load(album.image).placeholder(R.drawable.ic_album_placeholder).into(imgAlbum)
txtAlbumName.text = album.albumName
txtArtistName.text = album.artistName
}
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/album_details_main_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
app:layout_scrollFlags="enterAlwaysCollapsed|scroll">

<ImageView
android:src="@drawable/ic_album_placeholder"
android:id="@+id/imgAlbum"
android:layout_width="match_parent"
android:layout_height="250dp"
Expand Down Expand Up @@ -52,10 +53,10 @@
android:layout_height="68dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
app:lottie_fileName="bookmark.json"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/txtAlbumName"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:lottie_fileName="bookmark.json" />

<TextView
android:id="@+id/txtArtistName"
Expand Down

0 comments on commit edd9652

Please sign in to comment.