新包部分超管设置提示弹窗
This commit is contained in:
@@ -321,6 +321,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
mBinding.tvHallId.setText("房间ID:" + hallInfo.getHallId() + "");
|
||||
mBinding.tvHallName.setText(hallInfo.getHallName());
|
||||
mBinding.tvHallMemberNum.setText("房间人数:" + hallInfo.getMemberCount());
|
||||
mBinding.tvHallErbanId.setText("音游号:" + hallInfo.getOwnerErbanNo());
|
||||
GlideApp.with(this)
|
||||
.load(hallInfo.getOwnerAvatar())
|
||||
.placeholder(R.drawable.default_avatar)
|
||||
|
@@ -320,16 +320,34 @@
|
||||
android:visibility="gone"
|
||||
tools:text="公会ID:123456" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hall_member_num"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/dp_11"
|
||||
tools:text="房间人数:123" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hall_erban_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/dp_11"
|
||||
tools:text="音游号:1234567" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hall_member_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/dp_11"
|
||||
tools:text="房间人数:123" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -342,6 +360,8 @@
|
||||
android:id="@+id/tv_apply_hall"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/shape_stroke_app_color_1dp"
|
||||
android:gravity="center"
|
||||
|
@@ -43,7 +43,13 @@ class SuperAdminAddActivity : BaseViewBindingActivity<ActivitySuperAdminAddBindi
|
||||
adminAdapter.setOnItemChildClickListener { _, view, position ->
|
||||
if (view.id == R.id.tv_set) {
|
||||
adminAdapter.getItem(position)?.let {
|
||||
SuperAdminRoomSetActivity.start(this, clanId, it.uid)
|
||||
dialogManager.showOkCancelDialog(
|
||||
"确定要添加用户 ${it.nick} (音游ID:${it.erbanNo})为公会超级管理员吗?",
|
||||
true
|
||||
) {
|
||||
SuperAdminRoomSetActivity.start(this, clanId, it.uid)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -95,14 +95,18 @@ class SuperAdminManageActivity : BaseViewBindingActivity<ActivitySuperAdminManeg
|
||||
popupWindow.dismiss()
|
||||
}
|
||||
contentView.findViewById<View>(R.id.tv_remove).setOnClickListener {
|
||||
popupWindow.dismiss()
|
||||
HallModel.get().removeSuperAdmin(superAdminInfo.uid)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
adminAdapter.remove(position)
|
||||
}, {
|
||||
it.message.toast()
|
||||
})
|
||||
dialogManager.showOkCancelDialog("确定要移除 ${superAdminInfo.nick} 的公会超级管理员身份吗?",true) {
|
||||
popupWindow.dismiss()
|
||||
HallModel.get().removeSuperAdmin(superAdminInfo.uid)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
adminAdapter.remove(position)
|
||||
"移除成功".toast()
|
||||
}, {
|
||||
it.message.toast()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
val vLoc = IntArray(2)
|
||||
parent.getLocationInWindow(vLoc)
|
||||
|
@@ -20,10 +20,11 @@ class SuperAdminRoomSetActivity : BaseViewBindingActivity<ActivitySuperAdminRoom
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context, clanId: Long, uid: Long) {
|
||||
fun start(context: Context, clanId: Long, uid: Long, add: Boolean = true) {
|
||||
val starter = Intent(context, SuperAdminRoomSetActivity::class.java)
|
||||
starter.putExtra("clanId", clanId)
|
||||
starter.putExtra("uid", uid)
|
||||
starter.putExtra("add", add)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
@@ -32,10 +33,14 @@ class SuperAdminRoomSetActivity : BaseViewBindingActivity<ActivitySuperAdminRoom
|
||||
private lateinit var rvDelegate: RVDelegate<SuperAdminHall>
|
||||
private val clanId by lazy { intent.getLongExtra("clanId", 0) }
|
||||
private val uid by lazy { intent.getLongExtra("uid", 0) }
|
||||
private val add by lazy { intent.getBooleanExtra("add", true) }
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
initWhiteTitleBar("选择管理的房间")
|
||||
mTitleBar.setLeftClickListener {
|
||||
onBackPressed()
|
||||
}
|
||||
rvDelegate = RVDelegate.Builder<SuperAdminHall>()
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
@@ -60,8 +65,6 @@ class SuperAdminRoomSetActivity : BaseViewBindingActivity<ActivitySuperAdminRoom
|
||||
rvDelegate.loadErr(true)
|
||||
})
|
||||
|
||||
|
||||
|
||||
binding.tvAddSuperAdmin.setOnClickListener {
|
||||
var roomUids = ""
|
||||
adminAdapter.data.forEach {
|
||||
@@ -85,6 +88,19 @@ class SuperAdminRoomSetActivity : BaseViewBindingActivity<ActivitySuperAdminRoom
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (add) {
|
||||
dialogManager.showOkCancelDialog(
|
||||
"此时关闭会导致超管设置不成功确认关闭吗?",
|
||||
true
|
||||
) {
|
||||
super.onBackPressed()
|
||||
}
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
|
Reference in New Issue
Block a user