From 308d5acc218a7e7cde19f52a562310f5b20359a9 Mon Sep 17 00:00:00 2001
From: zlzw <583819556@qq.com>
Date: Sat, 10 Dec 2022 17:30:11 +0800
Subject: [PATCH] =?UTF-8?q?update=20=E6=95=B4=E8=9B=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../live/dialog/LivePrankDialogFragment.java | 65 ++++++++++
live/src/main/res/drawable/bg_prank_coin.xml | 9 ++
.../src/main/res/layout/dialog_live_prank.xml | 24 ++--
.../item_live_prank_turntable_config.xml | 44 +++++++
.../res/layout/view_live_prank_turntable.xml | 118 ++++++++++++++----
5 files changed, 224 insertions(+), 36 deletions(-)
create mode 100644 live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java
create mode 100644 live/src/main/res/drawable/bg_prank_coin.xml
create mode 100644 live/src/main/res/layout/item_live_prank_turntable_config.xml
diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java
new file mode 100644
index 000000000..80fa313eb
--- /dev/null
+++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java
@@ -0,0 +1,65 @@
+package com.yunbao.live.dialog;
+
+import android.os.Bundle;
+import android.view.Gravity;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.google.android.material.tabs.TabLayout;
+import com.yunbao.common.dialog.AbsDialogFragment;
+import com.yunbao.live.R;
+
+public class LivePrankDialogFragment extends AbsDialogFragment {
+ private TabLayout mTabLayout;
+ private View mTurntableConfigLayout;
+ private ImageView mTurntableConfigImageView;
+ private TextView mCoinTextView;
+ private RecyclerView mPrankRecyclerView;
+
+ @Override
+ protected int getLayoutId() {
+ return R.layout.dialog_live_prank;
+ }
+
+ @Override
+ protected int getDialogStyle() {
+ return R.style.dialog2;
+ }
+
+ @Override
+ protected boolean canCancel() {
+ return true;
+ }
+
+ @Override
+ protected void setWindowAttributes(Window window) {
+ WindowManager.LayoutParams params = window.getAttributes();
+ window.setWindowAnimations(R.style.bottomToTopAnim);
+ params.width = WindowManager.LayoutParams.MATCH_PARENT;
+ params.height = WindowManager.LayoutParams.WRAP_CONTENT;
+ params.gravity = Gravity.BOTTOM;
+ window.setAttributes(params);
+ }
+
+ @Override
+ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+ initView();
+ }
+
+ private void initView() {
+ mTabLayout = (TabLayout) findViewById(R.id.prank_tabLayout);
+ mTurntableConfigLayout = findViewById(R.id.turntable_layout);
+ mTurntableConfigImageView = (ImageView) findViewById(R.id.switch1_btn);
+ mCoinTextView = (TextView) findViewById(R.id.switch2_btn);
+ mPrankRecyclerView = (RecyclerView) findViewById(R.id.prank_config);
+ mPrankRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, RecyclerView.VERTICAL, false));
+ }
+}
diff --git a/live/src/main/res/drawable/bg_prank_coin.xml b/live/src/main/res/drawable/bg_prank_coin.xml
new file mode 100644
index 000000000..943be8118
--- /dev/null
+++ b/live/src/main/res/drawable/bg_prank_coin.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/dialog_live_prank.xml b/live/src/main/res/layout/dialog_live_prank.xml
index c464112a8..4cb7e0a8f 100644
--- a/live/src/main/res/layout/dialog_live_prank.xml
+++ b/live/src/main/res/layout/dialog_live_prank.xml
@@ -2,24 +2,17 @@
+ android:layout_height="330dp"
+ android:background="#000002">
-
-
-
@@ -27,9 +20,20 @@
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:textColor="#FFF"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="TextView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/item_live_prank_turntable_config.xml b/live/src/main/res/layout/item_live_prank_turntable_config.xml
new file mode 100644
index 000000000..b9982456e
--- /dev/null
+++ b/live/src/main/res/layout/item_live_prank_turntable_config.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/view_live_prank_turntable.xml b/live/src/main/res/layout/view_live_prank_turntable.xml
index c61215b16..61e3d9ffd 100644
--- a/live/src/main/res/layout/view_live_prank_turntable.xml
+++ b/live/src/main/res/layout/view_live_prank_turntable.xml
@@ -2,36 +2,102 @@
-
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="20dp">
-
+
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+