开播准备页面-暂提

This commit is contained in:
Martin 2024-08-10 17:59:07 +08:00
parent fc78fd9d1d
commit dcdf2c666d
12 changed files with 184 additions and 276 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -87,7 +87,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
private ProcessImageUtil mImageUtil; private ProcessImageUtil mImageUtil;
private File mAvatarFile; private File mAvatarFile;
private TextView mLiveClass, anchorAgreement; private TextView mLiveClass, anchorAgreement;
private TextView mLiveTypeTextView, liveClarity;//房间类型TextView private TextView mLiveTypeTextView;//房间类型TextView
private TextView mLiveWishListTextView;//心愿单TextView private TextView mLiveWishListTextView;//心愿单TextView
private int mLiveClassID;//直播频道id private int mLiveClassID;//直播频道id
private int mLiveType;//房间类型 private int mLiveType;//房间类型
@ -98,7 +98,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
private LiveClassBean classBean; private LiveClassBean classBean;
private FaceManager manager; private FaceManager manager;
private TextView faceTextView;//提示人脸未检测到的TextView private TextView faceTextView;//提示人脸未检测到的TextView
private ImageView imgClarity, selectorProtocol; private ImageView selectorProtocol;
private int selectClarity = 1; private int selectClarity = 1;
private LiveOpenCustomPopup liveOpenCustomPopup; private LiveOpenCustomPopup liveOpenCustomPopup;
private boolean selector = true; private boolean selector = true;
@ -123,9 +123,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
@Override @Override
public void init() { public void init() {
mRootView = (ConstraintLayout) findViewById(R.id.traceroute_rootview); mRootView = (ConstraintLayout) findViewById(R.id.traceroute_rootview);
imgClarity = (ImageView) findViewById(R.id.img_clarity);
selectorProtocol = (ImageView) findViewById(R.id.selector_protocol); selectorProtocol = (ImageView) findViewById(R.id.selector_protocol);
liveClarity = (TextView) findViewById(R.id.live_clarity);
anchorAgreement = (TextView) findViewById(R.id.anchor_agreement); anchorAgreement = (TextView) findViewById(R.id.anchor_agreement);
mRootView.setOnClickListener(new View.OnClickListener() { mRootView.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -155,7 +153,6 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
findViewById(R.id.btn_room_type).setOnClickListener(this); findViewById(R.id.btn_room_type).setOnClickListener(this);
mOpenLocation = true; mOpenLocation = true;
mLiveClass = (TextView) findViewById(R.id.live_class); mLiveClass = (TextView) findViewById(R.id.live_class);
mLiveTypeTextView = (TextView) findViewById(R.id.text_room_type);
mLiveWishListTextView = (TextView) findViewById(R.id.text_wishlist); mLiveWishListTextView = (TextView) findViewById(R.id.text_wishlist);
faceTextView = (TextView) findViewById(R.id.faceTextView); faceTextView = (TextView) findViewById(R.id.faceTextView);
@ -203,7 +200,6 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
findViewById(R.id.btn_horizontally).setOnClickListener(this); findViewById(R.id.btn_horizontally).setOnClickListener(this);
findViewById(R.id.anchor_agreement_layout).setOnClickListener(this); findViewById(R.id.anchor_agreement_layout).setOnClickListener(this);
findViewById(R.id.btn_live_anchor_say).setOnClickListener(this); findViewById(R.id.btn_live_anchor_say).setOnClickListener(this);
findViewById(R.id.btn_live_anchor_call_me).setOnClickListener(this);
if (manager != null) { if (manager != null) {
manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() { manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() {
@ -258,7 +254,6 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
@Override @Override
public void onDismiss(BasePopupView popupView) { public void onDismiss(BasePopupView popupView) {
setSelectClarity(liveClarityCustomPopup.getSelectClarity());
} }
@Override @Override
@ -304,32 +299,6 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
}); });
} }
private void setSelectClarity(int selectClarity) {
this.selectClarity = selectClarity;
IMLoginManager.get(mContext).setSelectClarity(selectClarity);
switch (selectClarity) {
case 0:
imgClarity.setImageResource(R.mipmap.icon_sd);
liveClarity.setText(R.string.standard_clear);
break;
case 1:
imgClarity.setImageResource(R.mipmap.icon_hd);
liveClarity.setText(R.string.high_definition);
break;
case 2:
imgClarity.setImageResource(R.mipmap.icon_fhd);
liveClarity.setText(R.string.ultra_hd);
break;
}
if (liveOpenCustomPopup != null) {
liveOpenCustomPopup.setSelectClarity(selectClarity);
}
//SWManager.get().setDimensions(selectClarity);
Log.e("切换分辨率", "时间戳" + System.currentTimeMillis());
//重新发布一下流
Bus.get().post(new LivePushRyEvent());
}
public void setManager(FaceManager manager) { public void setManager(FaceManager manager) {
this.manager = manager; this.manager = manager;
} }
@ -559,11 +528,27 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
RouteUtil.forwardLiveZhuangBanActivity(url.toString(), false); RouteUtil.forwardLiveZhuangBanActivity(url.toString(), false);
} else if (i == R.id.btn_live_anchor_say) { } else if (i == R.id.btn_live_anchor_say) {
openAnchorSayDialog(); openAnchorSayDialog();
} else if (i == R.id.btn_live_anchor_call_me) {
openAnchorCallMeDialog();
} }
} }
private void setSelectClarity(int selectClarity) {
this.selectClarity = selectClarity;
IMLoginManager.get(mContext).setSelectClarity(selectClarity);
switch (selectClarity) {
case 0:
break;
case 1:
break;
case 2:
break;
}
if (liveOpenCustomPopup != null) {
liveOpenCustomPopup.setSelectClarity(selectClarity);
}
//SWManager.get().setDimensions(selectClarity);
Log.e("切换分辨率", "时间戳" + System.currentTimeMillis());
//重新发布一下流
Bus.get().post(new LivePushRyEvent());
}
/** /**
* 新娱美颜 * 新娱美颜
*/ */

