增加pk模式入口
This commit is contained in:
@@ -87,7 +87,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
true));
|
||||
rvOPtList.setLayoutManager(new FullyGridLayoutManager(getContext(), 4));
|
||||
optAdapter = new OptAdapter(context, null);
|
||||
//addPKAction(optAdapter);
|
||||
addPKAction(optAdapter);
|
||||
addKTVAction(optAdapter);
|
||||
//addGameAction(optAdapter);
|
||||
addRoomLimit(optAdapter);
|
||||
|
@@ -1,34 +0,0 @@
|
||||
//package com.yizhuan.erban.ui.user
|
||||
//
|
||||
//import android.os.Bundle
|
||||
//import com.yizhuan.erban.R
|
||||
//import com.yizhuan.erban.base.BaseActivity
|
||||
//import com.yizhuan.xchat_android_library.utils.config.BasicConfig
|
||||
//import kotlinx.android.synthetic.main.activity_about.*
|
||||
//
|
||||
//class AboutActivityKotlin : BaseActivity() {
|
||||
//
|
||||
// override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// super.onCreate(savedInstanceState)
|
||||
// setContentView(R.layout.activity_about)
|
||||
// initTitleBar("关于66星球")
|
||||
// initView()
|
||||
// initData()
|
||||
// }
|
||||
//
|
||||
// private fun initData() {
|
||||
// versions!!.text = getString(R.string.setting_version, BasicConfig.getLocalVersionName(applicationContext))
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private fun initView() {
|
||||
// }
|
||||
//}
|
||||
fun a(map: Map<String, String>?) {
|
||||
if (map == null) {
|
||||
return
|
||||
}
|
||||
map["123"]
|
||||
println("".javaClass)
|
||||
(("".toDoubleOrNull() ?: 0.0) > 100)
|
||||
}
|
@@ -1,963 +0,0 @@
|
||||
//package com.yizhuan.erban.ui.user
|
||||
//
|
||||
//import android.content.Context
|
||||
//import android.content.Intent
|
||||
//import android.graphics.Color
|
||||
//import android.graphics.drawable.ColorDrawable
|
||||
//import android.graphics.drawable.Drawable
|
||||
//import android.os.Bundle
|
||||
//import android.support.v4.content.ContextCompat
|
||||
//import android.support.v4.widget.NestedScrollView
|
||||
//import android.support.v7.widget.AppCompatButton
|
||||
//import android.support.v7.widget.GridLayoutManager
|
||||
//import android.support.v7.widget.LinearLayoutManager
|
||||
//import android.text.TextUtils
|
||||
//import android.view.LayoutInflater
|
||||
//import android.view.View
|
||||
//import android.view.View.GONE
|
||||
//import android.view.View.VISIBLE
|
||||
//import android.widget.LinearLayout
|
||||
//import android.widget.RelativeLayout
|
||||
//import android.widget.TextView
|
||||
//import com.bumptech.glide.load.resource.bitmap.CenterCrop
|
||||
//import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||
//import com.netease.nim.uikit.common.util.log.LogUtil
|
||||
//import com.netease.nim.uikit.impl.cache.NimUserInfoCache
|
||||
//import com.netease.nim.uikit.support.glide.GlideApp
|
||||
//import com.netease.nimlib.sdk.RequestCallbackWrapper
|
||||
//import com.netease.nimlib.sdk.chatroom.model.ChatRoomKickOutEvent
|
||||
//import com.netease.nimlib.sdk.media.player.AudioPlayer
|
||||
//import com.netease.nimlib.sdk.media.player.OnPlayListener
|
||||
//import com.netease.nimlib.sdk.uinfo.model.NimUserInfo
|
||||
//import com.opensource.svgaplayer.SVGACallback
|
||||
//import com.opensource.svgaplayer.SVGADrawable
|
||||
//import com.opensource.svgaplayer.SVGAParser
|
||||
//import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
//import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
//import com.yizhuan.erban.R
|
||||
//import com.yizhuan.erban.UIHelper
|
||||
//import com.yizhuan.erban.avroom.ButtonItemFactory
|
||||
//import com.yizhuan.erban.avroom.activity.AVRoomActivity
|
||||
//import com.yizhuan.erban.base.BaseBindingActivity
|
||||
//import com.yizhuan.erban.car.activities.CarActivity
|
||||
//import com.yizhuan.erban.common.widget.dialog.CommonPopupDialog
|
||||
//import com.yizhuan.erban.common.widget.dialog.DialogManager
|
||||
//import com.yizhuan.erban.databinding.ActivityUserInfoBinding
|
||||
//import com.yizhuan.erban.decoration.view.DecorationStoreActivity
|
||||
//import com.yizhuan.erban.family.view.activity.FamilyHomeActivity
|
||||
//import com.yizhuan.erban.family.view.activity.FamilyMemberListActivity
|
||||
//import com.yizhuan.erban.family.view.activity.FamilyMemberSearchActivity
|
||||
//import com.yizhuan.erban.ui.im.avtivity.NimFriendModel
|
||||
//import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity
|
||||
//import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity.SYSTEM_MESSAGE_UID
|
||||
//import com.yizhuan.erban.ui.relation.AttentionListActivity
|
||||
//import com.yizhuan.erban.ui.relation.FansListActivity
|
||||
//import com.yizhuan.erban.ui.user.adapter.MyCarAdapter
|
||||
//import com.yizhuan.erban.ui.user.adapter.MyMagicWallAdapter
|
||||
//import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
//import com.yizhuan.erban.ui.widget.ObservableScrollView
|
||||
//import com.yizhuan.erban.utils.RegexUtil
|
||||
//import com.yizhuan.xchat_android_core.Constants
|
||||
//import com.yizhuan.xchat_android_core.audio.AudioPlayAndRecordManager
|
||||
//import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
//import com.yizhuan.xchat_android_core.decoration.car.CarInfo
|
||||
//import com.yizhuan.xchat_android_core.decoration.car.CarInfo.STATUS_OFF_SHELF
|
||||
//import com.yizhuan.xchat_android_core.decoration.car.CarModel
|
||||
//import com.yizhuan.xchat_android_core.family.bean.FamilyInfo
|
||||
//import com.yizhuan.xchat_android_core.family.model.FamilyModel
|
||||
//import com.yizhuan.xchat_android_core.im.friend.IMFriendModel
|
||||
//import com.yizhuan.xchat_android_core.initial.InitModel
|
||||
//import com.yizhuan.xchat_android_core.level.UserLevelVo
|
||||
//import com.yizhuan.xchat_android_core.magic.bean.MagicInfo
|
||||
//import com.yizhuan.xchat_android_core.magic.MagicModel
|
||||
//import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
||||
//import com.yizhuan.xchat_android_core.manager.IMNetEaseManager
|
||||
//import com.yizhuan.xchat_android_core.manager.RoomEvent
|
||||
//import com.yizhuan.xchat_android_core.noble.NobleUtil
|
||||
//import com.yizhuan.xchat_android_core.praise.IPraiseClient
|
||||
//import com.yizhuan.xchat_android_core.praise.PraiseModel
|
||||
//import com.yizhuan.xchat_android_core.room.IRoomCore
|
||||
//import com.yizhuan.xchat_android_core.room.IRoomCoreClient
|
||||
//import com.yizhuan.xchat_android_core.room.bean.RoomInfo
|
||||
//import com.yizhuan.xchat_android_core.user.UserModel
|
||||
//import com.yizhuan.xchat_android_core.user.bean.GiftWallInfo
|
||||
//import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
//import com.yizhuan.xchat_android_core.user.bean.UserPhoto
|
||||
//import com.yizhuan.xchat_android_core.user.event.OtherUserInfoEvent
|
||||
//import com.yizhuan.xchat_android_core.utils.StarUtils
|
||||
//import com.yizhuan.xchat_android_core.utils.net.BeanObserver
|
||||
//import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
//import com.yizhuan.xchat_android_library.coremanager.CoreEvent
|
||||
//import com.yizhuan.xchat_android_library.coremanager.CoreManager
|
||||
//import com.yizhuan.xchat_android_library.utils.ListUtils
|
||||
//import com.yizhuan.xchat_android_library.utils.SizeUtils
|
||||
//import com.yizhuan.xchat_android_library.utils.StringUtils
|
||||
//import com.yizhuan.xchat_android_library.widget.ButtonItem
|
||||
//import kotlinx.android.synthetic.main.activity_user_info.*
|
||||
//import kotlinx.android.synthetic.main.layout_user_car_store.*
|
||||
//import kotlinx.android.synthetic.main.layout_user_family.*
|
||||
//import kotlinx.android.synthetic.main.layout_user_magic_wall.*
|
||||
//import kotlinx.android.synthetic.main.user_info_gift_list_layout.*
|
||||
//import org.greenrobot.eventbus.EventBus
|
||||
//import org.greenrobot.eventbus.Subscribe
|
||||
//import org.greenrobot.eventbus.ThreadMode
|
||||
//import java.net.MalformedURLException
|
||||
//import java.net.URL
|
||||
//import java.util.*
|
||||
//
|
||||
///**
|
||||
// * 用户中心
|
||||
// *
|
||||
// * @author zhouxiangfeng
|
||||
// * @date 2017/5/24
|
||||
// */
|
||||
//@ActLayoutRes(R.layout.activity_user_info)
|
||||
//class UserInfoActivity : BaseBindingActivity<ActivityUserInfoBinding>(),
|
||||
// View.OnClickListener, UserPhotoAdapter.ImageClickListener,
|
||||
// ObservableScrollView.ScrollViewListener {
|
||||
//
|
||||
// override fun init() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private var userInfo: UserInfo? = null
|
||||
// private var userId: Long = 0
|
||||
// private var mRoomInfo: RoomInfo? = null
|
||||
// private var audioPlayer: AudioPlayer? = null
|
||||
// private var audioManager: AudioPlayAndRecordManager? = null
|
||||
//
|
||||
// private var bottomViewLayout: LinearLayout? = null
|
||||
// private var sendMsgLayout: TextView? = null
|
||||
// private var attentionLayout: TextView? = null
|
||||
//
|
||||
// private var userInfoCarNoText: TextView? = null
|
||||
// private var userInfoCarBuyNow: AppCompatButton? = null
|
||||
// private var emptyView: LinearLayout? = null
|
||||
//
|
||||
// private var adapter: GiftWallAdapter? = null
|
||||
// private var mActivity: UserInfoActivity? = null
|
||||
// private var mIslike: Boolean = false
|
||||
// private var mAttenDrawable: Drawable? = null
|
||||
//
|
||||
// private var mCarListAdapter: MyCarAdapter? = null
|
||||
// private var mMagicListAdapter: MyMagicWallAdapter? = null
|
||||
//
|
||||
// private var playState = PlayState.NORMAL
|
||||
// private var flag = 0
|
||||
// private var mSVGAParser: SVGAParser? = null
|
||||
// private var isNoble: Boolean = false
|
||||
//
|
||||
// private var onPlayListener: OnPlayListener? = object : OnPlayListener {
|
||||
//
|
||||
// // 音频转码解码完成,会马上开始播放了
|
||||
// override fun onPrepared() {}
|
||||
//
|
||||
// // 播放结束
|
||||
// override fun onCompletion() {
|
||||
// playState = PlayState.NORMAL
|
||||
// showByPlayState()
|
||||
// }
|
||||
//
|
||||
// // 播放被中断了
|
||||
// override fun onInterrupt() {
|
||||
// playState = PlayState.NORMAL
|
||||
// showByPlayState()
|
||||
// }
|
||||
//
|
||||
// // 播放过程中出错。参数为出错原因描述
|
||||
// override fun onError(error: String) {
|
||||
// playState = PlayState.NORMAL
|
||||
// showByPlayState()
|
||||
// }
|
||||
//
|
||||
// // 播放进度报告,每隔 500ms 会回调一次,告诉当前进度。 参数为当前进度,单位为毫秒,可用于更新 UI
|
||||
// override fun onPlaying(curPosition: Long) {}
|
||||
// }
|
||||
//
|
||||
//
|
||||
// override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// super.onCreate(savedInstanceState)
|
||||
// mActivity = this
|
||||
// onFindViews()
|
||||
// onSetListener()
|
||||
// userId = intent.getLongExtra("userId", 0)
|
||||
//
|
||||
// EventBus.getDefault().register(this)
|
||||
//
|
||||
// UserModel.get().getUserInfo(userId, true)
|
||||
// .subscribe { userInfo ->
|
||||
// this.userInfo = userInfo
|
||||
// if (userInfo!!.carInfo != null && userInfo.carInfo!!.isUsing) {
|
||||
// try {
|
||||
// mSVGAParser!!.parse(URL(userInfo.carInfo!!.effect),
|
||||
// object : SVGAParser.ParseCompletion {
|
||||
// override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
// user_info_svga_car.visibility = VISIBLE
|
||||
// user_info_svga_car.loops = 1
|
||||
// val drawable = SVGADrawable(videoItem)
|
||||
// user_info_svga_car.setImageDrawable(drawable)
|
||||
// user_info_svga_car.startAnimation()
|
||||
// }
|
||||
//
|
||||
// override fun onError() {
|
||||
// user_info_svga_car.visibility = GONE
|
||||
// }
|
||||
// })
|
||||
// } catch (e: MalformedURLException) {
|
||||
// e.printStackTrace()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// user_info_svga_car!!.callback = object : SVGACallback {
|
||||
// override fun onPause() {}
|
||||
// override fun onRepeat() {}
|
||||
// override fun onStep(frame: Int, percentage: Double) {}
|
||||
// override fun onFinished() {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// mAttenDrawable = ContextCompat.getDrawable(this, R.mipmap-xhdpi.icon_new_attention)
|
||||
//
|
||||
// car_recycler_view.layoutManager =
|
||||
// LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
|
||||
// mCarListAdapter = MyCarAdapter()
|
||||
// mCarListAdapter!!.bindToRecyclerView(car_recycler_view)
|
||||
// mCarListAdapter!!.setOnItemChildClickListener { _, _, position ->
|
||||
// if (AuthModel.get().currentUid == userInfo!!.uid) {
|
||||
// CarActivity.start(this, 1)
|
||||
// } else {
|
||||
// val carInfo = mCarListAdapter!!.data[position]
|
||||
// if (carInfo!!.status == STATUS_OFF_SHELF) {
|
||||
// toast(R.string.car_user_info_off_shelf)
|
||||
// } else {
|
||||
// CarActivity.start(this, 0)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// user_info_svga_car!!.clearAnimation()
|
||||
// user_info_svga_car!!.visibility = GONE
|
||||
// mSVGAParser = SVGAParser(this)
|
||||
//
|
||||
// // 魔法墙
|
||||
// recycler_view_magic_wall.layoutManager =
|
||||
// LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
|
||||
// mMagicListAdapter = MyMagicWallAdapter()
|
||||
// mMagicListAdapter!!.bindToRecyclerView(recycler_view_magic_wall)
|
||||
//
|
||||
// if (AuthModel.get().currentUid == userId) {
|
||||
// tv_send_car!!.text="立即购买"
|
||||
// iv_edit!!.visibility = VISIBLE
|
||||
// tv_attention_count!!.setOnClickListener(this)
|
||||
// tv_user_attention_text!!.setOnClickListener(this)
|
||||
// tv_fans_count!!.setOnClickListener(this)
|
||||
// tv_user_fan_text!!.setOnClickListener(this)
|
||||
// user_where!!.visibility = GONE
|
||||
// if (bottomViewLayout != null)
|
||||
// bottomViewLayout!!.visibility = GONE
|
||||
// } else {
|
||||
// tv_send_car!!.text="送TA一部"
|
||||
// iv_edit!!.visibility = GONE
|
||||
// if (userId == 90003989L || userId == SYSTEM_MESSAGE_UID) {
|
||||
// iv_more!!.visibility = GONE
|
||||
// } else {
|
||||
// iv_more!!.visibility = VISIBLE
|
||||
// }
|
||||
// user_where!!.visibility = VISIBLE
|
||||
//
|
||||
// if (bottomViewLayout == null) {
|
||||
// val view = vs_bottom_layout!!.inflate()
|
||||
// bottomViewLayout = view.findViewById(R.id.bottom_view_layout)
|
||||
// sendMsgLayout = view.findViewById(R.id.send_msg_layout)
|
||||
// attentionLayout = view.findViewById(R.id.attention_layout)
|
||||
// sendMsgLayout!!.setOnClickListener(this)
|
||||
// attentionLayout!!.setOnClickListener(this)
|
||||
// }
|
||||
// bottomViewLayout!!.visibility = VISIBLE
|
||||
// }
|
||||
//
|
||||
// mCompositeDisposable.add(IMNetEaseManager.get().chatRoomEventObservable
|
||||
// .subscribe { roomEvent ->
|
||||
// if (roomEvent != null) {
|
||||
// when (roomEvent.event) {
|
||||
// RoomEvent.KICK_OUT_ROOM -> {
|
||||
// val reason = roomEvent.reason
|
||||
// if (reason != null) {
|
||||
// val kickOutReason = reason.reason
|
||||
// if (kickOutReason == ChatRoomKickOutEvent.ChatRoomKickOutReason.CHAT_ROOM_INVALID) {
|
||||
// user_room!!.visibility = GONE
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// fun onRequestUserInfo(event: OtherUserInfoEvent?) {
|
||||
// val info = event!!.data
|
||||
// if (info!!.uid == userId) {
|
||||
// userInfo = info
|
||||
// initDatas(userInfo)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// fun onCurrentUserInfoUpdate(info: UserInfo?) {
|
||||
// if (info!!.uid == userId) {
|
||||
// userInfo = info
|
||||
// initDatas(userInfo)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun onSetListener() {
|
||||
// iv_edit!!.setOnClickListener(this)
|
||||
// iv_more!!.setOnClickListener(this)
|
||||
// tv_duration!!.setOnClickListener(this)
|
||||
// user_room!!.setOnClickListener(this)
|
||||
//
|
||||
// iv_back!!.setOnClickListener(this)
|
||||
// user_where!!.setOnClickListener(this)
|
||||
// tv_send_car!!.setOnClickListener(this)
|
||||
// }
|
||||
//
|
||||
// override fun needSteepStateBar(): Boolean {
|
||||
// return true
|
||||
// }
|
||||
//
|
||||
// private fun onFindViews() {
|
||||
// audioManager = AudioPlayAndRecordManager.getInstance()
|
||||
// audioPlayer = audioManager!!.getAudioPlayer(null, onPlayListener)
|
||||
//
|
||||
// val mLayoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
|
||||
// photo_recyclerView!!.layoutManager = mLayoutManager
|
||||
//
|
||||
// val manager = GridLayoutManager(recycler_view!!.context, 4)
|
||||
// recycler_view!!.layoutManager = manager
|
||||
//
|
||||
// scroll_view!!.setScrollViewListener(this)
|
||||
// }
|
||||
//
|
||||
// private fun showByPlayState() {
|
||||
// var drawable: Drawable? = null
|
||||
// if (playState == PlayState.NORMAL) {
|
||||
// drawable = ContextCompat.getDrawable(this, R.mipmap-xhdpi.ic_user_info_stop)
|
||||
// } else if (playState == PlayState.PLAYING) {
|
||||
// drawable = ContextCompat.getDrawable(this, R.mipmap-xhdpi.ic_user_info_play)
|
||||
// }
|
||||
// if (drawable != null)
|
||||
// tv_duration!!.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null)
|
||||
// }
|
||||
//
|
||||
// private fun initDatas(userInfo: UserInfo?) {
|
||||
// if (null != userInfo) {
|
||||
// showByPlayState()
|
||||
//
|
||||
// ImageLoadUtils.loadBigAvatar(this, userInfo.avatar, imageView, false)
|
||||
//
|
||||
// CoreManager.getCore(IRoomCore::class.java).requestRoomInfo(userInfo.uid, Constants.PAGE_TYPE_USER_INFO_ACTIVITY)
|
||||
// tv_nick!!.text = userInfo.nick?.replace(Regex(RegexUtil.getNotPrintableStringReg()), "?")
|
||||
// val drawable = ContextCompat.getDrawable(this,
|
||||
// if (userInfo.gender == 1) R.drawable.icon_man else R.drawable.icon_female)
|
||||
// tv_nick!!.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null)
|
||||
//
|
||||
// tv_attention_count!!.text = userInfo.followNum.toString()
|
||||
// tv_fans_count!!.text = userInfo.fansNum.toString()
|
||||
//
|
||||
// //设置家族
|
||||
// if (FamilyInfo.NO_FAMILY_ID == userInfo.familyId || TextUtils.isEmpty(userInfo.familyId)
|
||||
// || InitModel.get().isMarketChecking){
|
||||
// ll_my_family_container.visibility = GONE
|
||||
// } else{
|
||||
// FamilyModel.Instance().loadFamilySimpleInfoV2(userInfo.familyId)
|
||||
// .compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
// .subscribe(object : BeanObserver<FamilyInfo>() {
|
||||
// override fun onErrorMsg(error: String) {
|
||||
// toast(error)
|
||||
// }
|
||||
//
|
||||
// override fun onSuccess(familyInfo: FamilyInfo) {
|
||||
// ll_my_family_container.visibility = VISIBLE
|
||||
// GlideApp.with(mActivity)
|
||||
// .load(familyInfo.familyIcon)
|
||||
// .dontAnimate()
|
||||
// .placeholder(R.drawable.default_cover)
|
||||
// .transforms(CenterCrop(),
|
||||
// RoundedCorners(10))
|
||||
// .error(R.drawable.default_cover)
|
||||
// .into(iv_family_cover)
|
||||
// tv_family_name.text = familyInfo.familyName
|
||||
// tv_family_id.text = String.format(resources.getString(R.string.family_id),familyInfo.familyId)
|
||||
// tv_family_member_count.text = String.format(resources.getString(R.string.family_member_count),familyInfo.memberCount)
|
||||
// ll_my_family.setOnClickListener {
|
||||
// if(intent.extras.getInt("from",1) == FROM_TYPE_NORMAL){
|
||||
// //这里限制循环访问, 例如:家族->个人主页->家族->个人主页->....
|
||||
// FamilyHomeActivity.start(mActivity, familyInfo.familyId)
|
||||
// }else{
|
||||
// onBackPressed()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
//
|
||||
//
|
||||
//// mvpPresenter.loadFamilyData(userInfo.familyId)
|
||||
//// .subscribe(object :SingleObserver<FamilyInfo>{
|
||||
////
|
||||
//// override fun onSubscribe(d: Disposable) {
|
||||
//// mCompositeDisposable.add(d)
|
||||
//// }
|
||||
////
|
||||
//// override fun onSuccess(familyInfo: FamilyInfo) {
|
||||
//// ll_my_family_container.visibility = VISIBLE
|
||||
//// GlideApp.with(mActivity)
|
||||
//// .load(familyInfo.familyIcon)
|
||||
//// .dontAnimate()
|
||||
//// .placeholder(R.drawable.default_cover)
|
||||
//// .transforms(CenterCrop(),
|
||||
//// RoundedCorners(10))
|
||||
//// .error(R.drawable.default_cover)
|
||||
//// .into(iv_family_cover)
|
||||
//// tv_family_name.text = familyInfo.familyName
|
||||
//// tv_family_id.text = String.format(resources.getString(R.string.family_id),familyInfo.familyId)
|
||||
//// tv_family_member_count.text = String.format(resources.getString(R.string.family_member_count),familyInfo.memberCount)
|
||||
//// ll_my_family.setOnClickListener {
|
||||
//// if(intent.extras.getInt("from",1) == FROM_TYPE_NORMAL){
|
||||
//// //这里限制循环访问, 例如:家族->个人主页->家族->个人主页->....
|
||||
//// FamilyHomeActivity.start(mActivity, familyInfo.familyId)
|
||||
//// }else{
|
||||
//// onBackPressed()
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//// override fun onError(e: Throwable) {
|
||||
//// toast(e.message)
|
||||
//// }
|
||||
////
|
||||
//// })
|
||||
//
|
||||
// }
|
||||
//
|
||||
// //设置星座
|
||||
// val star = StarUtils.getConstellation(Date(userInfo.birth))
|
||||
// if (null == star) {
|
||||
// tv_constellation!!.visibility = View.GONE
|
||||
// } else {
|
||||
// tv_constellation!!.text = star
|
||||
// tv_constellation!!.visibility = View.VISIBLE
|
||||
// }
|
||||
// tv_erban_id!!.text = getString(R.string.me_user_id, userInfo.erbanNo)
|
||||
// tv_user_desc!!.text = userInfo.userDesc
|
||||
//
|
||||
// setUserLevel(userInfo.userLevelVo)
|
||||
//
|
||||
// val nobleInfo = userInfo.nobleInfo
|
||||
// var headWearInfo = userInfo.userHeadwear
|
||||
// if (nobleInfo != null) {
|
||||
// setBgByLevel(true)
|
||||
// NobleUtil.loadResource(nobleInfo.headWear, iv_avatar_head_wear)
|
||||
// val zoneBg = nobleInfo.zoneBg
|
||||
// if (TextUtils.isEmpty(zoneBg)) {
|
||||
// ImageLoadUtils.loadImage(this, userInfo.avatar, avatar_bg)
|
||||
// } else {
|
||||
// ImageLoadUtils.loadImage(this, zoneBg, avatar_bg)
|
||||
// }
|
||||
// NobleUtil.loadResource(NobleUtil.getBadgeByLevel(nobleInfo.level), iv_user_noble_level)
|
||||
// } else {
|
||||
// setBgByLevel(false)
|
||||
// iv_user_noble_level!!.setImageDrawable(null)
|
||||
// ImageLoadUtils.loadImageWithBlurTransformation(this, userInfo.avatar, avatar_bg)
|
||||
// }
|
||||
// if(headWearInfo!=null){
|
||||
// iv_avatar_head_wear.setImageDrawable(null)
|
||||
// iv_avatar_head_wear.visibility = VISIBLE
|
||||
// NobleUtil.loadHeadWear(headWearInfo.pic, iv_avatar_head_wear)
|
||||
// }
|
||||
//
|
||||
// tv_duration!!.text = getString(R.string.user_info_voice_dur, userInfo.voiceDura)
|
||||
//
|
||||
// //设置靓号
|
||||
// val hasPrettyErbanNo = userInfo.isHasPrettyErbanNo
|
||||
// iv_good_number!!.visibility = if (hasPrettyErbanNo) View.VISIBLE else View.GONE
|
||||
// iv_good_number!!.setBackgroundDrawable(if (hasPrettyErbanNo)
|
||||
// ContextCompat.getDrawable(this, R.mipmap-xhdpi.ic_good_number)
|
||||
// else
|
||||
// null)
|
||||
// val params = iv_good_number!!.layoutParams as RelativeLayout.LayoutParams
|
||||
// params.rightMargin = if (hasPrettyErbanNo) SizeUtils.dp2px(this, 3f) else 0
|
||||
//
|
||||
// //贵族相关信息
|
||||
// val privatePhoto = userInfo.privatePhoto
|
||||
// if (ListUtils.isListEmpty(privatePhoto)) {
|
||||
// photo_recyclerView!!.visibility = View.GONE
|
||||
// tv_empty_photo!!.visibility = View.VISIBLE
|
||||
// } else {
|
||||
// photo_recyclerView!!.visibility = View.VISIBLE
|
||||
// tv_empty_photo!!.visibility = View.GONE
|
||||
// val photoAdapter = UserPhotoAdapter(privatePhoto, 0, userInfo.uid)
|
||||
// photo_recyclerView!!.adapter = photoAdapter
|
||||
// photoAdapter.setImageClickListener(this)
|
||||
// }
|
||||
//
|
||||
// if (AuthModel.get().currentUid != userInfo.uid) {
|
||||
// PraiseModel.get().isPraised(AuthModel.get().currentUid, userInfo.uid)
|
||||
// }
|
||||
// UserModel.get().requestUserGiftWall(userId, 2)
|
||||
// .subscribe(object : BeanObserver<List<GiftWallInfo>>() {
|
||||
// override fun onErrorMsg(error: String) {
|
||||
// onRequestGiftWallFail(error)
|
||||
// }
|
||||
//
|
||||
// override fun onSuccess(t: List<GiftWallInfo>) {
|
||||
// onRequestGiftWall(t)
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// // 获取车库数据
|
||||
// //mvpPresenter.getGarageCars(userId)
|
||||
// CarModel.get().getMyCars(AuthModel.get().ticket, userId)
|
||||
// .compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
// .subscribe({ list -> getGarageCarsSuccessView(list as MutableList<CarInfo>?) }
|
||||
// , { t -> getGarageCarsFailView(t) })
|
||||
//
|
||||
// // 获取魔法数据
|
||||
// //mvpPresenter.getMyMagicWall(userId)
|
||||
// MagicModel.get().getTargetMagicWall(userId)
|
||||
// .compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
// .subscribe({ list -> getMagicWallSuccessView(list as MutableList<MagicInfo>?)},
|
||||
// {t -> getMagicWallFailView(t) })
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun setUserLevel(userLevelVo: UserLevelVo?) {
|
||||
// iv_user_charm!!.visibility = View.GONE
|
||||
// iv_user_level!!.visibility = View.GONE
|
||||
// if (userLevelVo != null) {
|
||||
// val userLevelUrl: String? = userLevelVo.getExperUrl()
|
||||
// val userCharmUrl: String? = userLevelVo.getCharmUrl()
|
||||
// if (!TextUtils.isEmpty(userLevelUrl)) {
|
||||
// iv_user_level!!.visibility = View.VISIBLE
|
||||
// ImageLoadUtils.loadImage(this, userLevelUrl, iv_user_level)
|
||||
// }
|
||||
// if (!TextUtils.isEmpty(userCharmUrl)) {
|
||||
// iv_user_charm!!.visibility = View.VISIBLE
|
||||
// ImageLoadUtils.loadImage(this, userCharmUrl, iv_user_charm)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun setBgByLevel(isNoble: Boolean) {
|
||||
// this.isNoble = isNoble
|
||||
// iv_avatar_head_wear!!.visibility = if (isNoble) View.VISIBLE else View.GONE
|
||||
// iv_user_noble_level!!.visibility = if (isNoble) View.VISIBLE else View.INVISIBLE
|
||||
// val layoutParams = iv_user_noble_level!!.layoutParams as RelativeLayout.LayoutParams
|
||||
// layoutParams.width = if (isNoble) SizeUtils.dp2px(this, 17f) else 0
|
||||
// layoutParams.height = if (isNoble) SizeUtils.dp2px(this, 17f) else 0
|
||||
// val nobleColor = ContextCompat.getColor(this, R.color.color_1D1F1F)
|
||||
// ll_user_info!!.setBackgroundColor(if (isNoble) nobleColor else Color.WHITE)
|
||||
// ll_add_user_album!!.setBackgroundColor(if (isNoble) nobleColor else Color.WHITE)
|
||||
// ll_user_gift!!.setBackgroundColor(if (isNoble) nobleColor else Color.WHITE)
|
||||
// user_info_car_layout!!.setBackgroundColor(if (isNoble) nobleColor else Color.WHITE)
|
||||
// rl_user_info_magic_layout!!.setBackgroundColor(if (isNoble) nobleColor else Color.WHITE)
|
||||
// rl_user_info_magic_layout!!.setBackgroundColor(if (isNoble) nobleColor else Color.WHITE)
|
||||
//
|
||||
// ll_my_family_container.setBackgroundColor(if(isNoble) nobleColor else Color.WHITE);
|
||||
//
|
||||
// scroll_view!!.setBackgroundColor(ContextCompat.getColor(this,
|
||||
// if (isNoble) R.color.color_0f0f0f else R.color.common_bg_color))
|
||||
// gift_view_line!!.setBackgroundColor(ContextCompat.getColor(this,
|
||||
// if (isNoble) R.color.color_0f0f0f else R.color.common_divider_color))
|
||||
// family_view_line!!.setBackgroundColor(ContextCompat.getColor(this,
|
||||
// if (isNoble) R.color.color_0f0f0f else R.color.common_divider_color))
|
||||
// car_view_line!!.setBackgroundColor(ContextCompat.getColor(this,
|
||||
// if (isNoble) R.color.color_0f0f0f else R.color.common_divider_color))
|
||||
// magic_view_line!!.setBackgroundColor(ContextCompat.getColor(this,
|
||||
// if (isNoble) R.color.color_0f0f0f else R.color.common_divider_color))
|
||||
//
|
||||
// val nobleTextColor = ContextCompat.getColor(this, R.color.white_op_30)
|
||||
// val normalTextColor = ContextCompat.getColor(this, R.color.color_999999)
|
||||
//
|
||||
// tv_empty_photo!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// tv_user_desc!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// tv_user_desc_text!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// gift_number!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// gift_number_text!!.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this, R.color.color_333333))
|
||||
// tv_constellation_text!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// tv_constellation!!.setTextColor(if (isNoble) nobleTextColor else Color.WHITE)
|
||||
//
|
||||
// car_number!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// car_text!!.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this, R.color.color_333333))
|
||||
//
|
||||
// tv_magic_number!!.setTextColor(if (isNoble) nobleTextColor else normalTextColor)
|
||||
// tv_magic_text!!.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this, R.color.color_333333))
|
||||
//
|
||||
// tv_family_title.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this,R.color.color_1A1A1A))
|
||||
// tv_family_name.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this,R.color.color_1A1A1A))
|
||||
// tv_family_id.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this,R.color.color_999999))
|
||||
// tv_family_member_count.setTextColor(if (isNoble) nobleTextColor else ContextCompat.getColor(this,R.color.color_999999))
|
||||
//
|
||||
// }
|
||||
//
|
||||
// override fun click(position: Int, userPhoto: UserPhoto?, isOwner: Boolean) {
|
||||
// if (isOwner) {
|
||||
// if (position > 0) {
|
||||
// showUserPhoto(position - 1)
|
||||
// } else {
|
||||
// UIHelper.showModifyPhotosAct(this@UserInfoActivity, userId)
|
||||
// }
|
||||
// } else {
|
||||
// //创建一个集合拿来做用户所有照片信息
|
||||
// showUserPhoto(position)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun showUserPhoto(position: Int) {
|
||||
// //创建一个集合拿来做用户所有照片信息
|
||||
// val userPhotos = ArrayList<UserPhoto>()
|
||||
// val realmList = userInfo!!.privatePhoto
|
||||
// for (i in realmList.indices) {
|
||||
// val photo = realmList[i]
|
||||
// val newPhoto = UserPhoto()
|
||||
// newPhoto.pid = photo!!.pid
|
||||
// newPhoto.photoUrl = photo!!.photoUrl
|
||||
// userPhotos.add(newPhoto)
|
||||
// }
|
||||
// val intent = Intent(mActivity, ShowPhotoActivity::class.java)
|
||||
// intent.putExtra("position", position)
|
||||
// intent.putExtra("photoList", userPhotos)
|
||||
// startActivity(intent)
|
||||
// }
|
||||
//
|
||||
// override fun onClick(v: View) {
|
||||
// when (v.id) {
|
||||
// R.id.iv_more -> if (userInfo != null && !TextUtils.isEmpty(userInfo!!.uid.toString())) {
|
||||
// val account = userInfo!!.uid.toString()
|
||||
// val inMyBlackList = NimFriendModel.get().isInMyBlackList(account)
|
||||
// val buttonItems = ArrayList<ButtonItem>(2)
|
||||
// if (!inMyBlackList) {
|
||||
// val blackListItem = ButtonItemFactory.createAddToBlackListItem(dialogManager, account)
|
||||
// buttonItems.add(blackListItem)
|
||||
// }
|
||||
// val reportItem = ButtonItemFactory.createReportItem(account)
|
||||
// buttonItems.add(reportItem)
|
||||
// CommonPopupDialog(this, "", buttonItems, "取消", false).show()
|
||||
// }
|
||||
// R.id.iv_edit -> UIHelper.showUserInfoModifyAct(this@UserInfoActivity, userId)
|
||||
// R.id.tv_duration -> if (userInfo != null) {
|
||||
// if (!StringUtils.isEmpty(userInfo!!.userVoice)) {
|
||||
// voiceClicked()
|
||||
// }
|
||||
// }
|
||||
// R.id.iv_back -> finish()
|
||||
// R.id.tv_attention_count, R.id.tv_user_attention_text -> mActivity!!.startActivity(Intent(mActivity, AttentionListActivity::class.java))
|
||||
// R.id.tv_fans_count, R.id.tv_user_fan_text -> mActivity!!.startActivity(Intent(mActivity, FansListActivity::class.java))
|
||||
// R.id.user_room -> if (mRoomInfo != null) {
|
||||
// LogUtil.i(TAG, "进入的房间: " + mRoomInfo!!.uid)
|
||||
// AVRoomActivity.start(this, mRoomInfo!!.uid, mRoomInfo!!.type)
|
||||
// }
|
||||
// R.id.send_msg_layout -> {
|
||||
// val nimUserInfo = NimUserInfoCache.getInstance().getUserInfo(userId.toString())
|
||||
// if (nimUserInfo != null) {
|
||||
// NimP2PMessageActivity.start(this, userId.toString())
|
||||
// } else {
|
||||
// NimUserInfoCache.getInstance().getUserInfoFromRemote(userId.toString(),
|
||||
// object : RequestCallbackWrapper<NimUserInfo>() {
|
||||
// override fun onResult(i: Int, nimUserInfo: NimUserInfo?, throwable: Throwable?) {
|
||||
// if (i == 200) {
|
||||
// NimP2PMessageActivity.start(this@UserInfoActivity, userId.toString())
|
||||
// } else {
|
||||
// toast("网络异常,请重试")
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// R.id.attention_layout ->
|
||||
// if (mIslike) {
|
||||
// val isMyFriend = IMFriendModel.get().isMyFriend(userInfo!!.uid.toString())
|
||||
// val tip = if (isMyFriend) "取消关注将不再是好友关系,确定取消关注?" else "确定取消关注?"
|
||||
//
|
||||
// dialogManager.showOkCancelDialog(tip, true, object : DialogManager.OkCancelDialogListener {
|
||||
// override fun onCancel() {
|
||||
// dialogManager.dismissDialog()
|
||||
// }
|
||||
//
|
||||
// override fun onOk() {
|
||||
// dialogManager.dismissDialog()
|
||||
// dialogManager.showProgressDialog(this@UserInfoActivity, getString(R.string.waiting_text))
|
||||
// PraiseModel.get().cancelPraise(userInfo!!.uid)
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// dialogManager.showProgressDialog(this@UserInfoActivity, getString(R.string.waiting_text))
|
||||
// if (userInfo != null) {
|
||||
// PraiseModel.get().praise(userInfo!!.uid)
|
||||
// }
|
||||
// }
|
||||
// R.id.user_where -> {
|
||||
// dialogManager.showProgressDialog(this, "请稍后...")
|
||||
// CoreManager.getCore(IRoomCore::class.java).getUserRoom(userId)
|
||||
//
|
||||
//// /**************** 测试代码 **************/
|
||||
//// AVRoomActivity.start(this, 91, mRoomInfo!!.type)
|
||||
// }
|
||||
// R.id.user_info_btn_buy_now ->
|
||||
// startActivity(Intent(this, CarActivity::class.java))
|
||||
// R.id.tv_send_car ->
|
||||
// DecorationStoreActivity.start(this,userId,1)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// override fun onScrollChanged(view: NestedScrollView, x: Int, y: Int, oldx: Int, oldy: Int) {
|
||||
// if (flag == 0 && oldy > 300) {
|
||||
// flag = 1
|
||||
// tv_title!!.visibility = View.VISIBLE
|
||||
// if (userInfo != null) {
|
||||
// tv_title!!.text = userInfo!!.nick
|
||||
// }
|
||||
// val isNoble = userInfo != null && userInfo!!.nobleInfo != null
|
||||
// tv_title!!.setTextColor(if (isNoble)
|
||||
// ContextCompat.getColor(this, R.color.white)
|
||||
// else
|
||||
// ContextCompat.getColor(this, R.color.text_color_primary))
|
||||
// rl_nav!!.setBackgroundResource(if (!isNoble) R.color.white else R.color.color_1D1F1F)
|
||||
// iv_back!!.setImageResource(if (isNoble) R.drawable.arrow_left_white else R.drawable.icon_arrow_left_black)
|
||||
// iv_edit!!.setImageResource(if (isNoble) R.drawable.icon_user_info_edit else R.drawable.icon_edit_black)
|
||||
// } else if (flag == 1 && oldy <= 300) {
|
||||
// flag = 0
|
||||
// tv_title!!.visibility = View.GONE
|
||||
//
|
||||
// rl_nav!!.setBackgroundResource(R.color.transparent)
|
||||
// iv_back!!.setImageResource(R.drawable.arrow_left_white)
|
||||
// iv_edit!!.setImageResource(R.drawable.icon_user_info_edit)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// private interface PlayState {
|
||||
// companion object {
|
||||
// val NORMAL = 0
|
||||
// val PLAYING = 1
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun voiceClicked() {
|
||||
// if (playState == PlayState.NORMAL) {
|
||||
// playState = PlayState.PLAYING
|
||||
// audioPlayer!!.setDataSource(userInfo!!.userVoice)
|
||||
// audioManager!!.play()
|
||||
// } else if (playState == PlayState.PLAYING) {
|
||||
// playState = PlayState.NORMAL
|
||||
// audioManager!!.stopPlay()
|
||||
//
|
||||
// }
|
||||
// showByPlayState()
|
||||
// }
|
||||
//
|
||||
// private fun setTextViewLeftDrawable(tvPlayAudio: TextView, drawId: Int) {
|
||||
// val drawablePlay = resources.getDrawable(drawId)
|
||||
// drawablePlay.setBounds(0, 0, drawablePlay.minimumWidth, drawablePlay.minimumHeight)
|
||||
// tvPlayAudio.setCompoundDrawables(drawablePlay, null, null, null)
|
||||
// }
|
||||
//
|
||||
// fun getMagicWallSuccessView(magicInfoList: MutableList<MagicInfo>?) {
|
||||
// if (ListUtils.isListEmpty(magicInfoList)) {
|
||||
// if (rl_user_info_magic_layout != null) {
|
||||
// rl_user_info_magic_layout.visibility = GONE
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// val allMagicCounts = magicInfoList!!.sumBy { magicInfo -> magicInfo.amount }
|
||||
// tv_magic_number!!.text = getString(R.string.user_info_gift_number, allMagicCounts)
|
||||
// mMagicListAdapter!!.isNoble = isNoble
|
||||
// mMagicListAdapter!!.setNewData(magicInfoList)
|
||||
// }
|
||||
//
|
||||
// fun getMagicWallFailView(throwable: Throwable?) {
|
||||
// }
|
||||
//
|
||||
// fun getGarageCarsSuccessView(carInfoList: MutableList<CarInfo>?) {
|
||||
// if (ListUtils.isListEmpty(carInfoList)) {
|
||||
// car_number!!.text = getString(R.string.user_info_gift_number, 0)
|
||||
// if (emptyView == null) {
|
||||
// emptyView = LayoutInflater.from(this).inflate(R.layout.user_info_car_empty, null, false) as LinearLayout?
|
||||
// val param = LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, SizeUtils.dp2px(this, 79f))
|
||||
// emptyView!!.layoutParams = param
|
||||
// userInfoCarNoText = emptyView!!.findViewById(R.id.user_info_car_no_text)
|
||||
// userInfoCarBuyNow = emptyView!!.findViewById(R.id.user_info_btn_buy_now)
|
||||
// userInfoCarBuyNow!!.setOnClickListener(this)
|
||||
// }
|
||||
// if (AuthModel.get().currentUid == userId) {
|
||||
// userInfoCarNoText!!.text = getString(R.string.user_info_car_no_text_for_my)
|
||||
// userInfoCarBuyNow!!.visibility = GONE
|
||||
// } else {
|
||||
// userInfoCarNoText!!.text = getString(R.string.user_info_car_no_text_for_other)
|
||||
// userInfoCarBuyNow!!.visibility = GONE
|
||||
// }
|
||||
// mCarListAdapter!!.emptyView = emptyView
|
||||
// return
|
||||
// }
|
||||
// carInfoList!!.removeAt(0)
|
||||
// car_number!!.text = getString(R.string.user_info_gift_number, carInfoList!!.size)
|
||||
// mCarListAdapter!!.setNewData(carInfoList)
|
||||
// }
|
||||
//
|
||||
// fun getGarageCarsFailView(throwable: Throwable?) {
|
||||
// throwable!!.printStackTrace()
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IRoomCoreClient::class)
|
||||
// fun onGetRoomInfo(roomInfo: RoomInfo?, pageType: Int) {
|
||||
// if (roomInfo == null) {
|
||||
// //该用户还未开房间
|
||||
// user_room!!.visibility = View.GONE
|
||||
// return
|
||||
// }
|
||||
// if (Constants.PAGE_TYPE_USER_INFO_ACTIVITY == pageType) {
|
||||
// //已经存在的activity
|
||||
// if (mRoomInfo != null && mRoomInfo!!.roomId == roomInfo.roomId) {
|
||||
// mRoomInfo = roomInfo
|
||||
// } else if (mRoomInfo == null) {
|
||||
// //打开新的activity的时候
|
||||
// mRoomInfo = roomInfo
|
||||
// }
|
||||
// user_room!!.visibility = if (roomInfo.isValid) View.VISIBLE else View.GONE
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IRoomCoreClient::class)
|
||||
// fun onGetUserRoom(roomInfo: RoomInfo?) {
|
||||
// dialogManager.dismissDialog()
|
||||
// val current = AvRoomDataManager.get().mCurrentRoomInfo
|
||||
// if (roomInfo != null && roomInfo.uid > 0) {
|
||||
// if (current != null) {
|
||||
// if (current.uid == roomInfo.uid) {
|
||||
// toast("已经和对方在同一个房间")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// AVRoomActivity.start(this, roomInfo.uid, roomInfo.type)
|
||||
// } else {
|
||||
// toast("对方不在房间内")
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IRoomCoreClient::class)
|
||||
// fun onGetUserRoomFail(msg: String) {
|
||||
// dialogManager.dismissDialog()
|
||||
// toast(msg)
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IPraiseClient::class)
|
||||
// fun onIsLiked(islike: Boolean, uid: Long) {
|
||||
// setLikedText(islike)
|
||||
// }
|
||||
//
|
||||
// private fun setLikedText(isliked: Boolean) {
|
||||
// mIslike = isliked
|
||||
// attentionLayout!!.setCompoundDrawablesWithIntrinsicBounds(if (!isliked) mAttenDrawable else ColorDrawable(Color.TRANSPARENT), null, null, null)
|
||||
// attentionLayout!!.compoundDrawablePadding = if (isliked) 0 else SizeUtils.dp2px(this, 5f)
|
||||
// attentionLayout!!.text = getString(if (isliked) R.string.already_attention else R.string.attention)
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IPraiseClient::class)
|
||||
// fun onIsLikedFail(error: String) {
|
||||
// dialogManager.dismissDialog()
|
||||
// toast(error)
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IPraiseClient::class)
|
||||
// fun onPraise(likedUid: Long) {
|
||||
// dialogManager.dismissDialog()
|
||||
// toast("关注成功,相互关注可成为好友哦!")
|
||||
// setLikedText(true)
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IPraiseClient::class)
|
||||
// fun onCanceledPraise(likedUid: Long) {
|
||||
// toast("取消关注成功")
|
||||
// dialogManager.dismissDialog()
|
||||
// setLikedText(false)
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IPraiseClient::class)
|
||||
// fun onCanceledPraiseFaith(error: String) {
|
||||
// // getDialogManager().dismissDialog();
|
||||
// toast(error)
|
||||
// }
|
||||
//
|
||||
// @CoreEvent(coreClientClass = IPraiseClient::class)
|
||||
// fun onPraiseFaith(error: String) {
|
||||
// dialogManager.dismissDialog()
|
||||
// toast(error)
|
||||
// }
|
||||
//
|
||||
// fun onRequestGiftWall(giftWallInfoList: List<GiftWallInfo>?) {
|
||||
// if (userInfo == null) return
|
||||
// adapter = GiftWallAdapter(this, ContextCompat.getColor(this,
|
||||
// if (userInfo!!.nobleInfo == null) R.color.black else R.color.white_op_30))
|
||||
// adapter!!.setGiftWallInfoList(giftWallInfoList)
|
||||
// recycler_view!!.adapter = adapter
|
||||
// recycler_view!!.isNestedScrollingEnabled = false
|
||||
// val totalCount = giftWallInfoList!!.indices
|
||||
// .map { giftWallInfoList[it] }
|
||||
// .sumBy { it.reciveCount }
|
||||
//
|
||||
// if (totalCount == 0) {
|
||||
// recycler_view!!.visibility = View.GONE
|
||||
// gift_empty!!.visibility = View.VISIBLE
|
||||
// } else {
|
||||
// recycler_view!!.visibility = View.VISIBLE
|
||||
// gift_empty!!.visibility = View.GONE
|
||||
// }
|
||||
// gift_number!!.text = getString(R.string.user_info_gift_number, totalCount)
|
||||
// }
|
||||
//
|
||||
// fun onRequestGiftWallFail(msg: String) {
|
||||
// dialogManager.dismissDialog()
|
||||
// toast(msg)
|
||||
// }
|
||||
//
|
||||
// override fun onDestroy() {
|
||||
// if (onPlayListener != null) {
|
||||
// onPlayListener = null
|
||||
// }
|
||||
// if (audioPlayer != null) {
|
||||
// audioPlayer!!.onPlayListener = null
|
||||
// }
|
||||
//
|
||||
// if (user_info_svga_car.isAnimating) {
|
||||
// user_info_svga_car.clearAnimation()
|
||||
// }
|
||||
// EventBus.getDefault().unregister(this)
|
||||
// super.onDestroy()
|
||||
// }
|
||||
//
|
||||
// /**static静态代码*/
|
||||
// companion object {
|
||||
// private val TAG = UserInfoActivity::class.java.simpleName
|
||||
// private const val FROM_TYPE_NORMAL: Int = 1
|
||||
// private const val FROM_TYPE_FAMILY: Int = 2
|
||||
//
|
||||
// fun start(context: Context, userId: Long) {
|
||||
// val intent = Intent(context, UserInfoActivity::class.java)
|
||||
// intent.putExtra("userId", userId)
|
||||
// var from :Int = FROM_TYPE_NORMAL
|
||||
// if(context is FamilyHomeActivity
|
||||
// || context is FamilyMemberListActivity
|
||||
// || context is FamilyMemberSearchActivity){
|
||||
// //这里限制循环访问, 例如:家族->个人主页->家族->个人主页->....
|
||||
// from = FROM_TYPE_FAMILY
|
||||
// }
|
||||
// intent.putExtra("from", from)
|
||||
// context.startActivity(intent)
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
Reference in New Issue
Block a user