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