라이브 방 - 커버이미지 캐시 적용
This commit is contained in:
parent
dabf8563b8
commit
e4a92e0f2b
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -30,7 +30,9 @@ import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import coil.ImageLoader
|
||||||
import coil.load
|
import coil.load
|
||||||
|
import coil.request.CachePolicy
|
||||||
import coil.transform.CircleCropTransformation
|
import coil.transform.CircleCropTransformation
|
||||||
import com.github.dhaval2404.imagepicker.ImagePicker
|
import com.github.dhaval2404.imagepicker.ImagePicker
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
@ -672,7 +674,13 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.tvTitle.text = response.title
|
binding.tvTitle.text = response.title
|
||||||
binding.ivCover.load(response.coverImageUrl)
|
binding.ivCover.load(
|
||||||
|
response.coverImageUrl,
|
||||||
|
imageLoader = ImageLoader.Builder(applicationContext)
|
||||||
|
.memoryCachePolicy(CachePolicy.ENABLED)
|
||||||
|
.diskCachePolicy(CachePolicy.ENABLED)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
binding.flDonation.visibility =
|
binding.flDonation.visibility =
|
||||||
if (response.creatorId != SharedPreferenceManager.userId) {
|
if (response.creatorId != SharedPreferenceManager.userId) {
|
||||||
|
|
Loading…
Reference in New Issue