新增公会超管
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 937 B After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 1.2 KiB |
@@ -93,10 +93,10 @@
|
||||
|
||||
<meta-data
|
||||
android:name="design_width_in_dp"
|
||||
android:value="375"/>
|
||||
android:value="375" />
|
||||
<meta-data
|
||||
android:name="design_height_in_dp"
|
||||
android:value="667"/>
|
||||
android:value="667" />
|
||||
|
||||
<meta-data
|
||||
android:name="CHANNEL"
|
||||
@@ -1221,17 +1221,28 @@
|
||||
|
||||
<activity
|
||||
android:name="com.idlefish.flutterboost.containers.FlutterBoostActivity"
|
||||
android:theme="@style/Theme.AppCompat"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
|
||||
android:hardwareAccelerated="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/bg_flutter_splash"/>
|
||||
android:theme="@style/Theme.AppCompat"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/bg_flutter_splash" />
|
||||
|
||||
</activity>
|
||||
<meta-data android:name="flutterEmbedding"
|
||||
android:value="2">
|
||||
</meta-data>
|
||||
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2"/>
|
||||
|
||||
<activity
|
||||
android:name=".module_hall.hall.activity.SuperAdminManageActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".module_hall.hall.activity.SuperAdminAddActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".module_hall.hall.activity.SuperAdminRoomSetActivity" />
|
||||
|
||||
</application>
|
||||
|
||||
|
@@ -246,6 +246,13 @@ public class ModuleClanActivity extends BaseActivity implements View.OnClickList
|
||||
toast("数据加载中,请稍后...");
|
||||
}
|
||||
break;
|
||||
case R.id.tv_hall_admin:
|
||||
if (clanInfo != null) {
|
||||
SuperAdminManageActivity.start(this,clanInfo.getId());
|
||||
} else {
|
||||
toast("数据加载中,请稍后...");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,80 @@
|
||||
package com.yizhuan.erban.module_hall.hall.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.ActivitySuperAdminAddBinding
|
||||
import com.yizhuan.erban.module_hall.hall.adapter.SearchAdminAdapter
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.HallModel
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminInfo
|
||||
import com.yizhuan.xchat_android_core.utils.toast
|
||||
|
||||
class SuperAdminAddActivity : BaseViewBindingActivity<ActivitySuperAdminAddBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context, clanId: Long) {
|
||||
val starter = Intent(context, SuperAdminAddActivity::class.java)
|
||||
starter.putExtra("clanId", clanId)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
private val adminAdapter = SearchAdminAdapter()
|
||||
private lateinit var rvDelegate: RVDelegate<SuperAdminInfo>
|
||||
private val clanId by lazy { intent.getLongExtra("clanId", 0) }
|
||||
|
||||
override fun init() {
|
||||
|
||||
rvDelegate = RVDelegate.Builder<SuperAdminInfo>()
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "没有搜索结果"))
|
||||
.setAdapter(adminAdapter)
|
||||
.build()
|
||||
|
||||
adminAdapter.setOnItemChildClickListener { _, view, position ->
|
||||
if (view.id == R.id.tv_set) {
|
||||
adminAdapter.getItem(position)?.let {
|
||||
SuperAdminRoomSetActivity.start(this, clanId, it.uid)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvSearch.setOnClickListener {
|
||||
val id = binding.searchEdit.text?.toString()?.toLongOrNull()
|
||||
if (id == null) {
|
||||
"请输入音游号!".toast()
|
||||
} else {
|
||||
HallModel.get().searchSuperAdminInfo(id)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
rvDelegate.setNewData(listOf(it))
|
||||
}, {
|
||||
it.message.toast()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
binding.ivBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
binding.ivClearText.setOnClickListener {
|
||||
binding.searchEdit.setText("")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
package com.yizhuan.erban.module_hall.hall.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.ActivitySuperAdminManegeBinding
|
||||
import com.yizhuan.erban.module_hall.hall.adapter.ManageSuperAdminAdapter
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminInfo
|
||||
|
||||
class SuperAdminManageActivity : BaseViewBindingActivity<ActivitySuperAdminManegeBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context, clanId: Long) {
|
||||
val starter = Intent(context, SuperAdminManageActivity::class.java)
|
||||
starter.putExtra("clanId", clanId)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
private val adminAdapter = ManageSuperAdminAdapter()
|
||||
private lateinit var rvDelegate: RVDelegate<SuperAdminInfo>
|
||||
private val pageSize = 20
|
||||
private val clanId by lazy { intent.getLongExtra("clanId", 0) }
|
||||
|
||||
override fun init() {
|
||||
|
||||
initWhiteTitleBar("公会超管设置")
|
||||
rvDelegate = RVDelegate.Builder<SuperAdminInfo>()
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setPageSize(pageSize)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无超级管理员"))
|
||||
.setAdapter(adminAdapter)
|
||||
.build()
|
||||
|
||||
binding.tvAddSuperAdmin.setOnClickListener {
|
||||
SuperAdminAddActivity.start(this, clanId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
}
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
package com.yizhuan.erban.module_hall.hall.activity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.ActivitySuperAdminRoomSetBinding
|
||||
import com.yizhuan.erban.module_hall.hall.adapter.ManageRoomSetAdapter
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.HallModel
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminHall
|
||||
import com.yizhuan.xchat_android_core.utils.toast
|
||||
|
||||
class SuperAdminRoomSetActivity : BaseViewBindingActivity<ActivitySuperAdminRoomSetBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context, clanId: Long, uid: Long) {
|
||||
val starter = Intent(context, SuperAdminRoomSetActivity::class.java)
|
||||
starter.putExtra("clanId", clanId)
|
||||
starter.putExtra("uid", uid)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
private val adminAdapter = ManageRoomSetAdapter()
|
||||
private lateinit var rvDelegate: RVDelegate<SuperAdminHall>
|
||||
private val clanId by lazy { intent.getLongExtra("clanId", 0) }
|
||||
private val uid by lazy { intent.getLongExtra("uid", 0) }
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
initWhiteTitleBar("选择管理的房间")
|
||||
rvDelegate = RVDelegate.Builder<SuperAdminHall>()
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无房间"))
|
||||
.setAdapter(adminAdapter)
|
||||
.build()
|
||||
binding.recyclerView.itemAnimator = null
|
||||
adminAdapter.setOnItemChildClickListener { _, view, position ->
|
||||
if (view.id == R.id.iv_check) {
|
||||
adminAdapter.getItem(position)?.let {
|
||||
it.hasManage = !it.hasManage
|
||||
}
|
||||
adminAdapter.notifyItemChanged(position)
|
||||
}
|
||||
}
|
||||
|
||||
HallModel.get().getSuperAdminHallList(clanId, uid)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
rvDelegate.setNewData(it)
|
||||
}, {
|
||||
rvDelegate.loadErr(true)
|
||||
})
|
||||
|
||||
|
||||
|
||||
binding.tvAddSuperAdmin.setOnClickListener {
|
||||
var roomUids = ""
|
||||
adminAdapter.data.forEach {
|
||||
if (it.hasManage) {
|
||||
roomUids += "${it.hallRoomUid},"
|
||||
}
|
||||
}
|
||||
|
||||
if (roomUids.isNotEmpty()) {
|
||||
HallModel.get().setSuperAdmin(roomUids.substring(0, roomUids.length - 1), uid)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
"设置成功".toast()
|
||||
finish()
|
||||
}, {
|
||||
it.message.toast()
|
||||
})
|
||||
} else {
|
||||
"请最少选择一个房间".toast()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package com.yizhuan.erban.module_hall.hall.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminHall
|
||||
|
||||
class ManageRoomAdapter :
|
||||
BaseQuickAdapter<SuperAdminHall, BaseViewHolder>(R.layout.item_manage_room) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SuperAdminHall) {
|
||||
|
||||
ImageLoadUtils.loadAvatar(item.hallAvatar, helper.getView(R.id.iv_avatar))
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.yizhuan.erban.module_hall.hall.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminHall
|
||||
|
||||
class ManageRoomSetAdapter :
|
||||
BaseQuickAdapter<SuperAdminHall, BaseViewHolder>(R.layout.item_manage_room_set) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SuperAdminHall) {
|
||||
ImageLoadUtils.loadAvatar(item.hallAvatar, helper.getView(R.id.iv_avatar))
|
||||
helper.setText(R.id.tv_nickname, item.hallName)
|
||||
.setText(R.id.tv_id, item.hallRoomId)
|
||||
.setImageResource(
|
||||
R.id.iv_check,
|
||||
if (item.hasManage) R.mipmap.common_ic_checked else R.mipmap.common_ic_unchecked
|
||||
)
|
||||
.addOnClickListener(R.id.iv_check)
|
||||
}
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
package com.yizhuan.erban.module_hall.hall.adapter
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminHall
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminInfo
|
||||
|
||||
class ManageSuperAdminAdapter :
|
||||
BaseQuickAdapter<SuperAdminInfo, BaseViewHolder>(R.layout.item_manage_super_admin) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SuperAdminInfo) {
|
||||
ImageLoadUtils.loadAvatar("", helper.getView(R.id.iv_avatar))
|
||||
|
||||
val rvRoom = helper.getView<RecyclerView>(R.id.rv_room)
|
||||
if (rvRoom.adapter == null) {
|
||||
RVDelegate.Builder<SuperAdminHall>()
|
||||
.setLayoutManager(
|
||||
LinearLayoutManager(
|
||||
mContext,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
)
|
||||
.setRecyclerView(rvRoom)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(mContext, "暂无管理的房间"))
|
||||
.setAdapter(ManageRoomAdapter())
|
||||
.build()
|
||||
}
|
||||
(rvRoom.adapter as BaseQuickAdapter<*, *>).setNewData(ArrayList())
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
package com.yizhuan.erban.module_hall.hall.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminInfo
|
||||
|
||||
class SearchAdminAdapter :
|
||||
BaseQuickAdapter<SuperAdminInfo, BaseViewHolder>(R.layout.item_search_admin) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SuperAdminInfo) {
|
||||
|
||||
ImageLoadUtils.loadAvatar(item.avatar, helper.getView(R.id.iv_avatar))
|
||||
helper.setText(R.id.tv_nickname, item.nick)
|
||||
.setText(R.id.tv_id, item.erbanNo)
|
||||
.setText(R.id.tv_set, if (item.hasSet) "已设置为超管" else "设置为超管")
|
||||
.setEnabled(R.id.tv_set, !item.hasSet)
|
||||
.setImageResource(
|
||||
R.id.iv_gender,
|
||||
if (item.gender == 1) R.drawable.ic_gender_male else R.drawable.ic_gender_female
|
||||
)
|
||||
.addOnClickListener(R.id.tv_set)
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 567 B |
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center|start"
|
||||
android:background="@color/transparent"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/arrow_left_white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_weight="1.0"
|
||||
android:background="@drawable/bg_search_edit"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@mipmap/ic_search_main" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="请输入公会成员音游号"
|
||||
android:inputType="text"
|
||||
android:maxLength="20"
|
||||
android:maxLines="1"
|
||||
android:text=""
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_clear_text"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/ic_text_clear" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/search"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_add_super_admin"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:text="添加公会超管"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_add_super_admin"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:text="确认"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
35
app/src/module_labour_union/res/layout/item_manage_room.xml
Normal file
35
app/src/module_labour_union/res/layout/item_manage_room.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
tools:background="@color/bg_secondary_2a2a39">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_room_avatar"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/default_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_room_avatar"
|
||||
tools:text="峨眉峨眉派派" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/bg_secondary_radius_10">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/default_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="女神没有大长腿" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_C6C6E9"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname"
|
||||
tools:text="ID:886887" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_check"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@mipmap/common_ic_checked"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/bg_secondary_radius_10">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
app:cborder_color="@color/text_normal_c6c6e9"
|
||||
app:cborder_width="2dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_id"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="公会会长" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_room_num"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname"
|
||||
tools:text="音游号:886887" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_id"
|
||||
tools:text="公会房间数量:11" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@drawable/ic_hall_manage_more"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_manage_room"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_avatar"
|
||||
tools:text="管理的房间" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_manage_room" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
67
app/src/module_labour_union/res/layout/item_search_admin.xml
Normal file
67
app/src/module_labour_union/res/layout/item_search_admin.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@color/bg_secondary_2a2a39">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:cborder_color="@color/text_normal_c6c6e9"
|
||||
app:cborder_width="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="女神没有大长腿" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_nickname"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_nickname" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_C6C6E9"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname"
|
||||
tools:text="ID:886887" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_set"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:text="设置为超管"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginEnd="15dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -14,6 +14,8 @@ import com.yizhuan.xchat_android_core.module_hall.hall.bean.HallMenuByUidResult;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.ListMemberInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.OptionInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.OwnerHallInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminHall;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.event.UserHallUpdateEvent;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
@@ -287,6 +289,25 @@ public class HallModel extends BaseModel implements IHallModel {
|
||||
.compose(RxHelper.handleCommon());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<List<SuperAdminHall>> getSuperAdminHallList(long clanId, long uid) {
|
||||
return api.getSuperAdminHallList(clanId, uid)
|
||||
.compose(RxHelper.handleCommon());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<SuperAdminInfo> searchSuperAdminInfo(long erbanNo) {
|
||||
return api.searchSuperAdminInfo(erbanNo)
|
||||
.compose(RxHelper.handleCommon());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Single<String> setSuperAdmin(String roomUids ,long uid) {
|
||||
return api.setSuperAdmin(roomUids,uid)
|
||||
.compose(RxHelper.handleStringData());
|
||||
}
|
||||
|
||||
|
||||
private interface Api {
|
||||
/**
|
||||
@@ -444,6 +465,26 @@ public class HallModel extends BaseModel implements IHallModel {
|
||||
@GET("/clan/getUserHallAndClan")
|
||||
Single<ServiceResult<ClanAndHallInfo>> getUserHallAndClan(@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 获取设置超管可以管理的房间列表
|
||||
*/
|
||||
@GET("/hall/superManager/listHallInClan")
|
||||
Single<ServiceResult<List<SuperAdminHall>>> getSuperAdminHallList(@Query("clanId") long clanId, @Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 搜索超管信息
|
||||
*/
|
||||
@GET("/hall/superManager/search")
|
||||
Single<ServiceResult<SuperAdminInfo>> searchSuperAdminInfo(@Query("erbanNo") long erbanNo);
|
||||
|
||||
/**
|
||||
* 设置超管信息
|
||||
* @param roomUids 设置的房间uid,都会隔开
|
||||
* @param uid 需要设置的用户uid
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/hall/superManager/setSuperManage")
|
||||
Single<ServiceResult<String>> setSuperAdmin(@Field("roomUids") String roomUids,@Field("uid") long uid);
|
||||
|
||||
}
|
||||
}
|
@@ -8,6 +8,8 @@ import com.yizhuan.xchat_android_core.module_hall.hall.bean.ApplyResult;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.HallInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.ListMemberInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.OwnerHallInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminHall;
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.bean.SuperAdminInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -73,4 +75,10 @@ public interface IHallModel {
|
||||
Single<ListMemberInfo> getClanAllMembers(long clanId, int page, int pageSize);
|
||||
|
||||
Single<ClanAndHallInfo> getUserHallAndClan(long uid);
|
||||
|
||||
Single<List<SuperAdminHall>> getSuperAdminHallList(long clanId, long uid);
|
||||
|
||||
Single<SuperAdminInfo> searchSuperAdminInfo(long erbanNo);
|
||||
|
||||
Single<String> setSuperAdmin(String roomUids ,long uid);
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
package com.yizhuan.xchat_android_core.module_hall.hall.bean
|
||||
|
||||
data class SuperAdminHall(
|
||||
val hallAvatar: String? = null,
|
||||
val hallName: String? = null,
|
||||
val hallRoomId: String? = null,
|
||||
val hallRoomUid: Long = 0,
|
||||
var hasManage: Boolean = false
|
||||
)
|
@@ -0,0 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.module_hall.hall.bean
|
||||
|
||||
data class SuperAdminInfo(
|
||||
val avatar: String? = null,
|
||||
val erbanNo: String? = null,
|
||||
val gender: Int = 0,
|
||||
var hasSet: Boolean = false,
|
||||
val nick: String? = null,
|
||||
val uid: Long = 0
|
||||
)
|
Reference in New Issue
Block a user