File tree 1 file changed +6
-0
lines changed
app/src/main/java/com/bks/mvisample/ui/main
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import androidx.recyclerview.widget.DiffUtil
9
9
import com.bks.mvisample.R
10
10
import com.bks.mvisample.models.BlogPost
11
11
import com.bumptech.glide.Glide
12
+ import com.bumptech.glide.request.RequestOptions
12
13
import kotlinx.android.synthetic.main.fragment_main.view.*
13
14
import kotlinx.android.synthetic.main.layout_blog_list_item.view.*
14
15
@@ -69,7 +70,12 @@ class BlogPostsAdapter(private val interaction: Interaction? = null) :
69
70
}
70
71
71
72
itemView.blog_title.text = item.title
73
+
74
+ // need to shrink images b/c they are very high resolution
75
+ val requestOptions = RequestOptions
76
+ .overrideOf(1920 , 1080 )
72
77
Glide .with (itemView.context)
78
+ .applyDefaultRequestOptions(requestOptions)
73
79
.load(item.image)
74
80
.into(itemView.blog_image)
75
81
}
You can’t perform that action at this time.
0 commit comments