View File

@ -3,7 +3,7 @@
<item android:width="68dp" android:height="68dp"> <item android:width="68dp" android:height="68dp">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="#59ffffff" /> <solid android:color="#59ffffff" />
<corners android:radius="2dp" /> <corners android:radius="5dp" />
</shape> </shape>
</item> </item>
</selector> </selector>

View File

@ -18,6 +18,18 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/btn_live_clarity"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="20dp"
android:layout_marginTop="54dp"
android:layout_toRightOf="@+id/btn_horizontally"
android:padding="3dp"
android:src="@mipmap/icon_fhd"
app:layout_constraintStart_toEndOf="@+id/btn_camera"
app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/btn_horizontally" android:id="@+id/btn_horizontally"
android:layout_width="30dp" android:layout_width="30dp"
@ -27,9 +39,10 @@
android:layout_toRightOf="@+id/btn_camera" android:layout_toRightOf="@+id/btn_camera"
android:padding="3dp" android:padding="3dp"
android:src="@mipmap/icon_horizontally" android:src="@mipmap/icon_horizontally"
app:layout_constraintStart_toEndOf="@+id/btn_camera" app:layout_constraintStart_toEndOf="@+id/btn_live_clarity"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/btn_close" android:id="@+id/btn_close"
android:layout_width="45dp" android:layout_width="45dp"
@ -45,100 +58,78 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="79dp"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="98dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_marginTop="10dp"
android:id="@+id/contentLayout"
android:background="@drawable/border_grey1" android:background="@drawable/border_grey1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toBottomOf="@+id/btn_camera">
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/btn_live_clarity" android:id="@+id/avatar"
android:layout_width="wrap_content" android:layout_width="65dp"
android:layout_height="25dp" android:layout_height="65dp"
android:layout_marginStart="16dp" android:layout_marginStart="8dp"
android:layout_marginTop="10dp" android:layout_marginTop="5dp"
android:gravity="center" android:layout_marginEnd="14dp"
android:orientation="horizontal" android:layout_marginBottom="5dp"
android:background="@drawable/bg_live_upload_cover"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/edit_title"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/img_clarity"
android:layout_width="18dp" android:layout_width="18dp"
android:layout_height="18dp" android:layout_height="18dp"
android:layout_weight="1" android:layout_marginTop="15dp"
app:srcCompat="@mipmap/icon_fhd" />
<TextView
android:id="@+id/live_clarity"
android:layout_width="60dp"
android:singleLine="true"
android:ellipsize="end"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:text="@string/high_definition"
android:textColor="@color/white"
android:textSize="12sp" />
<ImageView
android:layout_width="5dp"
android:layout_height="10dp"
android:layout_weight="1"
android:scaleType="centerCrop"
android:src="@mipmap/icon_live_more" />
</LinearLayout>
<LinearLayout
android:id="@+id/btn_room_type"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/icon_live_ready_add" />
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_weight="1"
app:srcCompat="@mipmap/icon_public" />
<TextView <TextView
android:id="@+id/text_room_type" android:id="@+id/cover_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginBottom="12dp"
android:layout_marginEnd="4dp" android:text="@string/live_cover"
android:layout_weight="1" android:textColor="#FFFFFF"
android:text="@string/live_room_public" android:textSize="12sp"
android:textColor="@color/white" app:layout_constraintBottom_toBottomOf="parent"
android:textSize="12sp" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView <EditText
android:layout_width="5dp" android:id="@+id/edit_title"
android:layout_height="10dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_height="22dp"
android:scaleType="centerCrop" android:layout_marginStart="8dp"
android:src="@mipmap/icon_live_more" /> android:background="@null"
</LinearLayout> android:hint="@string/live_title_hint"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textSize="15sp"
app:layout_constraintStart_toEndOf="@+id/avatar"
tools:layout_editor_absoluteY="16dp" />
<LinearLayout <LinearLayout
android:id="@+id/btn_live_class" android:id="@+id/btn_live_class"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_height="25dp"
android:layout_marginTop="10dp" android:layout_marginTop="44dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="240dp"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:layout_width="18dp" android:layout_width="18dp"
android:layout_height="18dp" android:layout_height="18dp"
@ -163,54 +154,57 @@
android:src="@mipmap/icon_live_more" /> android:src="@mipmap/icon_live_more" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_wishlist" android:id="@+id/tips"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_height="30dp"
android:layout_marginStart="16dp" android:layout_marginTop="4dp"
android:layout_marginTop="10dp" android:background="@drawable/border_grey1"
android:layout_marginLeft="10dp"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_live_clarity"> app:layout_constraintTop_toBottomOf="@+id/contentLayout">
<ImageView <ImageView
android:layout_width="18dp" android:layout_width="16dp"
android:layout_height="18dp" android:layout_height="16dp"
android:layout_marginStart="5dp"
android:layout_weight="1" android:layout_weight="1"
app:srcCompat="@mipmap/ic_live_ready_xjd" /> app:srcCompat="@mipmap/icon_tips" />
<TextView <TextView
android:id="@+id/text_wishlist"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/live_wish_list" android:text="開播前發一條動態,將會給您的直播帶來更高人氣哦~"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" /> android:textSize="12sp" />
<ImageView
android:layout_width="5dp"
android:layout_height="10dp"
android:layout_weight="1"
android:scaleType="centerCrop"
android:src="@mipmap/icon_live_more" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_live_anchor_say" android:id="@+id/btn_live_anchor_say"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_height="30dp"
android:layout_marginTop="10dp" android:layout_marginTop="4dp"
android:background="@drawable/border_grey1"
android:layout_marginLeft="10dp"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_room_type"> app:layout_constraintTop_toBottomOf="@+id/tips">
<ImageView <ImageView
android:layout_width="18dp" android:layout_width="15dp"
android:layout_height="18dp" android:layout_height="15dp"
android:layout_marginStart="5dp"
android:layout_weight="1" android:layout_weight="1"
app:srcCompat="@mipmap/ic_live_ready_say" /> app:srcCompat="@mipmap/ic_live_ready_say" />
@ -227,36 +221,39 @@
<ImageView <ImageView
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="10dp" android:layout_height="10dp"
android:layout_marginEnd="5dp"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@mipmap/icon_live_more" /> android:src="@mipmap/icon_live_more" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_live_anchor_call_me" android:id="@+id/btn_wishlist"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_marginLeft="10dp"
android:layout_marginTop="10dp" android:layout_height="30dp"
android:visibility="gone" android:layout_marginTop="4dp"
android:layout_marginEnd="16dp" android:background="@drawable/border_grey1"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/btn_live_anchor_say"
app:layout_constraintTop_toBottomOf="@+id/btn_live_class"> app:layout_constraintTop_toBottomOf="@+id/tips">
<ImageView <ImageView
android:layout_width="18dp" android:layout_width="18dp"
android:layout_height="18dp" android:layout_height="18dp"
android:layout_weight="1" android:layout_weight="1"
app:srcCompat="@mipmap/ic_live_ready_letter" /> android:layout_marginStart="5dp"
app:srcCompat="@mipmap/ic_live_ready_xjd" />
<TextView <TextView
android:layout_width="60dp" android:id="@+id/text_wishlist"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:layout_marginStart="5dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/live_ready_anchor_call_me" android:text="@string/live_wish_list"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" /> android:textSize="12sp" />
@ -264,84 +261,10 @@
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="10dp" android:layout_height="10dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginEnd="5dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@mipmap/icon_live_more" /> android:src="@mipmap/icon_live_more" />
</LinearLayout> </LinearLayout>
<View
android:id="@+id/line"
android:layout_width="0dp"
android:layout_height="1.4dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="8dp"
android:background="@drawable/bg_line"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_live_anchor_say" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/avatar"
android:layout_width="68dp"
android:layout_height="68dp"
android:layout_marginStart="8dp"
android:layout_marginTop="7dp"
android:layout_marginBottom="8dp"
android:background="@drawable/bg_live_upload_cover"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/line">
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginTop="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/icon_live_ready_add" />
<TextView
android:id="@+id/cover_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="@string/live_cover"
android:textColor="#FFFFFF"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/title_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="25dp"
android:text="@string/live_title"
android:textColor="#C4FFFFFF"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toBottomOf="@+id/line" />
<EditText
android:id="@+id/edit_title"
android:layout_width="0dp"
android:layout_height="22dp"
android:layout_below="@id/title_text"
android:layout_marginStart="14dp"
android:layout_marginTop="8dp"
android:background="@null"
android:hint="@string/live_title_hint"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textSize="15sp"
app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toBottomOf="@+id/title_text" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView <ImageView
android:id="@+id/btn_beauty" android:id="@+id/btn_beauty"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB