Converted contributor image urls to assets

This commit is contained in:
Prathamesh More 2022-06-24 11:14:22 +05:30
parent 7b15930093
commit 01c5c10def
8 changed files with 9 additions and 8 deletions

View file

@ -3,36 +3,36 @@
"name": "Hemanth Savarala", "name": "Hemanth Savarala",
"summary": "Lead Developer & Designer", "summary": "Lead Developer & Designer",
"link": "https://github.com/h4h13", "link": "https://github.com/h4h13",
"image": "https://i.imgur.com/AoVs9oj.jpg" "image": "hemanth.jpg"
}, },
{ {
"name": "Prathamesh More", "name": "Prathamesh More",
"summary": "Developer", "summary": "Developer",
"link": "https://prathameshmm02.github.io", "link": "https://prathameshmm02.github.io",
"image": "https://i.imgur.com/ZHoOrHx.jpg" "image": "pratham.jpg"
}, },
{ {
"name": "Daksh P. Jain", "name": "Daksh P. Jain",
"summary": "Website & GitHub Maintainer", "summary": "Website & GitHub Maintainer",
"link": "https://daksh.eu.org", "link": "https://daksh.eu.org",
"image": "https://i.imgur.com/fnYpg65.jpg" "image": "daksh.png"
}, },
{ {
"name": "Milind Goel", "name": "Milind Goel",
"summary": "Support Representative & Moderator", "summary": "Support Representative & Moderator",
"link": "https://milindgoel15.github.io", "link": "https://milindgoel15.github.io",
"image": "https://i.imgur.com/hWL8t48.jpg" "image": "milind.png"
}, },
{ {
"name": "Lennart Glamann", "name": "Lennart Glamann",
"summary": "Play Store Banner & Images", "summary": "Play Store Banner & Images",
"link": "https://telegram.me/FlixbusLennart", "link": "https://telegram.me/FlixbusLennart",
"image": "https://i.imgur.com/Q5Nsx1R.jpg" "image": "lenny.jpg"
}, },
{ {
"name": "Haythem Gataa", "name": "Haythem Gataa",
"summary": "App Logo & Banners", "summary": "App Logo & Banners",
"link": "https://dribbble.com/haythemgataa", "link": "https://dribbble.com/haythemgataa",
"image": "https://i.imgur.com/g5RuIZq.jpg" "image": "haythem.jpg"
} }
] ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -18,6 +18,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.core.net.toUri
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.openUrl import code.name.monkey.retromusic.extensions.openUrl
@ -26,7 +27,7 @@ import code.name.monkey.retromusic.views.RetroShapeableImageView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
class ContributorAdapter( class ContributorAdapter(
private var contributors: List<Contributor> private var contributors: List<Contributor>,
) : RecyclerView.Adapter<ContributorAdapter.ViewHolder>() { ) : RecyclerView.Adapter<ContributorAdapter.ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
@ -86,7 +87,7 @@ class ContributorAdapter(
title.text = contributor.name title.text = contributor.name
text.text = contributor.summary text.text = contributor.summary
Glide.with(image.context) Glide.with(image.context)
.load(contributor.image) .load("file:///android_asset/images/${contributor.image}".toUri())
.error(R.drawable.ic_account) .error(R.drawable.ic_account)
.placeholder(R.drawable.ic_account) .placeholder(R.drawable.ic_account)
.dontAnimate() .dontAnimate()