parent
2d0c4ea738
commit
d7d43bc7be
|
@ -26,7 +26,6 @@ import android.widget.Toast
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -454,6 +453,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
dialog.show(screenWidth)
|
dialog.show(screenWidth)
|
||||||
}
|
}
|
||||||
binding.tvNotification.setOnClickListener { viewModel.toggleShowNotice() }
|
binding.tvNotification.setOnClickListener { viewModel.toggleShowNotice() }
|
||||||
|
binding.tvMenuPan.setOnClickListener { viewModel.toggleShowMenuPan() }
|
||||||
|
|
||||||
binding.tvBgSwitch.setOnClickListener { viewModel.toggleBackgroundImage() }
|
binding.tvBgSwitch.setOnClickListener { viewModel.toggleBackgroundImage() }
|
||||||
binding.llDonation.setOnClickListener {
|
binding.llDonation.setOnClickListener {
|
||||||
|
@ -807,6 +807,14 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
isActiveRoulette = response.isActiveRoulette
|
isActiveRoulette = response.isActiveRoulette
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (response.menuPan.isNotBlank()) {
|
||||||
|
binding.tvMenuPan.visibility = View.VISIBLE
|
||||||
|
binding.tvMenuPanDetail.text = response.menuPan
|
||||||
|
} else {
|
||||||
|
binding.tvMenuPan.visibility = View.GONE
|
||||||
|
binding.tvMenuPanDetail.text = ""
|
||||||
|
}
|
||||||
|
|
||||||
if (agora.rtmChannelIsNull()) {
|
if (agora.rtmChannelIsNull()) {
|
||||||
joinChannel(response)
|
joinChannel(response)
|
||||||
}
|
}
|
||||||
|
@ -840,6 +848,34 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viewModel.isShowMenuPan.observe(this) {
|
||||||
|
if (it) {
|
||||||
|
binding.tvMenuPan.setTextColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
applicationContext,
|
||||||
|
R.color.color_3bb9f1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
binding.tvMenuPan.setBackgroundResource(
|
||||||
|
R.drawable.bg_round_corner_5_3_transparent_3bb9f1
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.llMenuPan.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
binding.tvMenuPan.setTextColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
applicationContext,
|
||||||
|
R.color.color_bbbbbb
|
||||||
|
)
|
||||||
|
)
|
||||||
|
binding.tvMenuPan.setBackgroundResource(
|
||||||
|
R.drawable.bg_round_corner_5_3_transparent_bbbbbb
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.llMenuPan.visibility = View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
viewModel.totalDonationCan.observe(this) {
|
viewModel.totalDonationCan.observe(this) {
|
||||||
binding.tvTotalCan.text = it.moneyFormat()
|
binding.tvTotalCan.text = it.moneyFormat()
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,10 @@ class LiveRoomViewModel(
|
||||||
val isShowNotice: LiveData<Boolean>
|
val isShowNotice: LiveData<Boolean>
|
||||||
get() = _isShowNotice
|
get() = _isShowNotice
|
||||||
|
|
||||||
|
private val _isShowMenuPan = MutableLiveData(false)
|
||||||
|
val isShowMenuPan: LiveData<Boolean>
|
||||||
|
get() = _isShowMenuPan
|
||||||
|
|
||||||
private val _totalDonationCan = MutableLiveData(0)
|
private val _totalDonationCan = MutableLiveData(0)
|
||||||
val totalDonationCan: LiveData<Int>
|
val totalDonationCan: LiveData<Int>
|
||||||
get() = _totalDonationCan
|
get() = _totalDonationCan
|
||||||
|
@ -355,9 +359,15 @@ class LiveRoomViewModel(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toggleShowNotice() {
|
fun toggleShowNotice() {
|
||||||
|
_isShowMenuPan.value = false
|
||||||
_isShowNotice.value = !isShowNotice.value!!
|
_isShowNotice.value = !isShowNotice.value!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun toggleShowMenuPan() {
|
||||||
|
_isShowNotice.value = false
|
||||||
|
_isShowMenuPan.value = !isShowMenuPan.value!!
|
||||||
|
}
|
||||||
|
|
||||||
fun toggleBackgroundImage() {
|
fun toggleBackgroundImage() {
|
||||||
_isBgOn.value = !isBgOn.value!!
|
_isBgOn.value = !isBgOn.value!!
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ data class GetRoomInfoResponse(
|
||||||
@SerializedName("listenerList") val listenerList: List<LiveRoomMember>,
|
@SerializedName("listenerList") val listenerList: List<LiveRoomMember>,
|
||||||
@SerializedName("managerList") val managerList: List<LiveRoomMember>,
|
@SerializedName("managerList") val managerList: List<LiveRoomMember>,
|
||||||
@SerializedName("donationRankingTop3UserIds") val donationRankingTop3UserIds: List<Long>,
|
@SerializedName("donationRankingTop3UserIds") val donationRankingTop3UserIds: List<Long>,
|
||||||
|
@SerializedName("menuPan") val menuPan: String,
|
||||||
@SerializedName("isActiveRoulette") val isActiveRoulette: Boolean,
|
@SerializedName("isActiveRoulette") val isActiveRoulette: Boolean,
|
||||||
@SerializedName("isPrivateRoom") val isPrivateRoom: Boolean,
|
@SerializedName("isPrivateRoom") val isPrivateRoom: Boolean,
|
||||||
@SerializedName("password") val password: String? = null
|
@SerializedName("password") val password: String? = null
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
android:id="@+id/iv_cover"
|
android:id="@+id/iv_cover"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:layout_marginTop="16dp"
|
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/ll_top" />
|
app:layout_constraintTop_toBottomOf="@id/ll_top" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -104,6 +104,59 @@
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_menu_pan"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginHorizontal="60dp"
|
||||||
|
android:layout_marginBottom="13.3dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/ll_top">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_notice_triangle" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scrollbars="none">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/color_333333"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_menu_pan_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/gmarket_sans_bold"
|
||||||
|
android:text="[메뉴판] "
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="11.3sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_menu_pan_detail"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/gmarket_sans_light"
|
||||||
|
android:lineSpacingExtra="4dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="11.3sp"
|
||||||
|
tools:text="jkljkljkljkljkljkljkl" />
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_top"
|
android:id="@+id/ll_top"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -308,7 +361,6 @@
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||||
android:drawablePadding="2.7dp"
|
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:paddingVertical="5.3dp"
|
android:paddingVertical="5.3dp"
|
||||||
|
@ -317,6 +369,23 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_menu_pan"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginStart="5.3dp"
|
||||||
|
android:layout_toEndOf="@+id/tv_notification"
|
||||||
|
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||||
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="5.3dp"
|
||||||
|
android:text="메뉴판"
|
||||||
|
android:textColor="@color/color_bbbbbb"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -357,7 +426,7 @@
|
||||||
android:id="@+id/ll_view_users"
|
android:id="@+id/ll_view_users"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="5.3dp"
|
||||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="11dp"
|
android:paddingHorizontal="11dp"
|
||||||
|
|
Loading…
Reference in New Issue