观众观播notify

This commit is contained in:
Martin 2024-08-22 18:31:29 +08:00
parent 0d1e2c4e6b
commit 7f2136320d
14 changed files with 356 additions and 64 deletions

View File

@ -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();
}
}

View File

@ -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)

View File

@ -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) {

View File

@ -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;

View File

@ -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
*/

View File

@ -178,6 +178,7 @@
</LinearLayout>
</LinearLayout>
<!--消息-->
<RelativeLayout
android:id="@+id/chat_view"
android:layout_width="match_parent"
@ -373,6 +374,7 @@
<!--新手任务-->
<LinearLayout
android:id="@+id/anTask"
android:layout_width="82dp"
android:layout_height="match_parent"
android:layout_marginStart="12dp"
@ -2732,7 +2734,6 @@
android:layout_height="wrap_content"
android:layout_below="@id/live_video" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -2984,7 +2985,6 @@
android:layout_marginTop="60dp"
android:visibility="gone" />
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svga_new_user_gif"
android:layout_width="116dp"
@ -3015,73 +3015,338 @@
android:layout_marginTop="80dp"
app:autoPlay="true" />
<RelativeLayout
android:id="@+id/sud_layout_name"
android:layout_width="200dp"
android:layout_height="40dp"
<!--新用户观播活动-->
<LinearLayout
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:layout_marginStart="13dp"
android:background="@drawable/background_live_sud_hint"
android:paddingStart="5dp"
android:visibility="gone"
tools:visibility="visible">
android:layout_height="wrap_content">
<ImageView
android:id="@+id/sud_game_coin"
android:layout_width="22dp"
android:layout_height="16dp"
android:layout_centerVertical="true"
android:layout_marginTop="2dp"
android:src="@mipmap/live_room_sud_hint_icon" />
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/sud_text_name"
android:layout_width="match_parent"
<!--送免費禮物-->
<RelativeLayout
android:layout_marginTop="5dp"
android:id="@+id/new_task_send_gift_notify"
android:layout_width="280dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:layout_toStartOf="@+id/sud_join"
android:layout_toEndOf="@+id/sud_game_coin"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
android:textColor="#999999"
android:textSize="12dp" />
android:background="@mipmap/background_live_notify_gift"
android:paddingStart="5dp"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:id="@+id/sud_join"
android:layout_width="wrap_content"
android:layout_height="18dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_live_room_sud_hint_join"
android:ellipsize="end"
android:fontFamily="sans-serif-condensed-medium"
android:gravity="center"
android:maxWidth="50dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:singleLine="true"
android:text="@string/live_room_sud_hint_join"
android:textColor="@color/white"
android:textSize="10sp"
android:visibility="visible"
tools:visibility="visible" />
<TextView
android:id="@+id/new_task_send_gift_content"
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="15dp"
android:text="看了這麼久送ta一份免費禮物吧 ~ 完成首次送禮任務還可以領取精美獎品!"
android:textColor="#FF444444"
android:textSize="12dp" />
<ImageView
android:id="@+id/iconSudClose"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="2dp"
android:layout_marginEnd="2dp"
android:src="@mipmap/icon_live_room_sud_close" />
<TextView
android:id="@+id/new_task_send_gift_details"
android:layout_width="wrap_content"
android:layout_marginEnd="15dp"
android:layout_height="18dp"
android:ellipsize="end"
android:layout_alignParentEnd="true"
android:layout_below="@+id/new_task_send_gift_content"
android:singleLine="true"
android:text="查看禮物"
android:textColor="#FF2B5AB8"
android:textSize="12sp"
android:visibility="visible"
tools:visibility="visible" />
</RelativeLayout>
<ImageView
android:id="@+id/close_task_send_gift_close"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="1dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/icon_live_notify_close" />
</RelativeLayout>
<!--可領取獎勵-->
<RelativeLayout
android:layout_marginTop="5dp"
android:id="@+id/new_task_gift_notify1"
android:layout_width="250dp"
android:layout_height="46dp"
android:background="@mipmap/background_live_notify_gift"
android:paddingStart="5dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/notify_gift_receive_icon1"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginStart="7dp"
android:layout_centerVertical="true"
android:layout_marginTop="2dp"
android:src="@mipmap/icon_live_notify_gift" />
<com.yunbao.common.views.weight.MarqueeTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/notify_gift_receive_icon1"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:layout_marginEnd="50dp"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="您有一份獎勵可領取,速速前往!"
android:textColor="#FF444444"
android:textSize="12dp" />
<TextView
android:id="@+id/new_task_gift_details1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginEnd="18dp"
android:fontFamily="sans-serif-condensed-medium"
android:gravity="center"
android:maxWidth="50dp"
android:text="點擊\n前往"
android:textColor="#FF2B5AB8"
android:textSize="10sp"
android:visibility="visible"
tools:visibility="visible" />
<ImageView
android:id="@+id/close_task_receive_close1"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="1dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/icon_live_notify_close" />
</RelativeLayout>
<!--完成任務-->
<RelativeLayout
android:layout_marginTop="5dp"
android:id="@+id/new_task_gift_notify"
android:layout_width="250dp"
android:layout_height="46dp"
android:background="@mipmap/background_live_notify_gift"
android:paddingStart="5dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/notify_gift_receive_icon"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginStart="7dp"
android:layout_centerVertical="true"
android:layout_marginTop="2dp"
android:src="@mipmap/icon_live_notify_gift" />
<com.yunbao.common.views.weight.MarqueeTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/notify_gift_receive_icon"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:layout_marginEnd="50dp"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="完成新人任務,可領多重專屬豪禮!"
android:textColor="#FF444444"
android:textSize="12dp" />
<TextView
android:id="@+id/new_task_gift_details"
android:layout_width="wrap_content"
android:layout_height="18dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginEnd="6dp"
android:ellipsize="end"
android:fontFamily="sans-serif-condensed-medium"
android:gravity="center"
android:maxWidth="50dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:singleLine="true"
android:text="详情"
android:textColor="#FF2B5AB8"
android:textSize="12sp"
android:visibility="visible"
tools:visibility="visible" />
<ImageView
android:id="@+id/close_task_receive_close"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="1dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/icon_live_notify_close" />
</RelativeLayout>
<!--關注主播-->
<RelativeLayout
android:layout_alignParentBottom="true"
android:layout_marginTop="5dp"
android:id="@+id/notify_follow_layout"
android:layout_width="200dp"
android:layout_height="60dp"
android:visibility="gone"
tools:visibility="visible">
<RelativeLayout
android:layout_marginTop="5dp"
android:background="@mipmap/bg_live_room_notify_follow"
android:layout_width="200dp"
android:layout_height="41dp">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginTop="2dp"
android:src="@mipmap/icon_live_room_follow_avatar" />
<ImageView
android:id="@+id/notify_follow_coin"
android:layout_width="29dp"
android:layout_height="29dp"
android:layout_centerVertical="true"
android:layout_marginStart="0.5dp"
android:layout_marginTop="2dp"
android:src="@mipmap/icon_live_room_follow_avatar" />
<TextView
android:id="@+id/notify_follow_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="35dp"
android:layout_marginEnd="20dp"
android:text="主播名稱"
android:layout_marginTop="2dp"
android:textColor="@color/white"
android:textSize="14sp"
android:visibility="visible"
tools:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="35dp"
android:layout_marginEnd="20dp"
android:layout_alignParentBottom="true"
android:text="喜歡主播就關注ta吧~"
android:layout_marginBottom="5dp"
android:textColor="@color/white"
android:textSize="10sp"
android:visibility="visible"
tools:visibility="visible" />
<ImageView
android:layout_width="45dp"
android:layout_height="24dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="20dp"
android:src="@mipmap/icon_live_room_follow" />
</RelativeLayout>
<ImageView
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_alignParentEnd="true"
android:src="@mipmap/icon_live_notify_close1" />
</RelativeLayout>
<!--游戏消息-->
<RelativeLayout
android:layout_alignParentBottom="true"
android:layout_marginTop="5dp"
android:id="@+id/sud_layout_name"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_marginStart="13dp"
android:background="@drawable/background_live_sud_hint"
android:paddingStart="5dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/sud_game_coin"
android:layout_width="22dp"
android:layout_height="16dp"
android:layout_centerVertical="true"
android:layout_marginTop="2dp"
android:src="@mipmap/live_room_sud_hint_icon" />
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/sud_text_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:layout_toStartOf="@+id/sud_join"
android:layout_toEndOf="@+id/sud_game_coin"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
android:textColor="#999999"
android:textSize="12dp" />
<TextView
android:id="@+id/sud_join"
android:layout_width="wrap_content"
android:layout_height="18dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_live_room_sud_hint_join"
android:ellipsize="end"
android:fontFamily="sans-serif-condensed-medium"
android:gravity="center"
android:maxWidth="50dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:singleLine="true"
android:text="@string/live_room_sud_hint_join"
android:textColor="@color/white"
android:textSize="10sp"
android:visibility="visible"
tools:visibility="visible" />
<ImageView
android:id="@+id/iconSudClose"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="2dp"
android:layout_marginEnd="2dp"
android:src="@mipmap/icon_live_room_sud_close" />
</RelativeLayout>
</LinearLayout>
<FrameLayout
android:id="@+id/pa_pao_layout"

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB