分享房间移到退出房间弹窗
@@ -12,7 +12,10 @@ import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.mango.core.home.bean.HomeRoomInfo
|
||||
import com.mango.core.home.event.ShareRoomEvent
|
||||
import com.mango.core.manager.AvRoomDataManager
|
||||
import com.mango.core.room.model.AvRoomModel
|
||||
import com.mango.moshen.R
|
||||
import com.mango.moshen.UIHelper
|
||||
import com.mango.moshen.avroom.activity.AVRoomActivity
|
||||
@@ -22,14 +25,11 @@ import com.mango.moshen.common.widget.dialog.DialogManager.LambdaOkDialogListene
|
||||
import com.mango.moshen.common.widget.dialog.DialogManager.OkCancelDialogListener
|
||||
import com.mango.moshen.ui.utils.RVDelegate
|
||||
import com.mango.xchat_android_constants.XChatConstants
|
||||
import com.mango.core.home.bean.HomeRoomInfo
|
||||
import com.mango.core.manager.AvRoomDataManager
|
||||
import com.mango.core.room.model.AvRoomModel
|
||||
import com.mango.xchat_android_library.annatation.ActLayoutRes
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import io.reactivex.disposables.Disposable
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
|
||||
@ActLayoutRes(R.layout.dialog_exit_room)
|
||||
class ExitRoomPopupWindow(val avRoomActivity: AVRoomActivity) : PopupWindow() {
|
||||
|
||||
companion object {
|
||||
@@ -46,6 +46,7 @@ class ExitRoomPopupWindow(val avRoomActivity: AVRoomActivity) : PopupWindow() {
|
||||
private val tvReport: TextView
|
||||
private val tvMiniRoom: TextView
|
||||
private val tvExitRoom: TextView
|
||||
private val tvShareRoom: TextView
|
||||
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
@@ -62,6 +63,7 @@ class ExitRoomPopupWindow(val avRoomActivity: AVRoomActivity) : PopupWindow() {
|
||||
tvReport = contentView.findViewById(R.id.tv_report)
|
||||
tvMiniRoom = contentView.findViewById(R.id.tv_mini_room)
|
||||
tvExitRoom = contentView.findViewById(R.id.tv_exit_room)
|
||||
tvShareRoom = contentView.findViewById(R.id.tv_share_room)
|
||||
initView()
|
||||
isClippingEnabled = false
|
||||
}
|
||||
@@ -81,6 +83,11 @@ class ExitRoomPopupWindow(val avRoomActivity: AVRoomActivity) : PopupWindow() {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
tvShareRoom.setOnClickListener {
|
||||
EventBus.getDefault().post(ShareRoomEvent())
|
||||
dismiss()
|
||||
}
|
||||
|
||||
tvMiniRoom.setOnClickListener {
|
||||
if (AvRoomDataManager.get().isSelfGamePlaying) {
|
||||
avRoomActivity.dialogManager.showOkCancelDialog(
|
||||
|
@@ -91,7 +91,6 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
private AppCompatImageView mIvGoodNumber;
|
||||
|
||||
private ImageView roomMore;
|
||||
private ImageView ivRoomShare;
|
||||
private GiftV2View giftView;
|
||||
private ViewStub mVsGift2View;
|
||||
|
||||
@@ -150,12 +149,6 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
roomTitle = mView.findViewById(R.id.room_title);
|
||||
setupRoomTitleMarquee();
|
||||
roomMore = mView.findViewById(R.id.room_more);
|
||||
ivRoomShare = mView.findViewById(R.id.iv_room_share);
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
ivRoomShare.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
ivRoomShare.setVisibility(View.VISIBLE);
|
||||
}
|
||||
roomId = mView.findViewById(R.id.room_id);
|
||||
mVsGift2View = mView.findViewById(R.id.vs_gift_view);
|
||||
mIvGoodNumber = mView.findViewById(R.id.iv_good_number);
|
||||
@@ -189,7 +182,6 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
public void onSetListener() {
|
||||
roomMore.setOnClickListener(this);
|
||||
ivFollowRoom.setOnClickListener(this);
|
||||
ivRoomShare.setOnClickListener(this);
|
||||
gameMainBinding.llRoomInfo.setOnClickListener(this);
|
||||
gameMainBinding.ivBack.setOnClickListener(this);
|
||||
}
|
||||
@@ -483,9 +475,6 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
case R.id.ll_room_info:
|
||||
RoomOnlineUserActivity.start(getActivity());
|
||||
break;
|
||||
case R.id.iv_room_share:
|
||||
shareRoom();
|
||||
break;
|
||||
case R.id.iv_follow_room:
|
||||
followRoom();
|
||||
break;
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_room_share.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
@@ -1,123 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/blue">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
<com.github.mmin18.widget.RealtimeBlurView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/blue">
|
||||
app:realtimeBlurRadius="20dp"
|
||||
app:realtimeDownsampleFactor="3"
|
||||
app:realtimeOverlayColor="#B3020023" />
|
||||
|
||||
<!-- <ImageView
|
||||
android:id="@+id/iv_blur"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY" />-->
|
||||
<LinearLayout
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="52dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.github.mmin18.widget.RealtimeBlurView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:realtimeBlurRadius="20dp"
|
||||
app:realtimeDownsampleFactor="3"
|
||||
app:realtimeOverlayColor="#B3020023" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="52dp"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_mini_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_mini"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="收起房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_report"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_report"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="举报房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_share_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_share"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="分享房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mini_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_mini"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="收起房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_exit_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_exit"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="退出房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_exit_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_exit"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="退出房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="152dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_report"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_room_report"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="举报房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="252dp"
|
||||
android:text="为你推荐"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="277dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="20dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_empty"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="152dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="152dp"
|
||||
android:text="为你推荐"
|
||||
android:text="努力寻找合适房间中..."
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="177dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="20dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_empty"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="152dp"
|
||||
<TextView
|
||||
android:id="@+id/tv_more"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="努力寻找合适房间中..."
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_more"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
</FrameLayout>
|
||||
|
@@ -203,14 +203,6 @@
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_room_like" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_room_share"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_share_white" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_more"
|
||||
android:layout_width="30dp"
|
||||
|