改版主播工具栏界面

This commit is contained in:
2022-09-15 16:00:50 +08:00
parent e455f1c3a0
commit e7a8cd781b
22 changed files with 438 additions and 4 deletions

View File

@@ -50,6 +50,7 @@ import com.yunbao.live.dialog.LiveBeautyDialogFragment;
import com.yunbao.live.dialog.LiveFunctionDialogFragment;
import com.yunbao.live.dialog.LiveLinkMicListDialogFragment;
import com.yunbao.live.dialog.LiveMicUserDialogFragment;
import com.yunbao.live.dialog.LiveNewFunctionDialogFragment;
import com.yunbao.live.dialog.LiveNewWishListDialogFragment;
import com.yunbao.live.dialog.LiveWishListDialogFragment;
import com.yunbao.live.event.LinkMicTxMixStreamEvent;
@@ -216,7 +217,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
* @param functionID
*/
int mrr = 0;
public static int leave = 0;
public int leave = 0;
@Override
public void onClick(int functionID) {
@@ -532,13 +533,14 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
* 打开功能弹窗
*/
public void showFunctionDialog() {
LiveFunctionDialogFragment fragment = new LiveFunctionDialogFragment();
LiveNewFunctionDialogFragment fragment = new LiveNewFunctionDialogFragment();
Bundle bundle = new Bundle();
boolean hasGame = false;
if (CommonAppConfig.GAME_ENABLE && mGameList != null) {
hasGame = mGameList.size() > 0;
}
bundle.putBoolean(Constants.HAS_GAME, hasGame);
bundle.putInt("leave",leave);
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
fragment.setArguments(bundle);
fragment.setFunctionClickListener(this);
@@ -666,6 +668,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
}
mStartLive = true;
mLiveRoomViewHolder.startRefreshUserList();
mLiveRoomViewHolder.hideFloatMsg();
//守护相关
mLiveGuardInfo = new LiveGuardInfo();

View File

@@ -44,7 +44,8 @@ public class LiveFunctionAdapter extends RecyclerView.Adapter<LiveFunctionAdapte
if (LiveRyAnchorActivity.mLivePushViewHolder != null) {
if (LiveRyAnchorActivity.leave == 0) {
//LiveRyAnchorActivity.leave
if (leave == 0) {
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_ZSLK, R.mipmap.icon_leave, R.string.live_zslk));
} else {
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_ZSLK, R.mipmap.icon_leave_p, R.string.live_zslk1));

View File

@@ -0,0 +1,138 @@
package com.yunbao.live.dialog;
import static com.yunbao.common.Constants.*;
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 com.yunbao.common.Constants;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.interfaces.LiveFunctionClickListener;
/**
* Created by cxf on 2018/10/9.
*/
public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements View.OnClickListener {
private View mWishView, mPrankView, mWksView, mBeautyView, mCameraView, mLeaveView, mOnePkView, mMultiPkView, mMicView;
private LiveFunctionClickListener mFunctionClickListener;
private int leave = 0;
// boolean isRy = false;
@Override
protected int getLayoutId() {
return R.layout.dialog_live_new_function;
}
@Override
protected int getDialogStyle() {
return R.style.dialog2;
}
@Override
protected boolean canCancel() {
return true;
}
@Override
protected void setWindowAttributes(Window window) {
window.setWindowAnimations(R.style.bottomToTopAnim);
WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT;
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
params.gravity = Gravity.BOTTOM;
window.setAttributes(params);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
boolean hasGame = false;
boolean openFlash = false;
Bundle bundle = getArguments();
if (bundle != null) {
hasGame = bundle.getBoolean(Constants.HAS_GAME, false);
openFlash = bundle.getBoolean(Constants.OPEN_FLASH, false);
leave = bundle.getInt("leave", 0);
// isRy = bundle.getBoolean("isRy", false);
}
mWishView = findViewById(R.id.live_tool_wish);
mPrankView = findViewById(R.id.live_tool_prank);
mWksView = findViewById(R.id.live_tool_wks);
mBeautyView = findViewById(R.id.live_tool_beauty);
mCameraView = findViewById(R.id.live_tool_camera);
mLeaveView = findViewById(R.id.live_tool_leave);
mOnePkView = findViewById(R.id.live_tool_one_pk);
mMultiPkView = findViewById(R.id.live_tool_multi_pk);
mMicView = findViewById(R.id.live_tool_mic);
mWishView.setOnClickListener(this);
mPrankView.setOnClickListener(this);
mWksView.setOnClickListener(this);
mBeautyView.setOnClickListener(this);
mCameraView.setOnClickListener(this);
mLeaveView.setOnClickListener(this);
mOnePkView.setOnClickListener(this);
mMultiPkView.setOnClickListener(this);
mMicView.setOnClickListener(this);
if(leave==0){
((ImageView)mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave);
((TextView)mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(R.string.live_zslk);
}else {
((ImageView)mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave_p);
((TextView)mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(R.string.live_zslk1);
}
}
public void setFunctionClickListener(LiveFunctionClickListener functionClickListener) {
mFunctionClickListener = functionClickListener;
}
@Override
public void onDestroy() {
// if(isRy == false) {
// ((LiveAnchorActivity) mContext).setBtnFunctionDark();
// }else{
((LiveRyAnchorActivity) mContext).setBtnFunctionDark();
// }
super.onDestroy();
}
@Override
public void onClick(View view) {
dismiss();
int id = view.getId();
if (id == R.id.live_tool_wish) {
mFunctionClickListener.onClick(LIVE_FUNC_WISHLIST);
} else if (id == R.id.live_tool_prank) {
mFunctionClickListener.onClick(LIVE_FUNC_ZG);
} else if (id == R.id.live_tool_wks) {
mFunctionClickListener.onClick(LIVE_FUNC_WKS);
} else if (id == R.id.live_tool_beauty) {
mFunctionClickListener.onClick(LIVE_FUNC_BEAUTY);
} else if (id == R.id.live_tool_camera) {
mFunctionClickListener.onClick(LIVE_FUNC_CAMERA);
} else if (id == R.id.live_tool_leave) {
mFunctionClickListener.onClick(LIVE_FUNC_ZSLK);
} else if (id == R.id.live_tool_one_pk) {
mFunctionClickListener.onClick(LIVE_FUNC_LINK_MIC);
} else if (id == R.id.live_tool_multi_pk) {
mFunctionClickListener.onClick(LIVE_FUNC_DR);
} else if (id == R.id.live_tool_mic) {
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
}
}
}

View File

@@ -942,7 +942,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
// findViewById(R.id.hour_rank_layout).setEnabled(false);
/* findViewById(R.id.live_wks_layout).setEnabled(false);
findViewById(R.id.wish_list_layout).setEnabled(false);*/
msg.setVisibility(View.GONE);
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
findViewById(R.id.btn_follow).setVisibility(View.GONE);
}else {
@@ -950,6 +949,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
reloadIM();
}
public void hideFloatMsg(){
msg.setVisibility(View.GONE);
}
private void showBanner2() {
if (mBannerList2 == null || mBannerList2.size() == 0 || mBanner2 == null) {
@@ -1734,6 +1736,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* @param in 展示的view
*/
private void changeMsgView(View out, View in) {
if(mContext instanceof LiveRyAnchorActivity){
return;
}
if (in.getVisibility() == View.VISIBLE) {
return;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB