feat(creator): FanTalk 더보기 팝업을 추가한다

This commit is contained in:
2026-06-22 17:45:36 +09:00
parent 270fe32d94
commit 790e08f1b5
2 changed files with 80 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
package kr.co.vividnext.sodalive.v2.creator.channel.fantalk.ui
import android.graphics.Color
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.PopupWindow
import androidx.core.graphics.drawable.toDrawable
import androidx.core.view.isVisible
import kr.co.vividnext.sodalive.databinding.ViewCreatorChannelFantalkMorePopupBinding
class CreatorChannelFanTalkMorePopup(
private val anchor: View,
private val fanTalkId: Long,
private val showEdit: Boolean,
private val showDelete: Boolean,
private val onDeleteClick: (Long) -> Unit
) {
private val binding = ViewCreatorChannelFantalkMorePopupBinding.inflate(LayoutInflater.from(anchor.context))
private val popupWindow: PopupWindow = PopupWindow(anchor.context).apply {
contentView = binding.root
width = ViewGroup.LayoutParams.WRAP_CONTENT
height = ViewGroup.LayoutParams.WRAP_CONTENT
isOutsideTouchable = true
isFocusable = true
setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
}
init {
binding.tvCreatorChannelFantalkMoreEdit.isVisible = showEdit
binding.tvCreatorChannelFantalkMoreDelete.isVisible = showDelete
binding.tvCreatorChannelFantalkMoreEdit.setOnClickListener {
dismiss()
}
binding.tvCreatorChannelFantalkMoreDelete.setOnClickListener {
dismiss()
onDeleteClick(fanTalkId)
}
}
fun show() {
popupWindow.showAsDropDown(anchor)
}
fun dismiss() {
popupWindow.dismiss()
}
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_creator_channel_sort_popup"
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacing_12"
android:paddingVertical="@dimen/spacing_8">
<TextView
android:id="@+id/tv_creator_channel_fantalk_more_edit"
style="@style/Typography.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:paddingHorizontal="@dimen/spacing_12"
android:paddingVertical="@dimen/spacing_8"
android:text="@string/creator_channel_fantalk_edit"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_creator_channel_fantalk_more_delete"
style="@style/Typography.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:paddingHorizontal="@dimen/spacing_12"
android:paddingVertical="@dimen/spacing_8"
android:text="@string/creator_channel_fantalk_delete"
android:textColor="@color/white" />
</LinearLayout>