라이브 방
- 채팅창 너비 축소 - 오른쪽 하단 옵션 버튼 baseline이 채팅창 baseline과 동일하게 설정 - 좋아요(누르면 1캔 후원) 버튼 추가 - 좋아요 개수 UI - 후원 캔 왼쪽에 추가
This commit is contained in:
parent
a4ff89cec0
commit
c7409e4dec
|
@ -21,6 +21,7 @@ import android.text.method.LinkMovementMethod
|
|||
import android.text.style.ClickableSpan
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
|
@ -467,6 +468,15 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||
binding.ivSpeakerMute.setImageResource(R.drawable.ic_speaker_on)
|
||||
}
|
||||
}
|
||||
|
||||
binding.etChat.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_SEND) {
|
||||
inputChat()
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
binding.ivSend.setOnClickListener { inputChat() }
|
||||
binding.flDonation.setOnClickListener {
|
||||
val dialog = LiveRoomDonationDialog(
|
||||
|
@ -894,6 +904,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||
binding.ivCreatorFollow.visibility = View.GONE
|
||||
}
|
||||
|
||||
initLikeHeartButton(isHost = response.creatorId == SharedPreferenceManager.userId)
|
||||
initRouletteSettingButton(isHost = response.creatorId == SharedPreferenceManager.userId)
|
||||
activatingRouletteButton(
|
||||
isHost = response.creatorId == SharedPreferenceManager.userId,
|
||||
|
@ -974,11 +985,24 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||
binding.tvTotalCan.text = it.moneyFormat()
|
||||
}
|
||||
|
||||
viewModel.totalLikeHeart.observe(this) {
|
||||
binding.tvTotalHeart.text = it.moneyFormat()
|
||||
}
|
||||
|
||||
viewModel.coverImageUrlLiveData.observe(this) {
|
||||
binding.ivCover.loadUrl(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initLikeHeartButton(isHost: Boolean) {
|
||||
if (!isHost) {
|
||||
binding.flLikeHeart.visibility = View.VISIBLE
|
||||
binding.flLikeHeart.setOnClickListener { }
|
||||
} else {
|
||||
binding.flLikeHeart.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun initRouletteSettingButton(isHost: Boolean) {
|
||||
if (isHost) {
|
||||
binding.flRouletteSettings.visibility = View.VISIBLE
|
||||
|
|
|
@ -64,6 +64,10 @@ class LiveRoomViewModel(
|
|||
val totalDonationCan: LiveData<Int>
|
||||
get() = _totalDonationCan
|
||||
|
||||
private val _totalLikeHeart = MutableLiveData(0)
|
||||
val totalLikeHeart: LiveData<Int>
|
||||
get() = _totalLikeHeart
|
||||
|
||||
private val _userProfileLiveData = MutableLiveData<GetLiveRoomUserProfileResponse>()
|
||||
val userProfileLiveData: LiveData<GetLiveRoomUserProfileResponse>
|
||||
get() = _userProfileLiveData
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
|
@ -403,7 +403,7 @@
|
|||
android:paddingVertical="5.3dp"
|
||||
android:text="공지"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="12sp"
|
||||
android:textSize="11sp"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
<TextView
|
||||
|
@ -419,8 +419,7 @@
|
|||
android:paddingVertical="5.3dp"
|
||||
android:text="메뉴판"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
android:textSize="11sp"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
<LinearLayout
|
||||
|
@ -431,12 +430,42 @@
|
|||
tools:ignore="RelativeOverlap">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_donation"
|
||||
android:id="@+id/ll_heart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="5.3dp"
|
||||
tools:ignore="RelativeOverlap">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_heart_pink" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_heart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6.7dp"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="999,999"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="11sp"
|
||||
tools:ignore="SmallSp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_donation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5.3dp"
|
||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="5.3dp"
|
||||
tools:ignore="RelativeOverlap">
|
||||
|
||||
|
@ -454,9 +483,9 @@
|
|||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="12sp"
|
||||
android:textSize="11sp"
|
||||
tools:ignore="SmallSp"
|
||||
tools:text="999,999,999,999" />
|
||||
tools:text="999,999" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -466,7 +495,7 @@
|
|||
android:layout_marginStart="5.3dp"
|
||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="11dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="5.3dp"
|
||||
tools:ignore="RelativeOverlap">
|
||||
|
||||
|
@ -476,7 +505,7 @@
|
|||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:text="참여자"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="12sp"
|
||||
android:textSize="11sp"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
<TextView
|
||||
|
@ -486,9 +515,9 @@
|
|||
android:layout_marginStart="6.7dp"
|
||||
android:fontFamily="@font/gmarket_sans_bold"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="12sp"
|
||||
android:textSize="11sp"
|
||||
tools:ignore="RelativeOverlap,SmallSp"
|
||||
tools:text="18" />
|
||||
tools:text="777" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -512,7 +541,7 @@
|
|||
android:layout_height="0dp"
|
||||
android:paddingStart="6.7dp"
|
||||
android:paddingEnd="13.3dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_margin">
|
||||
|
||||
|
@ -539,6 +568,24 @@
|
|||
android:src="@drawable/ic_speaker_on" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_like_heart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="13.3dp"
|
||||
android:background="@drawable/bg_round_corner_10_99525252"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_like_heart"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_heart_pink" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_roulette"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -573,24 +620,6 @@
|
|||
android:src="@drawable/ic_roulette_settings" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_microphone_mute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="13.3dp"
|
||||
android:background="@drawable/bg_round_corner_10_99525252"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_microphone_mute"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_mic_on" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_donation_message_list"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -614,7 +643,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="13.3dp"
|
||||
android:background="@drawable/bg_round_corner_10_99525252"
|
||||
android:padding="10dp">
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
|
@ -623,6 +653,24 @@
|
|||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_donation" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_microphone_mute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="13.3dp"
|
||||
android:background="@drawable/bg_round_corner_10_99525252"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_microphone_mute"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_mic_on" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -650,7 +698,7 @@
|
|||
android:layout_marginBottom="13.3dp"
|
||||
android:paddingHorizontal="13.3dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/rl_option_buttons"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<EditText
|
||||
|
@ -661,6 +709,7 @@
|
|||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="채팅을 입력하세요"
|
||||
android:imeOptions="actionSend"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text|textMultiLine"
|
||||
android:paddingVertical="16.7dp"
|
||||
|
|
Loading…
Reference in New Issue