diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index 946591739..9cc662e97 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -434,6 +434,8 @@ public class WebViewActivity extends AbsActivity { gotoLive(event.getLiveId()); }else if (TextUtils.equals(event.getMethod(), "androidtoCommunityVideo")) { RouteUtil.forwardCommunityActivity(); + }else if(TextUtils.equals(event.getMethod(), "toRoomManage")){ + RouteUtil.forwardRoomManageActivity(); } } diff --git a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java index a48293015..17fa2a578 100644 --- a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java @@ -66,6 +66,15 @@ public class RouteUtil { public static final String PATH_SudSwGameActivity = "/live/SudSwGameActivity"; public static final String PATH_SudRyGameActivity = "/live/SudRyGameActivity"; + public static final String PATH_LiveROOMMANAGE = "/live/RoomManageActivity"; + + /** + * 跳转到房间管理页面 + */ + public static void forwardRoomManageActivity() { + ARouter.getInstance().build(PATH_LiveROOMMANAGE) + .navigation(); + } public static void forwardVideoPlayNewActivity(ActiveBean bean) { ARouter.getInstance().build(PATH_VIDEO_NEW_PLAY) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index f4a11a348..93e5a00ec 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -834,6 +834,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000); mLiveRoomViewHolder.setVotes(obj.getString("votestotal")); mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum")); + mLiveRoomViewHolder.setShowTask(obj.getString("new_task_url"),obj.getIntValue("is_new_live")==1); mLiveRoomViewHolder.startFace(); UserBean u = CommonAppConfig.getInstance().getUserBean(); if (u != null) { diff --git a/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java b/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java index 63aae5519..2626687e2 100644 --- a/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java @@ -9,9 +9,11 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; +import com.alibaba.android.arouter.facade.annotation.Route; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.adapter.ViewPagerAdapter; import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.views.AbsCommonViewHolder; @@ -34,7 +36,7 @@ import java.util.List; /** * Created by cxf on 2019/4/27. */ - +@Route(path = RouteUtil.PATH_LiveROOMMANAGE) public class RoomManageActivity extends AbsActivity { private static final int PAGE_COUNT = 2; diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index fb9e1ef6c..c70398baf 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -471,6 +471,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private TextView wish_total; private ProgressBar wish_progressbar; + private LinearLayout anTask; + public LiveRoomViewHolder setGuardType(int guardType) { this.guardType = guardType; return this; @@ -4882,6 +4884,17 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } + public void setShowTask(String url,boolean isShow){ + anTask = findViewById(R.id.anTask); + anTask.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + ZhuangBanActivity.forward(mContext, url, false, 1); + } + }); + anTask.setVisibility(isShow?View.VISIBLE:View.GONE); + } + /** * 切换美颜UI */ diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 1ab328274..81c6ed1a6 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -178,6 +178,7 @@ + - - - + + android:layout_height="wrap_content"> - - - + + android:background="@mipmap/background_live_notify_gift" + android:paddingStart="5dp" + android:visibility="gone" + tools:visibility="visible"> - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +