mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-27 06:30:29 +00:00
Touch: replace Picasso with Glide
This commit is contained in:
parent
b07bde4604
commit
c2e5019600
4 changed files with 14 additions and 25 deletions
|
@ -124,7 +124,6 @@ dependencies {
|
|||
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0'
|
||||
|
||||
implementation 'com.github.bumptech.glide:glide:4.6.1'
|
||||
implementation 'com.squareup.picasso:picasso:2.5.2'
|
||||
|
||||
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.1'
|
||||
implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
|
||||
|
|
|
@ -5,7 +5,8 @@ import android.support.v7.widget.RecyclerView
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.squareup.picasso.Picasso
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event
|
||||
import de.nicidienase.chaosflix.common.userdata.entities.download.OfflineEvent
|
||||
|
@ -20,14 +21,11 @@ class OfflineEventAdapter(var items: List<Pair<OfflineEvent, Event>>, val viewMo
|
|||
val item = items[position]
|
||||
|
||||
holder.binding.event = item.second
|
||||
Picasso.with(holder.thumbnail.context)
|
||||
Glide.with(holder.thumbnail)
|
||||
.load(item.second.thumbUrl)
|
||||
.noFade()
|
||||
.fit()
|
||||
.centerInside()
|
||||
.apply(RequestOptions().fitCenter())
|
||||
.into(holder.thumbnail)
|
||||
|
||||
|
||||
with(holder.binding){
|
||||
downloadStatus = viewModel.offlineItemManager.downloadStatus[item.first.downloadReference]
|
||||
buttonDelete.setOnClickListener {
|
||||
|
|
|
@ -5,7 +5,8 @@ import android.support.v7.widget.RecyclerView
|
|||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import com.squareup.picasso.Picasso
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference
|
||||
import de.nicidienase.chaosflix.touch.databinding.ItemLiveeventCardviewBinding
|
||||
|
||||
|
@ -50,11 +51,9 @@ class LivestreamAdapter(val listener: LivestreamListFragment.InteractionListener
|
|||
val item = items[position]
|
||||
|
||||
holder.binding.item = item
|
||||
Picasso.with(holder.binding.root.context)
|
||||
Glide.with(holder.binding.root)
|
||||
.load(item.room.thumb)
|
||||
.noFade()
|
||||
.fit()
|
||||
.centerInside()
|
||||
.apply(RequestOptions().fitCenter())
|
||||
.into(holder.binding.imageView)
|
||||
|
||||
holder.binding.root.setOnClickListener { listener.onStreamSelected(item) }
|
||||
|
|
|
@ -22,8 +22,8 @@ import android.view.MenuInflater
|
|||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.squareup.picasso.Callback
|
||||
import com.squareup.picasso.Picasso
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import de.nicidienase.chaosflix.common.ChaosflixUtil
|
||||
import de.nicidienase.chaosflix.common.OfflineItemManager
|
||||
|
@ -111,18 +111,11 @@ class EventDetailsFragment : Fragment() {
|
|||
Log.d(TAG,"Loading Event ${event.title}, ${event.guid}")
|
||||
updateBookmark(event.guid)
|
||||
binding.thumbImage.transitionName = getString(R.string.thumbnail) + event.guid
|
||||
Picasso.with(context)
|
||||
.load(event.thumbUrl)
|
||||
.noFade()
|
||||
.into(binding.thumbImage, object : Callback {
|
||||
override fun onSuccess() {
|
||||
// startPostponedEnterTransition()
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
// startPostponedEnterTransition()
|
||||
}
|
||||
})
|
||||
Glide.with(binding.thumbImage)
|
||||
.load(event.thumbUrl)
|
||||
.apply(RequestOptions().fitCenter())
|
||||
.into(binding.thumbImage)
|
||||
|
||||
})
|
||||
viewModel.getRelatedEvents(event).observe(this, Observer {
|
||||
|
|
Loading…
Reference in a new issue