feat(creator): 채널 더보기 메뉴를 추가한다
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
package kr.co.vividnext.sodalive.v2.creator.channel
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||||
|
import kr.co.vividnext.sodalive.databinding.DialogCreatorChannelMoreBinding
|
||||||
|
|
||||||
|
class CreatorChannelMoreBottomSheet : BottomSheetDialogFragment() {
|
||||||
|
|
||||||
|
var onClickBlock: (() -> Unit)? = null
|
||||||
|
var onClickUserReport: (() -> Unit)? = null
|
||||||
|
var onClickProfileReport: (() -> Unit)? = null
|
||||||
|
|
||||||
|
private var binding: DialogCreatorChannelMoreBinding? = null
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
val viewBinding = DialogCreatorChannelMoreBinding.inflate(inflater, container, false)
|
||||||
|
binding = viewBinding
|
||||||
|
return viewBinding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
val viewBinding = binding ?: return
|
||||||
|
|
||||||
|
viewBinding.tvUserBlock.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickBlock?.invoke()
|
||||||
|
}
|
||||||
|
viewBinding.tvUserReport.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickUserReport?.invoke()
|
||||||
|
}
|
||||||
|
viewBinding.tvProfileReport.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickProfileReport?.invoke()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
binding = null
|
||||||
|
super.onDestroyView()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(): CreatorChannelMoreBottomSheet = CreatorChannelMoreBottomSheet()
|
||||||
|
}
|
||||||
|
}
|
||||||
48
app/src/main/res/layout/dialog_creator_channel_more.xml
Normal file
48
app/src/main/res/layout/dialog_creator_channel_more.xml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?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="wrap_content"
|
||||||
|
android:background="@color/color_131313"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="24dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="4dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:background="@drawable/bg_bottom_sheet_handle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_user_block"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/menu_user_block"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_user_report"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/menu_user_report"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_profile_report"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/menu_profile_report"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
</LinearLayout>
|
||||||
Reference in New Issue
Block a user