移除kotlin-android-extensions
This commit is contained in:
@@ -2,7 +2,6 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
|
||||||
apply plugin: 'com.huawei.agconnect'
|
apply plugin: 'com.huawei.agconnect'
|
||||||
apply plugin: 'com.tencent.vasdolly'
|
apply plugin: 'com.tencent.vasdolly'
|
||||||
apply from: '../mob.gradle'
|
apply from: '../mob.gradle'
|
||||||
|
@@ -17,7 +17,6 @@ import com.mango.core.manager.AvRoomDataManager
|
|||||||
import com.mango.core.room.anotherroompk.RoomPKModel
|
import com.mango.core.room.anotherroompk.RoomPKModel
|
||||||
import com.mango.core.room.anotherroompk.SimpleRoomInfo
|
import com.mango.core.room.anotherroompk.SimpleRoomInfo
|
||||||
import com.mango.core.utils.toast
|
import com.mango.core.utils.toast
|
||||||
import kotlinx.android.synthetic.main.activity_give_gold_search.*
|
|
||||||
|
|
||||||
class RoomPKSearchActivity : BaseViewBindingActivity<ActivityRoomPkSearchBinding>() {
|
class RoomPKSearchActivity : BaseViewBindingActivity<ActivityRoomPkSearchBinding>() {
|
||||||
|
|
||||||
|
@@ -3,48 +3,43 @@ package com.mango.moshen.pay.activity
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.yinyuan.doudou.pay.activity.GiveGoldSearchActivity
|
|
||||||
import com.yinyuan.doudou.pay.adapter.LatelyGiveAdapter
|
|
||||||
import com.mango.moshen.R
|
|
||||||
import com.mango.moshen.base.BaseActivity
|
|
||||||
import com.mango.moshen.common.EmptyViewHelper
|
|
||||||
import com.mango.core.room.bean.SearchRoomInfo
|
import com.mango.core.room.bean.SearchRoomInfo
|
||||||
import com.mango.core.user.UserModel
|
import com.mango.core.user.UserModel
|
||||||
import com.mango.core.user.bean.UserInfo
|
import com.mango.core.user.bean.UserInfo
|
||||||
import kotlinx.android.synthetic.main.activity_give_gold.*
|
import com.mango.moshen.base.BaseViewBindingActivity
|
||||||
|
import com.mango.moshen.common.EmptyViewHelper
|
||||||
|
import com.mango.moshen.databinding.ActivityGiveGoldBinding
|
||||||
|
import com.yinyuan.doudou.pay.adapter.LatelyGiveAdapter
|
||||||
|
|
||||||
|
|
||||||
class GiveGoldActivity : BaseActivity() {
|
class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
|
||||||
|
|
||||||
private lateinit var adapter: LatelyGiveAdapter
|
private lateinit var adapter: LatelyGiveAdapter
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun init() {
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_give_gold)
|
|
||||||
initTitleBar("钻石转赠")
|
initTitleBar("钻石转赠")
|
||||||
recyclerView.layoutManager = LinearLayoutManager(this)
|
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||||
adapter = LatelyGiveAdapter()
|
adapter = LatelyGiveAdapter()
|
||||||
adapter.bindToRecyclerView(recyclerView)
|
adapter.bindToRecyclerView(binding.recyclerView)
|
||||||
adapter.emptyView = EmptyViewHelper.createEmptyView(this, "暂无数据")
|
adapter.emptyView = EmptyViewHelper.createEmptyView(this, "暂无数据")
|
||||||
adapter.setOnItemClickListener { _, _, position ->
|
adapter.setOnItemClickListener { _, _, position ->
|
||||||
adapter.getItem(position)?.let {
|
adapter.getItem(position)?.let {
|
||||||
GiveGoldToUserActivity.start(this, it)
|
GiveGoldToUserActivity.start(this, it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llSearch.setOnClickListener { GiveGoldSearchActivity.start(this) }
|
binding.llSearch.setOnClickListener { GiveGoldSearchActivity.start(this) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
UserModel.get().giveUserList
|
UserModel.get().giveUserList
|
||||||
.compose(bindToLifecycle())
|
.compose(bindToLifecycle())
|
||||||
.doOnError { toast(it.message) }
|
.doOnError { toast(it.message) }
|
||||||
.subscribe { users ->
|
.subscribe { users ->
|
||||||
adapter.setNewData(users.filterNotNull())
|
adapter.setNewData(users.filterNotNull())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
@@ -1,26 +1,22 @@
|
|||||||
package com.yinyuan.doudou.pay.activity
|
package com.mango.moshen.pay.activity
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
import android.text.TextWatcher
|
import android.text.TextWatcher
|
||||||
import com.yinyuan.doudou.pay.adapter.GiveSearchAdapter
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.mango.moshen.R
|
|
||||||
import com.mango.moshen.base.BaseActivity
|
|
||||||
import com.mango.moshen.common.EmptyViewHelper
|
|
||||||
import com.mango.moshen.ui.utils.RVDelegate
|
|
||||||
import com.mango.core.room.bean.SearchRoomInfo
|
import com.mango.core.room.bean.SearchRoomInfo
|
||||||
import com.mango.core.room.model.AvRoomModel
|
import com.mango.core.room.model.AvRoomModel
|
||||||
import com.mango.core.utils.net.RxHelper
|
import com.mango.core.utils.net.RxHelper
|
||||||
|
import com.mango.moshen.base.BaseViewBindingActivity
|
||||||
|
import com.mango.moshen.common.EmptyViewHelper
|
||||||
|
import com.mango.moshen.databinding.ActivityGiveGoldSearchBinding
|
||||||
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
|
import com.yinyuan.doudou.pay.adapter.GiveSearchAdapter
|
||||||
|
|
||||||
|
class GiveGoldSearchActivity : BaseViewBindingActivity<ActivityGiveGoldSearchBinding>(), TextWatcher {
|
||||||
import kotlinx.android.synthetic.main.activity_give_gold_search.*
|
|
||||||
|
|
||||||
class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val REQUEST_CODE = 0xff12
|
const val REQUEST_CODE = 0xff12
|
||||||
@@ -34,17 +30,15 @@ class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
|||||||
|
|
||||||
private lateinit var rvDelegate: RVDelegate<SearchRoomInfo>
|
private lateinit var rvDelegate: RVDelegate<SearchRoomInfo>
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun init() {
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_give_gold_search)
|
|
||||||
val adapter = GiveSearchAdapter()
|
val adapter = GiveSearchAdapter()
|
||||||
rvDelegate = RVDelegate.Builder<SearchRoomInfo>()
|
rvDelegate = RVDelegate.Builder<SearchRoomInfo>()
|
||||||
.setPageSize(Int.MAX_VALUE)
|
.setPageSize(Int.MAX_VALUE)
|
||||||
.setEmptyView(EmptyViewHelper.createEmptyView(this, "暂无搜索内容"))
|
.setEmptyView(EmptyViewHelper.createEmptyView(this, "暂无搜索内容"))
|
||||||
.setLayoutManager(LinearLayoutManager(this))
|
.setLayoutManager(LinearLayoutManager(this))
|
||||||
.setRecyclerView(recyclerView)
|
.setRecyclerView(binding.recyclerView)
|
||||||
.setAdapter(adapter)
|
.setAdapter(adapter)
|
||||||
.build()
|
.build()
|
||||||
adapter.setOnItemClickListener { _, _, position ->
|
adapter.setOnItemClickListener { _, _, position ->
|
||||||
setResult(Activity.RESULT_OK, Intent().apply {
|
setResult(Activity.RESULT_OK, Intent().apply {
|
||||||
adapter.getItem(position)?.let {
|
adapter.getItem(position)?.let {
|
||||||
@@ -53,8 +47,8 @@ class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
|||||||
})
|
})
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
editSearch.addTextChangedListener(this)
|
binding.editSearch.addTextChangedListener(this)
|
||||||
tvCancel.setOnClickListener { finish() }
|
binding.tvCancel.setOnClickListener { finish() }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun afterTextChanged(s: Editable?) {
|
override fun afterTextChanged(s: Editable?) {
|
||||||
|
@@ -1,14 +1,12 @@
|
|||||||
package com.mango.moshen.pay.activity
|
package com.mango.moshen.pay.activity
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import com.mango.moshen.base.BaseViewBindingActivity
|
||||||
import com.mango.moshen.R
|
import com.mango.moshen.databinding.ActivityGiveGoldSuccessBinding
|
||||||
import com.mango.moshen.base.BaseActivity
|
|
||||||
|
|
||||||
import kotlinx.android.synthetic.main.activity_give_gold_success.*
|
class GiveGoldSuccessActivity : BaseViewBindingActivity<ActivityGiveGoldSuccessBinding>() {
|
||||||
|
|
||||||
class GiveGoldSuccessActivity : BaseActivity() {
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -20,13 +18,12 @@ class GiveGoldSuccessActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
@SuppressLint("SetTextI18n")
|
||||||
super.onCreate(savedInstanceState)
|
override fun init() {
|
||||||
setContentView(R.layout.activity_give_gold_success)
|
initTitleBar("转赠到魔力帐号")
|
||||||
initTitleBar("转赠到寻梦帐号")
|
binding.tvNickname.text = "转赠给:${intent.getStringExtra("nickname")}"
|
||||||
tvNickname.text = "转赠给:${intent.getStringExtra("nickname")}"
|
binding.tvGold.text = "${intent.getStringExtra("gold")?.toInt()}钻石"
|
||||||
tvGold.text = "${intent.getStringExtra("gold")?.toInt()}钻石"
|
binding.tvSure.setOnClickListener { finish() }
|
||||||
tvSure.setOnClickListener { finish() }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -7,17 +7,16 @@ import android.os.Bundle
|
|||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
import android.text.TextWatcher
|
import android.text.TextWatcher
|
||||||
import com.jungly.gridpasswordview.GridPasswordView
|
import com.jungly.gridpasswordview.GridPasswordView
|
||||||
import com.mango.moshen.R
|
|
||||||
import com.mango.moshen.base.BaseActivity
|
|
||||||
import com.mango.moshen.pay.password.GiveGoldPassWordFragment
|
|
||||||
import com.mango.moshen.ui.utils.ImageLoadUtils
|
|
||||||
import com.mango.core.DemoCache
|
import com.mango.core.DemoCache
|
||||||
import com.mango.core.pay.PayModel
|
import com.mango.core.pay.PayModel
|
||||||
import com.mango.core.user.bean.UserInfo
|
import com.mango.core.user.bean.UserInfo
|
||||||
|
import com.mango.moshen.base.BaseViewBindingActivity
|
||||||
|
import com.mango.moshen.databinding.ActivityGiveGoldToUserBinding
|
||||||
|
import com.mango.moshen.pay.password.GiveGoldPassWordFragment
|
||||||
|
import com.mango.moshen.ui.utils.ImageLoadUtils
|
||||||
|
|
||||||
import kotlinx.android.synthetic.main.activity_give_gold_to_user.*
|
|
||||||
|
|
||||||
class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChangedListener, TextWatcher {
|
class GiveGoldToUserActivity : BaseViewBindingActivity<ActivityGiveGoldToUserBinding>(), GridPasswordView.OnPasswordChangedListener, TextWatcher {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -33,24 +32,23 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
|||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_give_gold_to_user)
|
|
||||||
userInfo = intent.getSerializableExtra("user") as UserInfo?
|
userInfo = intent.getSerializableExtra("user") as UserInfo?
|
||||||
init()
|
init()
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
private fun init() {
|
override fun init() {
|
||||||
initTitleBar("转赠到寻梦帐号")
|
initTitleBar("转赠到魔力帐号")
|
||||||
userInfo?.apply {
|
userInfo?.apply {
|
||||||
tvId.text = "Id:${erbanNo}"
|
binding.tvId.text = "Id:${erbanNo}"
|
||||||
tvNickname.text = nick
|
binding.tvNickname.text = nick
|
||||||
ImageLoadUtils.loadAvatar(context, avatar, ivAvatar)
|
ImageLoadUtils.loadAvatar(context, avatar, binding.ivAvatar)
|
||||||
val initInfo = DemoCache.readInitInfo()
|
val initInfo = DemoCache.readInitInfo()
|
||||||
editGold.hint = if (initInfo.redEnvelopeConfig.rate == 0.0) "请输入转赠钻石数量" else "请输入转赠钻石数量,需为10倍数"
|
binding.editGold.hint = if (initInfo.redEnvelopeConfig.rate == 0.0) "请输入转赠钻石数量" else "请输入转赠钻石数量,需为10倍数"
|
||||||
tv_desc.text = if (initInfo.redEnvelopeConfig.rate == 0.0) "钻石" else "钻石,另将收取一定比例手续费"
|
binding.tvDesc.text = if (initInfo.redEnvelopeConfig.rate == 0.0) "钻石" else "钻石,另将收取一定比例手续费"
|
||||||
|
|
||||||
tvSure.setOnClickListener {
|
binding.tvSure.setOnClickListener {
|
||||||
var gold = editGold.text.toString().toInt()
|
var gold = binding.editGold.text.toString().toInt()
|
||||||
if (gold <= 0) {
|
if (gold <= 0) {
|
||||||
toast("请输入正确钻石数量")
|
toast("请输入正确钻石数量")
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
@@ -63,20 +61,21 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tvCoin.text = PayModel.get().currentWalletInfo?.canGiveGoldNum?.toString() ?: "0"
|
binding.tvCoin.text = PayModel.get().currentWalletInfo?.canGiveGoldNum?.toString() ?: "0"
|
||||||
editGold.addTextChangedListener(this)
|
binding.editGold.addTextChangedListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
override fun onInputFinish(psw: String) {
|
override fun onInputFinish(psw: String) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
override fun onTextChanged(psw: String) {
|
override fun onTextChanged(psw: String) {
|
||||||
val password = passWordFragment?.password?.password ?: ""
|
val password = passWordFragment?.password?.password ?: ""
|
||||||
if (password.length == 6) {
|
if (password.length == 6) {
|
||||||
userInfo?.apply {
|
userInfo?.apply {
|
||||||
dialogManager.showProgressDialog(context)
|
dialogManager.showProgressDialog(context)
|
||||||
PayModel.get().giveGold(uid, editGold.text.toString(), password)
|
PayModel.get().giveGold(uid, binding.editGold.text.toString(), password)
|
||||||
.compose(bindToLifecycle())
|
.compose(bindToLifecycle())
|
||||||
.doOnError {
|
.doOnError {
|
||||||
toast(it.message)
|
toast(it.message)
|
||||||
@@ -87,7 +86,7 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
|||||||
passWordFragment?.dismissAllowingStateLoss()
|
passWordFragment?.dismissAllowingStateLoss()
|
||||||
dialogManager.dismissDialog()
|
dialogManager.dismissDialog()
|
||||||
finish()
|
finish()
|
||||||
GiveGoldSuccessActivity.start(context, editGold.text.toString(), nick)
|
GiveGoldSuccessActivity.start(context, binding.editGold.text.toString(), nick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,11 +100,11 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
|||||||
|
|
||||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||||
if (s.isNullOrBlank()) {
|
if (s.isNullOrBlank()) {
|
||||||
editGold.textSize = 15f
|
binding.editGold.textSize = 15f
|
||||||
tvSure.isEnabled = false
|
binding.tvSure.isEnabled = false
|
||||||
} else {
|
} else {
|
||||||
editGold.textSize = 35f
|
binding.editGold.textSize = 35f
|
||||||
tvSure.isEnabled = true
|
binding.tvSure.isEnabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,157 +0,0 @@
|
|||||||
//package com.mango.moshen.ui.im.friend
|
|
||||||
//
|
|
||||||
//import android.app.Activity
|
|
||||||
//import android.os.Bundle
|
|
||||||
//import android.support.v7.widget.LinearLayoutManager
|
|
||||||
//import com.mango.moshen.R
|
|
||||||
//import com.mango.moshen.base.BaseFragment
|
|
||||||
//import com.mango.moshen.friend.action.AbstractSelectFriendAction
|
|
||||||
//import com.mango.moshen.friend.view.SelectFriendActivity
|
|
||||||
//import com.moshen.core.Constants.IS_SEND
|
|
||||||
//import com.moshen.core.im.friend.IMFriendModel
|
|
||||||
//import com.moshen.core.manager.IMNetEaseManager
|
|
||||||
//import com.moshen.core.manager.RelationShipEvent
|
|
||||||
//import com.moshen.core.user.UserModel
|
|
||||||
//import com.moshen.core.user.bean.UserInfo
|
|
||||||
//import com.moshen.xchat_android_library.utils.ListUtils
|
|
||||||
//import kotlinx.android.synthetic.main.fragment_fans_list.*
|
|
||||||
//import org.greenrobot.eventbus.EventBus
|
|
||||||
//import org.greenrobot.eventbus.Subscribe
|
|
||||||
//import org.greenrobot.eventbus.ThreadMode
|
|
||||||
//import java.util.*
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * 好友列表界面
|
|
||||||
// *
|
|
||||||
// * @author chenran
|
|
||||||
// * @date 2017/9/18
|
|
||||||
// */
|
|
||||||
//class FriendListFragmentKotlin : BaseFragment() {
|
|
||||||
// private var adapter: PublicChatHallFriendListAdapter? = null
|
|
||||||
// private var selectFriendActivity: SelectFriendActivity? = null
|
|
||||||
// private var type: Int = AbstractSelectFriendAction.TYPE_NORMAL
|
|
||||||
//
|
|
||||||
// companion object {
|
|
||||||
// fun newInstance(boolean: Boolean, type: Int): FriendListFragmentKotlin {
|
|
||||||
// val friendListFragment = FriendListFragmentKotlin()
|
|
||||||
// var bundle = Bundle()
|
|
||||||
// bundle.putBoolean(IS_SEND, boolean)
|
|
||||||
// bundle.putInt(AbstractSelectFriendAction.KEY_TYPE, type)
|
|
||||||
// friendListFragment.setArguments(bundle)
|
|
||||||
// return friendListFragment
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun onAttach(activity: Activity?) {
|
|
||||||
// super.onAttach(activity)
|
|
||||||
// if (activity is SelectFriendActivity) {
|
|
||||||
// selectFriendActivity = activity
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
// super.onCreate(savedInstanceState)
|
|
||||||
// EventBus.getDefault().register(this)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun onDestroy() {
|
|
||||||
// super.onDestroy()
|
|
||||||
// EventBus.getDefault().unregister(this)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun onFindViews() {
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun onSetListener() {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun initiate() {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// swipe_refresh!!.setOnRefreshListener {
|
|
||||||
// swipe_refresh!!.isRefreshing = true
|
|
||||||
// loadFriends()
|
|
||||||
// swipe_refresh!!.isRefreshing = false
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// adapter = PublicChatHallFriendListAdapter(activity)
|
|
||||||
// if (arguments != null) {
|
|
||||||
// adapter!!.setType(arguments?.getInt(AbstractSelectFriendAction.KEY_TYPE,
|
|
||||||
// AbstractSelectFriendAction.TYPE_NORMAL)!!)
|
|
||||||
// }
|
|
||||||
// adapter!!.setRylListener(object : PublicChatHallFriendListAdapter.OnItemClickListener {
|
|
||||||
// override fun sendListener(attentionInfo: UserInfo?) {
|
|
||||||
// if (selectFriendActivity != null) {
|
|
||||||
// selectFriendActivity!!.showSureDialog(attentionInfo!!.uid.toString(), attentionInfo!!.avatar, attentionInfo!!.nick)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// })
|
|
||||||
// recycler_view!!.layoutManager = LinearLayoutManager(activity)
|
|
||||||
// recycler_view!!.adapter = adapter
|
|
||||||
//
|
|
||||||
// loadFriends()
|
|
||||||
//
|
|
||||||
// val d = IMNetEaseManager.get().relationShipEventObservable.subscribe(this::onGetRelationShipEvent)
|
|
||||||
// mCompositeDisposable.add(d)
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun onGetRelationShipEvent(event: RelationShipEvent) {
|
|
||||||
// if (event.event == RelationShipEvent.EVENT_FRIEND_UPDATE) {
|
|
||||||
// onFriendListUpdate(event.accounts)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun loadFriends() {
|
|
||||||
// onFriendListUpdate(IMFriendModel.get().myFriendsAccounts)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun getRootLayoutId(): Int {
|
|
||||||
// return R.layout.fragment_fans_list
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //@CoreEvent(coreClientClass = IIMFriendCoreClient::class)
|
|
||||||
// private fun onFriendListUpdate(accounts: List<String>?) {
|
|
||||||
// if (ListUtils.isListEmpty(accounts)) {
|
|
||||||
// showNoData(getString(R.string.no_frenids_text))
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// val ids = ArrayList<Long>(accounts!!.size)
|
|
||||||
// accounts.mapTo(destination = ids) { java.lang.Long.valueOf(it) }
|
|
||||||
// val mapByUidList = UserModel.get().getCacheThenServerUserInfoMapByUidList(ids)
|
|
||||||
// onRequestUserInfoMap(mapByUidList)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun setData(userInfos: List<UserInfo>?) {
|
|
||||||
// if (userInfos != null && userInfos.isNotEmpty()) {
|
|
||||||
// hideStatus()
|
|
||||||
// adapter!!.friendList = userInfos
|
|
||||||
// adapter!!.notifyDataSetChanged()
|
|
||||||
// } else {
|
|
||||||
// showNoData(getString(R.string.no_frenids_text))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
// fun onCurrentUserInfoUpdate(userInfo: UserInfo) {
|
|
||||||
// recycler_view!!.postDelayed({
|
|
||||||
// onFriendListUpdate(IMFriendModel.get().myFriendsAccounts)
|
|
||||||
// }, 250)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
// fun onRequestUserInfoMap(userInfoLinkedHashMap: LinkedHashMap<Long, UserInfo>?) {
|
|
||||||
// hideStatus()
|
|
||||||
// var userInfos: MutableList<UserInfo>? = if (adapter == null) null else adapter!!.friendList
|
|
||||||
// if (userInfoLinkedHashMap != null && userInfoLinkedHashMap.size > 0) {
|
|
||||||
// userInfos = ArrayList(userInfoLinkedHashMap.size)
|
|
||||||
// val entries = userInfoLinkedHashMap.entries
|
|
||||||
// for ((_, value) in entries) {
|
|
||||||
// userInfos.add(value)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// setData(userInfos)
|
|
||||||
// }
|
|
||||||
//}
|
|
@@ -87,6 +87,7 @@
|
|||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@@ -1,7 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'realm-android'
|
apply plugin: 'realm-android'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
|
||||||
apply from: '../mob.gradle'
|
apply from: '../mob.gradle'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
|
Reference in New Issue
Block a user