parent
a88f8c3316
commit
a2cbeb87d5
|
@ -128,6 +128,7 @@
|
||||||
<activity android:name=".audio_content.curation.AudioContentCurationActivity" />
|
<activity android:name=".audio_content.curation.AudioContentCurationActivity" />
|
||||||
<activity android:name=".audio_content.all.AudioContentNewAllActivity" />
|
<activity android:name=".audio_content.all.AudioContentNewAllActivity" />
|
||||||
<activity android:name=".audio_content.all.AudioContentRankingAllActivity" />
|
<activity android:name=".audio_content.all.AudioContentRankingAllActivity" />
|
||||||
|
<activity android:name=".audio_content.all.by_theme.AudioContentAllByThemeActivity" />
|
||||||
<activity android:name=".live.roulette.config.RouletteConfigActivity" />
|
<activity android:name=".live.roulette.config.RouletteConfigActivity" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
|
|
@ -2,6 +2,7 @@ package kr.co.vividnext.sodalive.audio_content
|
||||||
|
|
||||||
import io.reactivex.rxjava3.core.Single
|
import io.reactivex.rxjava3.core.Single
|
||||||
import kr.co.vividnext.sodalive.audio_content.all.GetNewContentAllResponse
|
import kr.co.vividnext.sodalive.audio_content.all.GetNewContentAllResponse
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.all.by_theme.GetContentByThemeResponse
|
||||||
import kr.co.vividnext.sodalive.audio_content.comment.GetAudioContentCommentListResponse
|
import kr.co.vividnext.sodalive.audio_content.comment.GetAudioContentCommentListResponse
|
||||||
import kr.co.vividnext.sodalive.audio_content.comment.ModifyCommentRequest
|
import kr.co.vividnext.sodalive.audio_content.comment.ModifyCommentRequest
|
||||||
import kr.co.vividnext.sodalive.audio_content.comment.RegisterAudioContentCommentRequest
|
import kr.co.vividnext.sodalive.audio_content.comment.RegisterAudioContentCommentRequest
|
||||||
|
@ -49,6 +50,15 @@ interface AudioContentApi {
|
||||||
@Header("Authorization") authHeader: String
|
@Header("Authorization") authHeader: String
|
||||||
): Single<ApiResponse<List<GetAudioContentThemeResponse>>>
|
): Single<ApiResponse<List<GetAudioContentThemeResponse>>>
|
||||||
|
|
||||||
|
@GET("/audio-content/theme/{id}/content")
|
||||||
|
fun getAudioContentByTheme(
|
||||||
|
@Path("id") id: Long,
|
||||||
|
@Query("page") page: Int,
|
||||||
|
@Query("size") size: Int,
|
||||||
|
@Query("sort-type") sort: AudioContentViewModel.Sort,
|
||||||
|
@Header("Authorization") authHeader: String
|
||||||
|
): Single<ApiResponse<GetContentByThemeResponse>>
|
||||||
|
|
||||||
@POST("/audio-content")
|
@POST("/audio-content")
|
||||||
@Multipart
|
@Multipart
|
||||||
fun uploadAudioContent(
|
fun uploadAudioContent(
|
||||||
|
|
|
@ -206,4 +206,18 @@ class AudioContentRepository(
|
||||||
creatorId: Long,
|
creatorId: Long,
|
||||||
token: String
|
token: String
|
||||||
) = categoryApi.getCategoryList(creatorId, authHeader = token)
|
) = categoryApi.getCategoryList(creatorId, authHeader = token)
|
||||||
|
|
||||||
|
fun getAudioContentByTheme(
|
||||||
|
themeId: Long,
|
||||||
|
page: Int,
|
||||||
|
size: Int,
|
||||||
|
sort: AudioContentViewModel.Sort = AudioContentViewModel.Sort.NEWEST,
|
||||||
|
token: String
|
||||||
|
) = api.getAudioContentByTheme(
|
||||||
|
id = themeId,
|
||||||
|
page = page - 1,
|
||||||
|
size = size,
|
||||||
|
sort = sort,
|
||||||
|
authHeader = token
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,191 @@
|
||||||
|
package kr.co.vividnext.sodalive.audio_content.all.by_theme
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.graphics.Rect
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.TextView
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import kr.co.vividnext.sodalive.R
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.AudioContentViewModel
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.all.AudioContentNewAllAdapter
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.detail.AudioContentDetailActivity
|
||||||
|
import kr.co.vividnext.sodalive.base.BaseActivity
|
||||||
|
import kr.co.vividnext.sodalive.common.Constants
|
||||||
|
import kr.co.vividnext.sodalive.common.LoadingDialog
|
||||||
|
import kr.co.vividnext.sodalive.databinding.ActivityAudioContentAllByThemeBinding
|
||||||
|
import kr.co.vividnext.sodalive.explorer.profile.UserProfileActivity
|
||||||
|
import kr.co.vividnext.sodalive.extensions.dpToPx
|
||||||
|
import org.koin.android.ext.android.inject
|
||||||
|
|
||||||
|
class AudioContentAllByThemeActivity : BaseActivity<ActivityAudioContentAllByThemeBinding>(
|
||||||
|
ActivityAudioContentAllByThemeBinding::inflate
|
||||||
|
) {
|
||||||
|
private val viewModel: AudioContentAllByThemeViewModel by inject()
|
||||||
|
|
||||||
|
private lateinit var loadingDialog: LoadingDialog
|
||||||
|
private lateinit var adapter: AudioContentNewAllAdapter
|
||||||
|
|
||||||
|
private var themeId: Long = 0
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
themeId = intent.getLongExtra(Constants.EXTRA_THEME_ID, 0)
|
||||||
|
|
||||||
|
if (themeId <= 0) {
|
||||||
|
Toast.makeText(
|
||||||
|
applicationContext,
|
||||||
|
"잘못된 요청입니다.\n다시 시도해 주세요.",
|
||||||
|
Toast.LENGTH_LONG
|
||||||
|
).show()
|
||||||
|
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
bindData()
|
||||||
|
viewModel.getContentList(themeId = themeId)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setupView() {
|
||||||
|
loadingDialog = LoadingDialog(this, layoutInflater)
|
||||||
|
binding.toolbar.tvBack.setOnClickListener { finish() }
|
||||||
|
|
||||||
|
adapter = AudioContentNewAllAdapter(
|
||||||
|
itemWidth = (screenWidth - 54f.dpToPx().toInt()) / 3,
|
||||||
|
onClickItem = {
|
||||||
|
startActivity(
|
||||||
|
Intent(this, AudioContentDetailActivity::class.java).apply {
|
||||||
|
putExtra(Constants.EXTRA_AUDIO_CONTENT_ID, it)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
onClickCreator = {
|
||||||
|
startActivity(
|
||||||
|
Intent(this, UserProfileActivity::class.java).apply {
|
||||||
|
putExtra(Constants.EXTRA_USER_ID, it)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.rvContentAll.layoutManager = GridLayoutManager(this, 3)
|
||||||
|
|
||||||
|
binding.rvContentAll.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||||
|
override fun getItemOffsets(
|
||||||
|
outRect: Rect,
|
||||||
|
view: View,
|
||||||
|
parent: RecyclerView,
|
||||||
|
state: RecyclerView.State
|
||||||
|
) {
|
||||||
|
super.getItemOffsets(outRect, view, parent, state)
|
||||||
|
|
||||||
|
outRect.top = 6.7f.dpToPx().toInt()
|
||||||
|
outRect.bottom = 6.7f.dpToPx().toInt()
|
||||||
|
outRect.left = 6.7f.dpToPx().toInt()
|
||||||
|
outRect.right = 6.7f.dpToPx().toInt()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
binding.rvContentAll.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
|
|
||||||
|
val lastVisibleItemPosition = (recyclerView.layoutManager as LinearLayoutManager?)!!
|
||||||
|
.findLastCompletelyVisibleItemPosition()
|
||||||
|
val itemTotalCount = recyclerView.adapter!!.itemCount - 1
|
||||||
|
|
||||||
|
// 스크롤이 끝에 도달했는지 확인
|
||||||
|
if (!recyclerView.canScrollVertically(1) &&
|
||||||
|
lastVisibleItemPosition == itemTotalCount
|
||||||
|
) {
|
||||||
|
viewModel.getContentList(themeId = themeId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
binding.rvContentAll.adapter = adapter
|
||||||
|
|
||||||
|
binding.tvSortNewest.setOnClickListener {
|
||||||
|
viewModel.changeSort(AudioContentViewModel.Sort.NEWEST)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvSortPriceLow.setOnClickListener {
|
||||||
|
viewModel.changeSort(AudioContentViewModel.Sort.PRICE_LOW)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvSortPriceHigh.setOnClickListener {
|
||||||
|
viewModel.changeSort(AudioContentViewModel.Sort.PRICE_HIGH)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun bindData() {
|
||||||
|
viewModel.toastLiveData.observe(this) {
|
||||||
|
it?.let { Toast.makeText(applicationContext, it, Toast.LENGTH_LONG).show() }
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.isLoading.observe(this) {
|
||||||
|
if (it) {
|
||||||
|
loadingDialog.show(screenWidth, "")
|
||||||
|
} else {
|
||||||
|
loadingDialog.dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.contentListLiveData.observe(this) {
|
||||||
|
if (viewModel.page - 1 == 1) {
|
||||||
|
adapter.clear()
|
||||||
|
binding.rvContentAll.scrollToPosition(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvTotalCount.text = "${it.totalCount}"
|
||||||
|
binding.toolbar.tvBack.text = it.theme
|
||||||
|
adapter.addItems(it.items)
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.sort.observe(this) {
|
||||||
|
deselectSort()
|
||||||
|
selectSort(
|
||||||
|
when (it) {
|
||||||
|
AudioContentViewModel.Sort.PRICE_HIGH -> {
|
||||||
|
binding.tvSortPriceHigh
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioContentViewModel.Sort.PRICE_LOW -> {
|
||||||
|
binding.tvSortPriceLow
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
binding.tvSortNewest
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
viewModel.getContentList(themeId = themeId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun deselectSort() {
|
||||||
|
val color = ContextCompat.getColor(
|
||||||
|
applicationContext,
|
||||||
|
R.color.color_88e2e2e2
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.tvSortNewest.setTextColor(color)
|
||||||
|
binding.tvSortPriceLow.setTextColor(color)
|
||||||
|
binding.tvSortPriceHigh.setTextColor(color)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun selectSort(view: TextView) {
|
||||||
|
view.setTextColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
applicationContext,
|
||||||
|
R.color.color_e2e2e2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
package kr.co.vividnext.sodalive.audio_content.all.by_theme
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.orhanobut.logger.Logger
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.AudioContentRepository
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.AudioContentViewModel
|
||||||
|
import kr.co.vividnext.sodalive.base.BaseViewModel
|
||||||
|
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||||
|
|
||||||
|
class AudioContentAllByThemeViewModel(
|
||||||
|
private val repository: AudioContentRepository
|
||||||
|
) : BaseViewModel() {
|
||||||
|
private val _toastLiveData = MutableLiveData<String?>()
|
||||||
|
val toastLiveData: LiveData<String?>
|
||||||
|
get() = _toastLiveData
|
||||||
|
|
||||||
|
private var _isLoading = MutableLiveData(false)
|
||||||
|
val isLoading: LiveData<Boolean>
|
||||||
|
get() = _isLoading
|
||||||
|
|
||||||
|
private var _contentListLiveData = MutableLiveData<GetContentByThemeResponse>()
|
||||||
|
val contentListLiveData: LiveData<GetContentByThemeResponse>
|
||||||
|
get() = _contentListLiveData
|
||||||
|
|
||||||
|
private val _sort = MutableLiveData(AudioContentViewModel.Sort.NEWEST)
|
||||||
|
val sort: LiveData<AudioContentViewModel.Sort>
|
||||||
|
get() = _sort
|
||||||
|
|
||||||
|
private var isLast = false
|
||||||
|
var page = 1
|
||||||
|
private val size = 15
|
||||||
|
|
||||||
|
fun getContentList(themeId: Long) {
|
||||||
|
if (!_isLoading.value!! && !isLast) {
|
||||||
|
_isLoading.value = true
|
||||||
|
|
||||||
|
compositeDisposable.add(
|
||||||
|
repository.getAudioContentByTheme(
|
||||||
|
themeId = themeId,
|
||||||
|
page = page,
|
||||||
|
size = size,
|
||||||
|
sort = _sort.value!!,
|
||||||
|
token = "Bearer ${SharedPreferenceManager.token}"
|
||||||
|
)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(
|
||||||
|
{
|
||||||
|
if (it.success && it.data != null) {
|
||||||
|
if (it.data.items.isNotEmpty()) {
|
||||||
|
page += 1
|
||||||
|
_contentListLiveData.postValue(it.data!!)
|
||||||
|
} else {
|
||||||
|
isLast = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (it.message != null) {
|
||||||
|
_toastLiveData.postValue(it.message)
|
||||||
|
} else {
|
||||||
|
_toastLiveData.postValue(
|
||||||
|
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_isLoading.value = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_isLoading.value = false
|
||||||
|
it.message?.let { message -> Logger.e(message) }
|
||||||
|
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun changeSort(sort: AudioContentViewModel.Sort) {
|
||||||
|
page = 1
|
||||||
|
isLast = false
|
||||||
|
_sort.postValue(sort)
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package kr.co.vividnext.sodalive.audio_content.all.by_theme
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.main.GetAudioContentMainItem
|
||||||
|
|
||||||
|
data class GetContentByThemeResponse(
|
||||||
|
@SerializedName("theme") val theme: String,
|
||||||
|
@SerializedName("totalCount") val totalCount: Int,
|
||||||
|
@SerializedName("items") val items: List<GetAudioContentMainItem>
|
||||||
|
)
|
|
@ -20,6 +20,7 @@ import com.zhpan.indicator.enums.IndicatorStyle
|
||||||
import kr.co.vividnext.sodalive.R
|
import kr.co.vividnext.sodalive.R
|
||||||
import kr.co.vividnext.sodalive.audio_content.all.AudioContentNewAllActivity
|
import kr.co.vividnext.sodalive.audio_content.all.AudioContentNewAllActivity
|
||||||
import kr.co.vividnext.sodalive.audio_content.all.AudioContentRankingAllActivity
|
import kr.co.vividnext.sodalive.audio_content.all.AudioContentRankingAllActivity
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.all.by_theme.AudioContentAllByThemeActivity
|
||||||
import kr.co.vividnext.sodalive.audio_content.curation.AudioContentCurationActivity
|
import kr.co.vividnext.sodalive.audio_content.curation.AudioContentCurationActivity
|
||||||
import kr.co.vividnext.sodalive.audio_content.detail.AudioContentDetailActivity
|
import kr.co.vividnext.sodalive.audio_content.detail.AudioContentDetailActivity
|
||||||
import kr.co.vividnext.sodalive.audio_content.main.banner.AudioContentMainBannerAdapter
|
import kr.co.vividnext.sodalive.audio_content.main.banner.AudioContentMainBannerAdapter
|
||||||
|
@ -116,6 +117,22 @@ class AudioContentMainFragment : BaseFragment<FragmentAudioContentMainBinding>(
|
||||||
contentRankingViewModel.getContentRankingSortType()
|
contentRankingViewModel.getContentRankingSortType()
|
||||||
newContentCreatorViewModel.getNewContentUploadCreatorList()
|
newContentCreatorViewModel.getNewContentUploadCreatorList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.llShortPlay.setOnClickListener {
|
||||||
|
startActivity(
|
||||||
|
Intent(requireContext(), AudioContentAllByThemeActivity::class.java).apply {
|
||||||
|
putExtra(Constants.EXTRA_THEME_ID, 11L)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.llReviewLive.setOnClickListener {
|
||||||
|
startActivity(
|
||||||
|
Intent(requireContext(), AudioContentAllByThemeActivity::class.java).apply {
|
||||||
|
putExtra(Constants.EXTRA_THEME_ID, 7L)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupNewContentCreator() {
|
private fun setupNewContentCreator() {
|
||||||
|
|
|
@ -23,6 +23,7 @@ object Constants {
|
||||||
const val EXTRA_NOTICE = "extra_notice"
|
const val EXTRA_NOTICE = "extra_notice"
|
||||||
const val EXTRA_ROOM_ID = "extra_room_id"
|
const val EXTRA_ROOM_ID = "extra_room_id"
|
||||||
const val EXTRA_USER_ID = "extra_user_id"
|
const val EXTRA_USER_ID = "extra_user_id"
|
||||||
|
const val EXTRA_THEME_ID = "extra_theme_id"
|
||||||
const val EXTRA_NICKNAME = "extra_nickname"
|
const val EXTRA_NICKNAME = "extra_nickname"
|
||||||
const val EXTRA_MESSAGE_ID = "extra_message_id"
|
const val EXTRA_MESSAGE_ID = "extra_message_id"
|
||||||
const val EXTRA_ROOM_DETAIL = "extra_room_detail"
|
const val EXTRA_ROOM_DETAIL = "extra_room_detail"
|
||||||
|
|
|
@ -9,6 +9,7 @@ import kr.co.vividnext.sodalive.audio_content.AudioContentViewModel
|
||||||
import kr.co.vividnext.sodalive.audio_content.PlaybackTrackingRepository
|
import kr.co.vividnext.sodalive.audio_content.PlaybackTrackingRepository
|
||||||
import kr.co.vividnext.sodalive.audio_content.all.AudioContentNewAllViewModel
|
import kr.co.vividnext.sodalive.audio_content.all.AudioContentNewAllViewModel
|
||||||
import kr.co.vividnext.sodalive.audio_content.all.AudioContentRankingAllViewModel
|
import kr.co.vividnext.sodalive.audio_content.all.AudioContentRankingAllViewModel
|
||||||
|
import kr.co.vividnext.sodalive.audio_content.all.by_theme.AudioContentAllByThemeViewModel
|
||||||
import kr.co.vividnext.sodalive.audio_content.category.CategoryApi
|
import kr.co.vividnext.sodalive.audio_content.category.CategoryApi
|
||||||
import kr.co.vividnext.sodalive.audio_content.comment.AudioContentCommentListViewModel
|
import kr.co.vividnext.sodalive.audio_content.comment.AudioContentCommentListViewModel
|
||||||
import kr.co.vividnext.sodalive.audio_content.comment.AudioContentCommentReplyViewModel
|
import kr.co.vividnext.sodalive.audio_content.comment.AudioContentCommentReplyViewModel
|
||||||
|
@ -220,6 +221,7 @@ class AppDI(private val context: Context, isDebugMode: Boolean) {
|
||||||
viewModel { UserProfileDonationAllViewModel(get(), get()) }
|
viewModel { UserProfileDonationAllViewModel(get(), get()) }
|
||||||
viewModel { AudioContentCurationViewModel(get()) }
|
viewModel { AudioContentCurationViewModel(get()) }
|
||||||
viewModel { AudioContentNewAllViewModel(get()) }
|
viewModel { AudioContentNewAllViewModel(get()) }
|
||||||
|
viewModel { AudioContentAllByThemeViewModel(get()) }
|
||||||
viewModel { AudioContentRankingAllViewModel(get()) }
|
viewModel { AudioContentRankingAllViewModel(get()) }
|
||||||
viewModel { RouletteSettingsViewModel(get()) }
|
viewModel { RouletteSettingsViewModel(get()) }
|
||||||
viewModel { CreatorCommunityAllViewModel(get(), get()) }
|
viewModel { CreatorCommunityAllViewModel(get(), get()) }
|
||||||
|
|
|
@ -192,7 +192,6 @@ class LiveRoomViewModel(
|
||||||
{
|
{
|
||||||
if (it.success && it.data != null) {
|
if (it.success && it.data != null) {
|
||||||
roomInfoResponse = it.data
|
roomInfoResponse = it.data
|
||||||
Logger.e("data: ${it.data}")
|
|
||||||
_roomInfoLiveData.postValue(roomInfoResponse)
|
_roomInfoLiveData.postValue(roomInfoResponse)
|
||||||
|
|
||||||
if (_coverImageUrlLiveData.value!! != roomInfoResponse.coverImageUrl) {
|
if (_coverImageUrlLiveData.value!! != roomInfoResponse.coverImageUrl) {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/color_ecf9ff" />
|
||||||
|
<corners android:radius="2.6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/color_ecf9ff" />
|
||||||
|
</shape>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/color_ffecf7" />
|
||||||
|
<corners android:radius="2.6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/color_ffecf7" />
|
||||||
|
</shape>
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
layout="@layout/detail_toolbar" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13.3dp"
|
||||||
|
android:background="@color/color_161616"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="13.3dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sort_newest"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="최신순"
|
||||||
|
android:textColor="@color/color_88e2e2e2"
|
||||||
|
android:textSize="13.3sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sort_price_high"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="13.3dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="높은 가격순"
|
||||||
|
android:textColor="@color/color_88e2e2e2"
|
||||||
|
android:textSize="13.3sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sort_price_low"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="낮은 가격순"
|
||||||
|
android:textColor="@color/color_88e2e2e2"
|
||||||
|
android:textSize="13.3sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="13.3dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="전체"
|
||||||
|
android:textColor="@color/color_e2e2e2"
|
||||||
|
android:textSize="13.3sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_total_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="@color/color_ff5c49"
|
||||||
|
android:textSize="13.3sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="개"
|
||||||
|
android:textColor="@color/color_e2e2e2"
|
||||||
|
android:textSize="13.3sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_content_all"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false" />
|
||||||
|
</LinearLayout>
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
@ -51,7 +53,78 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="6.7dp"
|
android:layout_marginTop="6.7dp"
|
||||||
android:layout_marginBottom="40dp" />
|
android:layout_marginBottom="26.7dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:paddingHorizontal="13.3dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_short_play"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/bg_round_corner_2_6_ffecf7"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawablePadding="2.7dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_bold"
|
||||||
|
android:text="숏플"
|
||||||
|
android:textColor="@color/color_dd158d"
|
||||||
|
android:textSize="14.7sp"
|
||||||
|
app:drawableStartCompat="@drawable/ic_short_play" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2.7dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_light"
|
||||||
|
android:text="짧지만 꼴릿한 이야기"
|
||||||
|
android:textColor="@color/color_dd158d"
|
||||||
|
android:textSize="10sp"
|
||||||
|
tools:ignore="SmallSp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_review_live"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/bg_round_corner_2_6_ecf9ff"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawablePadding="2.7dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_bold"
|
||||||
|
android:text="라이브 다시듣기"
|
||||||
|
android:textColor="@color/color_0057ff"
|
||||||
|
android:textSize="14.7sp"
|
||||||
|
app:drawableStartCompat="@drawable/ic_thumb_play_blue" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2.7dp"
|
||||||
|
android:fontFamily="@font/gmarket_sans_light"
|
||||||
|
android:text="놓쳤던 라이브 다시 듣기"
|
||||||
|
android:textColor="@color/color_0057ff"
|
||||||
|
android:textSize="10sp"
|
||||||
|
tools:ignore="SmallSp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_my_stash"
|
android:id="@+id/ll_my_stash"
|
||||||
|
|
|
@ -109,4 +109,8 @@
|
||||||
<color name="color_553bb9f1">#553bb9f1</color>
|
<color name="color_553bb9f1">#553bb9f1</color>
|
||||||
<color name="color_ea3a25">#EA3A25</color>
|
<color name="color_ea3a25">#EA3A25</color>
|
||||||
<color name="color_cc004462">#CC004462</color>
|
<color name="color_cc004462">#CC004462</color>
|
||||||
|
<color name="color_dd158d">#DD158D</color>
|
||||||
|
<color name="color_0057ff">#0057FF</color>
|
||||||
|
<color name="color_ffecf7">#FFECF7</color>
|
||||||
|
<color name="color_ecf9ff">#ECF9FF</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue