Compare commits
3 Commits
molistar/1
...
molistar/g
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1b7e8dd8e8 | ||
![]() |
13baa2746d | ||
![]() |
3a9c338df6 |
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[submodule "modules/module_google"]
|
||||
path = modules/module_google
|
||||
url = https://e.coding.net/chwllive/peko/peko-android-gms.git
|
||||
branch = molistar
|
@@ -82,8 +82,7 @@
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<!-- 对于 Android 12.0 及以上设备,还需要添加如下权限: -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" />
|
||||
|
||||
<application
|
||||
android:name=".application.App"
|
||||
android:allowBackup="false"
|
||||
@@ -877,22 +876,17 @@
|
||||
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService"
|
||||
android:foregroundServiceType="remoteMessaging"
|
||||
android:process=":core" />
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService$Aux"
|
||||
android:foregroundServiceType="remoteMessaging"
|
||||
android:process=":core" />
|
||||
<service
|
||||
android:name="com.netease.nimlib.job.NIMJobService"
|
||||
android:foregroundServiceType="remoteMessaging"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:process=":core" />
|
||||
<service android:name="com.netease.nimlib.service.ResponseService"
|
||||
android:foregroundServiceType="remoteMessaging"/>
|
||||
<service android:name="com.netease.nimlib.service.ResponseService" />
|
||||
<service
|
||||
android:name=".service.DaemonService"
|
||||
android:foregroundServiceType="mediaPlayback"
|
||||
android:enabled="true" />
|
||||
|
||||
<activity android:name=".avroom.room_album.RoomAlbumActivity" />
|
||||
@@ -955,8 +949,6 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".ui.debug.DebugActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.game_team.record.GameTeamRecordActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@@ -84,6 +84,7 @@ import com.chwl.library.common.file.FileHelper;
|
||||
import com.chwl.library.net.rxnet.RxNet;
|
||||
import com.chwl.library.net.rxnet.converter.GsonConverterPlugins;
|
||||
import com.chwl.library.utils.AppMetaDataUtil;
|
||||
import com.chwl.library.utils.AppUtils;
|
||||
import com.chwl.library.utils.DeviceUuidFactory;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
import com.chwl.library.utils.SingleToastUtil;
|
||||
@@ -324,7 +325,9 @@ public class App extends BaseApp {
|
||||
BasicConfig.INSTANCE.setVoiceDir(Constants.VOICE_DIR);
|
||||
BasicConfig.INSTANCE.setCacheDir(Constants.CACHE_DIR);
|
||||
BasicConfig.INSTANCE.setImageDir(Constants.IMAGE_CACHE_DIR);
|
||||
com.example.lib_utils.log.LogUtil.INSTANCE.setConsolePrinterEnabled(BuildConfig.DEBUG);
|
||||
// TODO 临时调整
|
||||
com.example.lib_utils.log.LogUtil.INSTANCE.setConsolePrinterEnabled(true);
|
||||
// com.example.lib_utils.log.LogUtil.INSTANCE.setConsolePrinterEnabled(BuildConfig.DEBUG);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,7 +419,7 @@ public class App extends BaseApp {
|
||||
httpParams.put("netType", String.valueOf(SystemUtils.getNetworkType(context)));
|
||||
httpParams.put("model", SystemUtils.getPhoneModel());
|
||||
httpParams.put("appVersion", VersionUtil.getLocalName(context));
|
||||
httpParams.put("appVersionCode", String.valueOf(VersionUtil.getVersionCode(context)));
|
||||
httpParams.put("appVersionCode", String.valueOf(AppUtils.getVersionCode(context)));
|
||||
httpParams.put("deviceId", DeviceUuidFactory.getDeviceId(context));
|
||||
httpParams.put("androidId", MD5Utils.getMD5String(Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID)));
|
||||
httpParams.put("channel", AppMetaDataUtil.getChannelID());
|
||||
|
@@ -47,7 +47,8 @@ public abstract class BottomViewListenerWrapper {
|
||||
|
||||
}
|
||||
|
||||
public void onRoomGameplayClick(boolean isOnlyPK){
|
||||
public void onRoomGameplayClick(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,13 +4,13 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogRoomPkFinishBinding
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.core.im.custom.bean.RoomPkBean
|
||||
import com.chwl.core.utils.extension.subAndReplaceDot
|
||||
|
||||
class RoomPkFinishDialog : BaseDialogFragment<DialogRoomPkFinishBinding>() {
|
||||
class RoomPkFinishDialog : BaseDialog<DialogRoomPkFinishBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -4,13 +4,13 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogRoomPkForceFinishBinding
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.core.im.custom.bean.RoomPkBean
|
||||
import com.chwl.core.utils.extension.subAndReplaceDot
|
||||
|
||||
class RoomPkForceFinishDialog : BaseDialogFragment<DialogRoomPkForceFinishBinding>() {
|
||||
class RoomPkForceFinishDialog : BaseDialog<DialogRoomPkForceFinishBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -4,7 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.core.view.isVisible
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogRoomPkReceivedBinding
|
||||
import com.chwl.core.im.custom.bean.RoomPkBean
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
@@ -16,7 +16,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class RoomPkReceivedDialog : BaseDialogFragment<DialogRoomPkReceivedBinding>() {
|
||||
class RoomPkReceivedDialog : BaseDialog<DialogRoomPkReceivedBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
package com.chwl.app.avroom.anotherroompk
|
||||
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogRoomPkRuleBinding
|
||||
|
||||
class RoomPkRuleDialog : BaseDialogFragment<DialogRoomPkRuleBinding>() {
|
||||
class RoomPkRuleDialog : BaseDialog<DialogRoomPkRuleBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -6,7 +6,7 @@ import android.view.WindowManager
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.chwl.app.avroom.adapter.CreateRoomGameGuideAdapter
|
||||
import com.chwl.app.base.BaseActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogCreateGameRoomBinding
|
||||
import com.chwl.app.home.helper.OpenRoomHelper
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
@@ -14,7 +14,7 @@ import com.chwl.core.room.bean.RoomInfo
|
||||
import com.chwl.core.room.game.bean.GameInfo
|
||||
import com.chwl.core.room.game.GameModel
|
||||
|
||||
class CreateGameRoomDialog : BaseDialogFragment<DialogCreateGameRoomBinding>() {
|
||||
class CreateGameRoomDialog : BaseDialog<DialogCreateGameRoomBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<GameInfo>
|
||||
private val gameAdapter = CreateRoomGameGuideAdapter()
|
||||
|
@@ -9,7 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.CreateRoomGameAdapter
|
||||
import com.chwl.app.base.BaseActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogCreateRoomBinding
|
||||
import com.chwl.app.home.helper.OpenRoomHelper
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
@@ -19,7 +19,7 @@ import com.chwl.core.room.game.GameModel
|
||||
import com.chwl.core.utils.extension.toast
|
||||
import com.chwl.library.utils.ResUtil
|
||||
|
||||
class CreateRoomDialog : BaseDialogFragment<DialogCreateRoomBinding>() {
|
||||
class CreateRoomDialog : BaseDialog<DialogCreateRoomBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<GameInfo>
|
||||
private val gameAdapter = CreateRoomGameAdapter()
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package com.chwl.app.avroom.dialog
|
||||
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogNewUserGiftBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.gift.bean.GiftInfo
|
||||
|
||||
class NewUserGiftDialog(val giftInfo: GiftInfo) :
|
||||
BaseDialogFragment<DialogNewUserGiftBinding>() {
|
||||
BaseDialog<DialogNewUserGiftBinding>() {
|
||||
|
||||
override fun init() {
|
||||
binding?.ivClose?.setOnClickListener {
|
||||
|
@@ -11,7 +11,6 @@ import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.RoomGameListAdapter
|
||||
import com.chwl.app.base.BaseActivity
|
||||
@@ -39,7 +38,7 @@ class RoomGameListDialog :
|
||||
private var compositeDisposable: CompositeDisposable? = null
|
||||
private val adapter = RoomGameListAdapter()
|
||||
private var dialogManager: DialogManager? = null
|
||||
private lateinit var recycleView: RecyclerView
|
||||
|
||||
override fun getTheme(): Int {
|
||||
return R.style.ErbanBottomSheetDialogDimFalse
|
||||
}
|
||||
@@ -62,8 +61,6 @@ class RoomGameListDialog :
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
initView()
|
||||
val recyclerView: RecyclerView = view.findViewById(R.id.recyclerView)
|
||||
recycleView = recyclerView
|
||||
switchStatus(0)
|
||||
requestData()
|
||||
}
|
||||
@@ -92,14 +89,6 @@ class RoomGameListDialog :
|
||||
binding?.recyclerView?.adapter = adapter
|
||||
}
|
||||
|
||||
private fun updateDialogHeight(count: Int) {
|
||||
if (count > 10) {
|
||||
val layoutParams = recycleView.layoutParams
|
||||
layoutParams.height = 600
|
||||
recycleView.layoutParams = layoutParams
|
||||
}
|
||||
}
|
||||
|
||||
private fun requestData() {
|
||||
val dataService =
|
||||
AudioRoomContext.get()
|
||||
@@ -107,7 +96,6 @@ class RoomGameListDialog :
|
||||
val cacheKey = "game_list#${parentFragment.hashCode()}"
|
||||
val list = dataService?.getData(cacheKey) as? List<GameInfo>
|
||||
if (!list.isNullOrEmpty()) {
|
||||
updateDialogHeight(list.size)
|
||||
loadData(list)
|
||||
return
|
||||
}
|
||||
@@ -118,7 +106,6 @@ class RoomGameListDialog :
|
||||
}
|
||||
.subscribe { it: List<GameInfo> ->
|
||||
dataService?.putData(cacheKey, it)
|
||||
updateDialogHeight(it.size)
|
||||
loadData(it)
|
||||
}
|
||||
getCompositeDisposable().add(disposable)
|
||||
|
@@ -10,8 +10,6 @@ import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.activity.CreatePKActivity
|
||||
import com.chwl.app.avroom.adapter.RoomGameplayAdapter
|
||||
@@ -41,11 +39,8 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import com.google.gson.Gson
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
|
||||
class RoomGameplayDialog : BottomSheetDialogFragment() {
|
||||
|
||||
var isOnlyPK = false
|
||||
private lateinit var recycleView: RecyclerView
|
||||
|
||||
class RoomGameplayDialog :
|
||||
BottomSheetDialogFragment() {
|
||||
private var binding: RoomGameplayDialogBinding? = null
|
||||
private var compositeDisposable: CompositeDisposable? = null
|
||||
private val adapter = RoomGameplayAdapter()
|
||||
@@ -74,10 +69,6 @@ class RoomGameplayDialog : BottomSheetDialogFragment() {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
initView()
|
||||
|
||||
val recyclerView: RecyclerView = view.findViewById(R.id.recyclerView)
|
||||
recycleView = recyclerView
|
||||
|
||||
switchStatus(0)
|
||||
requestData()
|
||||
}
|
||||
@@ -106,46 +97,28 @@ class RoomGameplayDialog : BottomSheetDialogFragment() {
|
||||
}
|
||||
|
||||
private fun requestData() {
|
||||
if (isOnlyPK) {
|
||||
loadSuccess(arrayListOf())
|
||||
} else {
|
||||
val dataService =
|
||||
AudioRoomContext.get()
|
||||
?.findAbility<RoomDataService>(RoomDataService::class.java.simpleName)
|
||||
val cacheKey = "gameplay_list#${parentFragment.hashCode()}"
|
||||
val list = dataService?.getData(cacheKey) as? List<RoomIcon>
|
||||
|
||||
if (!list.isNullOrEmpty()) {
|
||||
updateDialogHeight(list.size)
|
||||
loadSuccess(list)
|
||||
return
|
||||
val dataService =
|
||||
AudioRoomContext.get()
|
||||
?.findAbility<RoomDataService>(RoomDataService::class.java.simpleName)
|
||||
val cacheKey = "gameplay_list#${parentFragment.hashCode()}"
|
||||
val list = dataService?.getData(cacheKey) as? List<RoomIcon>
|
||||
if (!list.isNullOrEmpty()) {
|
||||
loadSuccess(list)
|
||||
return
|
||||
}
|
||||
val disposable = AvRoomModel.get().roomGamePlayList
|
||||
.doOnError {
|
||||
loadFail(it)
|
||||
}
|
||||
val disposable = AvRoomModel.get().roomGamePlayList
|
||||
.doOnError {
|
||||
loadFail(it)
|
||||
}
|
||||
.subscribe { it: List<RoomIcon> ->
|
||||
dataService?.putData(cacheKey, it)
|
||||
updateDialogHeight(it.size)
|
||||
loadSuccess(it)
|
||||
}
|
||||
getCompositeDisposable().add(disposable)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateDialogHeight(count: Int) {
|
||||
if (count > 10) {
|
||||
val layoutParams = recycleView.layoutParams
|
||||
layoutParams.height = 600
|
||||
recycleView.layoutParams = layoutParams
|
||||
}
|
||||
.subscribe { it: List<RoomIcon> ->
|
||||
dataService?.putData(cacheKey, it)
|
||||
loadSuccess(it)
|
||||
}
|
||||
getCompositeDisposable().add(disposable)
|
||||
}
|
||||
|
||||
private fun loadSuccess(list: List<RoomIcon>?) {
|
||||
var finalList = mutableListOf<RoomGameplayItem>()
|
||||
if (isOnlyPK) {
|
||||
finalList = getLocalList()
|
||||
}
|
||||
val finalList = getLocalList()
|
||||
list?.let {
|
||||
finalList.addAll(list.map {
|
||||
RoomGameplayItem.RoomIconItem(it) { dialog, item ->
|
||||
|
@@ -5,7 +5,7 @@ import android.view.WindowManager
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.isVisible
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.RoomTeamPkDialogBinding
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.app.ui.widget.dialog.CommonTipDialog
|
||||
@@ -28,7 +28,7 @@ import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import java.util.Locale
|
||||
|
||||
class RoomTeamPkDialog : BaseDialogFragment<RoomTeamPkDialogBinding>() {
|
||||
class RoomTeamPkDialog : BaseDialog<RoomTeamPkDialogBinding>() {
|
||||
|
||||
private var compositeDisposable: CompositeDisposable? = null
|
||||
|
||||
|
@@ -9,7 +9,7 @@ import android.view.WindowManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.avroom.adapter.SendBroadcastAdapter
|
||||
import com.chwl.app.base.BaseActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSendBroadcastBinding
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.utils.SpannableBuilder
|
||||
@@ -24,7 +24,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class SendBroadcastDialog : BaseDialogFragment<DialogSendBroadcastBinding>() {
|
||||
class SendBroadcastDialog : BaseDialog<DialogSendBroadcastBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<String>
|
||||
private lateinit var adapter: SendBroadcastAdapter
|
||||
|
@@ -2,11 +2,11 @@ package com.chwl.app.avroom.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSingleRoomTipBinding
|
||||
|
||||
class SingleRoomTipDialog :
|
||||
BaseDialogFragment<DialogSingleRoomTipBinding>() {
|
||||
BaseDialog<DialogSingleRoomTipBinding>() {
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun init() {
|
||||
binding?.root?.setOnClickListener {
|
||||
|
@@ -63,7 +63,6 @@ import com.chwl.app.music.widget.MusicPlayerView
|
||||
import com.chwl.app.public_chat.ui.message.HeadlineViewModel
|
||||
import com.chwl.app.room_chat.activity.RoomMsgActivity
|
||||
import com.chwl.app.ui.pay.ChargeActivity
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
||||
import com.chwl.app.ui.webview.DialogWebViewActivity
|
||||
import com.chwl.app.ui.widget.ButtonItem
|
||||
import com.chwl.app.ui.widget.GiftDialog
|
||||
@@ -99,8 +98,6 @@ import com.chwl.core.manager.RoomEvent
|
||||
import com.chwl.core.mentoring_relationship.event.MentoringStopCountingEvent
|
||||
import com.chwl.core.room.anotherroompk.ShowGiftDialogEvent
|
||||
import com.chwl.core.room.anotherroompk.ShowUserInfoDialogEvent
|
||||
import com.chwl.core.room.bean.RightBottomIconConfig
|
||||
import com.chwl.core.room.bean.RoomIcon
|
||||
import com.chwl.core.room.bean.RoomInfo
|
||||
import com.chwl.core.room.event.RoomAtEvent
|
||||
import com.chwl.core.room.event.RoomClearScreenEvent
|
||||
@@ -125,7 +122,6 @@ import com.chwl.library.common.util.LimitClickUtils
|
||||
import com.chwl.library.net.rxnet.utils.RxNetWorkUtils
|
||||
import com.chwl.library.rxbus.RxBus
|
||||
import com.chwl.library.utils.*
|
||||
import com.google.gson.Gson
|
||||
import com.netease.nim.uikit.common.antispam.AntiSpamEvent
|
||||
import com.netease.nimlib.sdk.StatusCode
|
||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder
|
||||
@@ -669,7 +665,6 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
bottomView.showHomePartyDownMicBottom()
|
||||
}
|
||||
bottomView.showInputOrIcon(isOnMic)
|
||||
bottomView.updateGameEntrance()
|
||||
// 更新聽筒消息
|
||||
bottomView.setRemoteMuteOpen(!AudioEngineManager.get().isRemoteMute)
|
||||
if (isOnMic) {
|
||||
@@ -797,24 +792,8 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
override fun onClick(v: View) {
|
||||
if (mClickLimit.checkForTime(500)) return
|
||||
when (v.id) {
|
||||
R.id.iv_config_entrance -> {
|
||||
val roomInfo = AvRoomDataManager.get().mCurrentRoomInfo ?: return
|
||||
val configInfo = AvRoomDataManager.get().rightBottomIconConfig ?: return
|
||||
if (configInfo.skipType == 1) {
|
||||
playConfigWeb(configInfo.skipUrl)
|
||||
} else if (configInfo.skipType == 2) {
|
||||
playConfigBaishunGame(configInfo)
|
||||
}
|
||||
}
|
||||
R.id.iv_game -> {
|
||||
val dialog = RoomGameplayDialog()
|
||||
dialog.isOnlyPK = false
|
||||
dialog.listener = object : RoomGameplayDialog.GameplayDialogListener {
|
||||
override fun onShowBaiShunGame(url: String, config: BaiShunGameConfig) {
|
||||
(activity as? AVRoomActivity)?.showBaiShunGame(url, config)
|
||||
}
|
||||
}
|
||||
dialog.show(childFragmentManager, "ROOM_GAME_PLAY")
|
||||
RoomGameListDialog().show(childFragmentManager, "GAME_LIST")
|
||||
}
|
||||
R.id.input_send -> {
|
||||
sendMsg()
|
||||
@@ -828,38 +807,6 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
}
|
||||
|
||||
private fun playConfigWeb(url: String) {
|
||||
CommonWebViewActivity.start(mContext, url)
|
||||
}
|
||||
|
||||
private fun playConfigBaishunGame(configInfo: RightBottomIconConfig) {
|
||||
val roomIcon: RoomIcon = RoomIcon(
|
||||
skipContent = configInfo.skipUrl,
|
||||
skipType = 3,
|
||||
showType = 1,
|
||||
code = "BAISHUN",
|
||||
ruleValue = configInfo.reserve)
|
||||
try {
|
||||
val url = roomIcon.skipContent
|
||||
val ruleValue = Gson().fromJson<RoomIcon.RuleValueBean>(
|
||||
roomIcon.ruleValue,
|
||||
RoomIcon.RuleValueBean::class.java
|
||||
)
|
||||
val config = Gson().fromJson<BaiShunGameConfig>(
|
||||
ruleValue.RESERVE,
|
||||
BaiShunGameConfig::class.java
|
||||
)
|
||||
if (config != null && url != null) {
|
||||
config.reloadDynamicParams()
|
||||
(activity as? AVRoomActivity)?.showBaiShunGame(url, config)
|
||||
} else {
|
||||
SingleToastUtil.showToast(R.string.manager_trtc_trtcengineadapter_042)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendMsg() {
|
||||
val message = inputEdit.text.toString().trim()
|
||||
if (isPublicMessageTab()) {
|
||||
@@ -1487,19 +1434,14 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
RoomMsgActivity.start(mContext)
|
||||
}
|
||||
|
||||
override fun onRoomGameplayClick(isOnlyPK: Boolean) {
|
||||
if (isOnlyPK) {
|
||||
val dialog = RoomGameplayDialog()
|
||||
dialog.isOnlyPK = isOnlyPK
|
||||
dialog.listener = object : RoomGameplayDialog.GameplayDialogListener {
|
||||
override fun onShowBaiShunGame(url: String, config: BaiShunGameConfig) {
|
||||
(activity as? AVRoomActivity)?.showBaiShunGame(url, config)
|
||||
}
|
||||
override fun onRoomGameplayClick() {
|
||||
val dialog = RoomGameplayDialog()
|
||||
dialog.listener = object : RoomGameplayDialog.GameplayDialogListener {
|
||||
override fun onShowBaiShunGame(url: String, config: BaiShunGameConfig) {
|
||||
(activity as? AVRoomActivity)?.showBaiShunGame(url, config)
|
||||
}
|
||||
dialog.show(childFragmentManager, "ROOM_GAME_PLAY")
|
||||
} else {
|
||||
RoomGameListDialog().show(childFragmentManager, "GAME_LIST")
|
||||
}
|
||||
dialog.show(childFragmentManager, "ROOM_GAME_PLAY")
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
@@ -15,13 +14,8 @@ import com.chwl.app.avroom.headline.RoomHeadlineWidget;
|
||||
import com.chwl.app.avroom.online.RoomOnlineWidget;
|
||||
import com.chwl.app.avroom.rank.RoomRankNumberWidget;
|
||||
import com.chwl.app.music.widget.MusicPlayerView;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
||||
import com.chwl.app.ui.webview.DialogWebViewActivity;
|
||||
import com.chwl.core.room.bean.RightBottomIconConfig;
|
||||
import com.chwl.core.room.bean.RoomIcon;
|
||||
import com.chwl.core.room.core.RoomDataService;
|
||||
import com.chwl.core.room.pk.event.PKDataUpdateEvent;
|
||||
import com.chwl.core.support.room.AudioRoomContext;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.trello.rxlifecycle3.android.FragmentEvent;
|
||||
import com.chwl.app.R;
|
||||
@@ -85,7 +79,6 @@ import io.reactivex.Single;
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
|
||||
/**
|
||||
* 轰趴房间
|
||||
@@ -108,8 +101,6 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
private PKMicQueueDialog pkMicQueueDialog;
|
||||
private Disposable roomPkOrderDisposable;
|
||||
|
||||
private boolean hasBaishunGames;
|
||||
|
||||
public static HomePartyRoomFragment newInstance() {
|
||||
HomePartyRoomFragment roomFragment = new HomePartyRoomFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
@@ -158,28 +149,6 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
updateQueuingMicBtn();
|
||||
updatePkScoreBoard();
|
||||
initRoomPkOrder(AvRoomDataManager.get().showPkBeginTime, AvRoomDataManager.get().pkBeginTime);
|
||||
requestData();
|
||||
}
|
||||
|
||||
private void requestData() {
|
||||
RoomDataService dataService = (RoomDataService) AudioRoomContext.Companion.get().findAbility(RoomDataService.class.getSimpleName());
|
||||
String cacheKey = "gameplay_list#" + hashCode();
|
||||
Disposable disposable = AvRoomModel.get().getRoomGamePlayList().doOnError(new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
hasBaishunGames = false;
|
||||
updateConfigButtonArea();
|
||||
}
|
||||
}).subscribe(new Consumer<List<RoomIcon>>() {
|
||||
@Override
|
||||
public void accept(List<RoomIcon> roomIcons) throws Exception {
|
||||
if (dataService != null) {
|
||||
dataService.putData(cacheKey, roomIcons);
|
||||
}
|
||||
hasBaishunGames = roomIcons.size() > 0;
|
||||
updateConfigButtonArea();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -228,7 +197,6 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
gameBinding.setRoomInfo(AvRoomDataManager.get().mCurrentRoomInfo);
|
||||
updateQueuingMicBtn();
|
||||
updatePkScoreBoard();
|
||||
updateConfigButtonArea();
|
||||
getMvpPresenter().updateLeaveMode();
|
||||
break;
|
||||
case RoomEvent.ENTER_ROOM:
|
||||
@@ -502,7 +470,11 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
updateMicroView();
|
||||
changeModelShowView();
|
||||
refreshDatingNextStatus();
|
||||
// updateConfigButtonArea();
|
||||
if (AvRoomDataManager.get().isDatingMode()) {
|
||||
gameBinding.ivGame.setVisibility(View.GONE);
|
||||
} else {
|
||||
gameBinding.ivGame.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateMicroView(){
|
||||
@@ -530,30 +502,6 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
refreshDatingNextStatus();
|
||||
}
|
||||
|
||||
public void updateConfigButtonArea() {
|
||||
RightBottomIconConfig configModel = AvRoomDataManager.get().rightBottomIconConfig;
|
||||
if (configModel == null) {
|
||||
gameBinding.ivConfigEntrance.setVisibility(View.GONE);
|
||||
} else {
|
||||
if (configModel.getIcon1Url() == null) {
|
||||
gameBinding.ivConfigEntrance.setVisibility(View.GONE);
|
||||
} else {
|
||||
ImageLoadUtils.loadAvatar(configModel.getIcon1Url(), gameBinding.ivConfigEntrance);
|
||||
gameBinding.ivConfigEntrance.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (configModel.getIcon2Url() != null) {
|
||||
ImageLoadUtils.loadAvatar(configModel.getIcon2Url(), gameBinding.ivGame);
|
||||
}
|
||||
}
|
||||
|
||||
if (hasBaishunGames) {
|
||||
gameBinding.ivGame.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
gameBinding.ivGame.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateQueuingMicBtn() {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
|
||||
bottomView.updateQueuingMicButton();
|
||||
@@ -616,6 +564,7 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onDatingSelectUserEvent(DatingSelectUserEvent event) {
|
||||
if (getMvpPresenter() != null) {
|
||||
|
@@ -26,7 +26,6 @@ import com.chwl.app.fansteam.FansTeamJoinActivity
|
||||
import com.chwl.app.fansteam.FansTeamJoinedActivity
|
||||
import com.chwl.app.fansteam.FansTeamViewModel
|
||||
import com.chwl.app.music.widget.MusicPlayerView
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
||||
import com.chwl.app.ui.webview.DialogWebViewActivity
|
||||
import com.chwl.core.UriProvider
|
||||
@@ -37,10 +36,6 @@ import com.chwl.core.im.custom.bean.RequestUpmicAttachment
|
||||
import com.chwl.core.im.custom.bean.RoomPKAttachment
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
import com.chwl.core.manager.RoomEvent
|
||||
import com.chwl.core.room.core.RoomDataService
|
||||
import com.chwl.core.room.model.AvRoomModel
|
||||
import com.chwl.core.support.room.AudioRoomContext.Companion.get
|
||||
import com.chwl.core.support.room.RoomAbility
|
||||
import com.chwl.core.user.bean.UserInfo
|
||||
import com.chwl.library.base.factory.CreatePresenter
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
@@ -68,8 +63,6 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
private lateinit var gameBinding: FragmentSingleRoomBinding
|
||||
private lateinit var upMicDialog: RequestUpMicDialog
|
||||
|
||||
private var hasBaishunGames = false
|
||||
|
||||
private val fansTeamViewModel: FansTeamViewModel by viewModels()
|
||||
override fun getRootLayoutId(): Int {
|
||||
return R.layout.fragment_single_room
|
||||
|
@@ -3,13 +3,13 @@ package com.chwl.app.avroom.room_album
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import com.hjq.toast.ToastUtils
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogLockRoomAlbumPhotoBinding
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2
|
||||
import com.chwl.core.gift.bean.GiftReceiveInfo
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
|
||||
class UnlockRoomAlbumPhotoDialog : BaseDialogFragment<DialogLockRoomAlbumPhotoBinding>(){
|
||||
class UnlockRoomAlbumPhotoDialog : BaseDialog<DialogLockRoomAlbumPhotoBinding>(){
|
||||
|
||||
var onUnlockRoomPhotoListener: OnUnlockRoomPhotoListener? = null
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import androidx.core.view.isVisible
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSingleRoomPkFinishBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.im.custom.bean.RoomPkBean
|
||||
@@ -14,7 +14,7 @@ import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class SingleRoomPkFinishDialog : BaseDialogFragment<DialogSingleRoomPkFinishBinding>() {
|
||||
class SingleRoomPkFinishDialog : BaseDialog<DialogSingleRoomPkFinishBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -4,13 +4,13 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSingleRoomPkForceFinishBinding
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.core.im.custom.bean.RoomPkBean
|
||||
import com.chwl.core.utils.extension.subAndReplaceDot
|
||||
|
||||
class SingleRoomPkForceFinishDialog : BaseDialogFragment<DialogSingleRoomPkForceFinishBinding>() {
|
||||
class SingleRoomPkForceFinishDialog : BaseDialog<DialogSingleRoomPkForceFinishBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -4,7 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.core.view.isVisible
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSingleRoomPkReceivedBinding
|
||||
import com.chwl.core.im.custom.bean.RoomPkBean
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
@@ -17,7 +17,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class SingleRoomPkReceivedDialog : BaseDialogFragment<DialogSingleRoomPkReceivedBinding>() {
|
||||
class SingleRoomPkReceivedDialog : BaseDialog<DialogSingleRoomPkReceivedBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package com.chwl.app.avroom.singleroompk
|
||||
|
||||
import android.text.method.ScrollingMovementMethod
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSingleRoomPkRuleBinding
|
||||
import com.chwl.core.room.anotherroompk.SingleRoomPKModel
|
||||
import com.chwl.core.utils.extension.toast
|
||||
|
||||
class SingleRoomPkRuleDialog : BaseDialogFragment<DialogSingleRoomPkRuleBinding>() {
|
||||
class SingleRoomPkRuleDialog : BaseDialog<DialogSingleRoomPkRuleBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -16,11 +16,12 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
import com.chwl.core.manager.AvRoomDataManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.chwl.app.avroom.activity.RoomTypeSwitchActivity;
|
||||
import com.chwl.app.avroom.dialog.RoomGameplayDialog;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
import com.netease.nim.uikit.api.NimUIKit;
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
@@ -29,6 +30,7 @@ import com.netease.nimlib.sdk.uinfo.model.UserInfo;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.avroom.BottomViewListenerWrapper;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
||||
import com.chwl.app.vip.VipMainActivity;
|
||||
import com.chwl.app.room_chat.activity.RoomMsgActivity;
|
||||
import com.chwl.core.helper.ImHelperUtils;
|
||||
import com.chwl.core.manager.AvRoomDataManager;
|
||||
@@ -73,10 +75,6 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
private ImageView iconMicQueue;
|
||||
private ImageView iconRoomMsg;
|
||||
|
||||
private ImageView iconRoomBaiShunGame;
|
||||
|
||||
private ImageView pkGameView;
|
||||
|
||||
@Nullable
|
||||
private PopupWindow msgTipPopupWindow;
|
||||
@NonNull
|
||||
@@ -108,12 +106,11 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
remoteMute = findViewById(R.id.icon_room_open_remote_mic);
|
||||
faceLayout = findViewById(R.id.room_face_layout);
|
||||
micLayout = findViewById(R.id.room_mic_layout);
|
||||
iconRoomBaiShunGame = findViewById(R.id.icon_room_baishun_game);
|
||||
|
||||
iconMicQueue = (ImageView) findViewById(R.id.icon_mic_queue);
|
||||
|
||||
iconRoomMsg = findViewById(R.id.iv_room_message);
|
||||
pkGameView = findViewById(R.id.icon_room_PK_game);
|
||||
ImageView gameView = findViewById(R.id.icon_room_game);
|
||||
openMic.setOnClickListener(this);
|
||||
sendMsgInput.setOnClickListener(this);
|
||||
sendFace.setOnClickListener(this);
|
||||
@@ -122,8 +119,7 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
sendMagic.setOnClickListener(this);
|
||||
iconMicQueue.setOnClickListener(this);
|
||||
iconRoomMsg.setOnClickListener(this);
|
||||
pkGameView.setOnClickListener(this);
|
||||
iconRoomBaiShunGame.setOnClickListener(this);
|
||||
gameView.setOnClickListener(this);
|
||||
|
||||
setMicBtnEnable(false);
|
||||
setMicBtnOpen(false);
|
||||
@@ -247,10 +243,6 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
public void setBaiShunBtnOpen(boolean isOpen) {
|
||||
iconRoomBaiShunGame.setVisibility(isOpen ? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
public void notifyStateChanged() {
|
||||
setMagicBtnEnable(true);
|
||||
}
|
||||
@@ -260,21 +252,6 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
micLayout.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
public void updateGameEntrance() {
|
||||
if (AvRoomDataManager.get().isManager() || SuperAdminUtil.isSuperAdmin()) {
|
||||
if (!AvRoomDataManager.get().isCpRoom()) {
|
||||
pkGameView.setVisibility(VISIBLE);
|
||||
iconRoomBaiShunGame.setVisibility(VISIBLE);
|
||||
}
|
||||
} else {
|
||||
pkGameView.setVisibility(GONE);
|
||||
iconRoomBaiShunGame.setVisibility(GONE);
|
||||
}
|
||||
if (AvRoomDataManager.get().isSingleRoom() || AvRoomDataManager.get().isDatingMode()) {
|
||||
pkGameView.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void showHomePartyDownMicBottom() {
|
||||
faceLayout.setVisibility(GONE);
|
||||
micLayout.setVisibility(GONE);
|
||||
@@ -374,14 +351,9 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
wrapper.onRoomMessageClick();
|
||||
}
|
||||
break;
|
||||
case R.id.icon_room_PK_game:
|
||||
case R.id.icon_room_game:
|
||||
if (wrapper != null) {
|
||||
wrapper.onRoomGameplayClick(true);
|
||||
}
|
||||
break;
|
||||
case R.id.icon_room_baishun_game:
|
||||
if (wrapper != null) {
|
||||
wrapper.onRoomGameplayClick(false);
|
||||
wrapper.onRoomGameplayClick();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@@ -2286,7 +2286,7 @@ public class MessageView extends FrameLayout {
|
||||
})
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
text.append(luckyGiftInfo.getFirstGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
text.append(luckyGiftInfo.getGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
@@ -2341,7 +2341,7 @@ public class MessageView extends FrameLayout {
|
||||
})
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
text.append(luckyGiftInfo.getFirstGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
text.append(luckyGiftInfo.getGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
|
@@ -17,7 +17,7 @@ import com.trello.rxlifecycle3.components.support.RxDialogFragment
|
||||
import kotlinx.coroutines.launch
|
||||
import java.lang.reflect.ParameterizedType
|
||||
|
||||
abstract class BaseDialogFragment<T : ViewBinding> : RxDialogFragment() {
|
||||
abstract class BaseDialog<T : ViewBinding> : RxDialogFragment() {
|
||||
|
||||
val isViewLoaded: Boolean get() = _binding != null
|
||||
protected var _binding: T? = null
|
@@ -1,13 +1,9 @@
|
||||
package com.chwl.app.home.adapter
|
||||
|
||||
import android.graphics.Rect
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.RecycledViewPool
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
@@ -15,54 +11,14 @@ import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.app.ui.utils.loadFromAssets
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
import com.example.lib_utils.AppUtils
|
||||
import com.example.lib_utils.UiUtils
|
||||
import com.opensource.svgaplayer.SVGADrawable
|
||||
import com.opensource.svgaplayer.SVGAImageView
|
||||
|
||||
/**
|
||||
* create by lvzebiao @2019/11/13
|
||||
*/
|
||||
class HomeRoomAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.home_item_room) {
|
||||
private var micUserItemViewPool = RecycledViewPool().apply {
|
||||
setMaxRecycledViews(0, 50)
|
||||
}
|
||||
|
||||
private val isRTL = UiUtils.isRtl(AppUtils.getApp())
|
||||
|
||||
override fun onCreateDefViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||
return super.onCreateDefViewHolder(parent, viewType).apply {
|
||||
val micUserRecyclerView = this.getView<RecyclerView>(R.id.recycler_view_users)
|
||||
micUserRecyclerView.setOnTouchListener { v, event -> true }
|
||||
micUserRecyclerView.setRecycledViewPool(micUserItemViewPool)
|
||||
micUserRecyclerView.setHasFixedSize(true)
|
||||
micUserRecyclerView.layoutManager =
|
||||
LinearLayoutManager(parent.context, RecyclerView.HORIZONTAL, false).apply {
|
||||
this.recycleChildrenOnDetach = true
|
||||
this.isSmoothScrollbarEnabled
|
||||
}
|
||||
micUserRecyclerView.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||
val offset = AppUtils.getApp().resources.getDimensionPixelOffset(R.dimen.dp_4) * -1
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
) {
|
||||
super.getItemOffsets(outRect, view, parent, state)
|
||||
val position = parent.getChildAdapterPosition(view)
|
||||
if (position != 0) {
|
||||
if (isRTL) {
|
||||
outRect.right = offset
|
||||
} else {
|
||||
outRect.left = offset
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
micUserRecyclerView.adapter = HomeRoomUserAdapter()
|
||||
}
|
||||
}
|
||||
class HomeRoomAdapter :
|
||||
BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.home_item_room) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: HomeRoomInfo) {
|
||||
helper.apply {
|
||||
@@ -72,10 +28,18 @@ class HomeRoomAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.
|
||||
setText(R.id.tv_desc, item.roomDesc)
|
||||
}
|
||||
|
||||
val micUserRecyclerView = helper.getView<RecyclerView>(R.id.recycler_view_users)
|
||||
val userAdapter = micUserRecyclerView.adapter as HomeRoomUserAdapter
|
||||
userAdapter.setNewData(item.micUsers)
|
||||
|
||||
val avatars: Array<ImageView> = arrayOf(
|
||||
helper.getView(R.id.iv_avatar_0),
|
||||
helper.getView(R.id.iv_avatar_1),
|
||||
helper.getView(R.id.iv_avatar_2),
|
||||
helper.getView(R.id.iv_avatar_3),
|
||||
helper.getView(R.id.iv_avatar_4)
|
||||
)
|
||||
for (i in avatars.indices) {
|
||||
val avatarUrl = item.micUsers?.getOrNull(i)?.avatar
|
||||
avatars[i].isInvisible = avatarUrl.isNullOrBlank()
|
||||
avatars[i].load(avatarUrl)
|
||||
}
|
||||
val topView = helper.getView<ImageView>(R.id.iv_top)
|
||||
if (item.isHourTop1 == 1) {
|
||||
topView.setImageResource(R.drawable.home_room_bg_hour_top)
|
||||
|
@@ -1,16 +0,0 @@
|
||||
package com.chwl.app.home.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.core.home.bean.MicUsersBean
|
||||
|
||||
class HomeRoomUserAdapter :
|
||||
BaseQuickAdapter<MicUsersBean, BaseViewHolder>(R.layout.home_item_room_user) {
|
||||
override fun convert(helper: BaseViewHolder, item: MicUsersBean?) {
|
||||
val avatarView = helper.getView<ImageView>(R.id.iv_avatar)
|
||||
avatarView.loadAvatar(item?.avatar)
|
||||
}
|
||||
}
|
@@ -7,14 +7,14 @@ import android.view.WindowManager
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isGone
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogHelloMessageBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.app.room_chat.activity.RoomMsgActivity
|
||||
import com.chwl.core.channel_page.bean.HelloMessageInfo
|
||||
import com.chwl.library.utils.ResUtil
|
||||
|
||||
class HelloMessageDialog : BaseDialogFragment<DialogHelloMessageBinding>() {
|
||||
class HelloMessageDialog : BaseDialog<DialogHelloMessageBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -4,13 +4,13 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.avroom.activity.AVRoomActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogNewUserHelloBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.channel_page.bean.NewUserHelloInfo
|
||||
import com.chwl.core.utils.extension.subAndReplaceDot
|
||||
|
||||
class NewUserHelloDialog : BaseDialogFragment<DialogNewUserHelloBinding>() {
|
||||
class NewUserHelloDialog : BaseDialog<DialogNewUserHelloBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -3,12 +3,12 @@ package com.chwl.app.home.dialog
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import com.chwl.app.avroom.activity.AVRoomActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogRecommendRoomBinding
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
|
||||
class RecommendRoomDialog : BaseDialogFragment<DialogRecommendRoomBinding>() {
|
||||
class RecommendRoomDialog : BaseDialog<DialogRecommendRoomBinding>() {
|
||||
|
||||
companion object {
|
||||
|
||||
|
@@ -139,7 +139,7 @@ class ContactsListFragment : BaseViewBindingFragment<FragmentContactListBinding>
|
||||
}
|
||||
|
||||
override fun onScroll(
|
||||
e1: MotionEvent?,
|
||||
e1: MotionEvent,
|
||||
e2: MotionEvent,
|
||||
distanceX: Float,
|
||||
distanceY: Float
|
||||
@@ -151,7 +151,7 @@ class ContactsListFragment : BaseViewBindingFragment<FragmentContactListBinding>
|
||||
}
|
||||
|
||||
override fun onFling(
|
||||
e1: MotionEvent?,
|
||||
e1: MotionEvent,
|
||||
e2: MotionEvent,
|
||||
velocityX: Float,
|
||||
velocityY: Float
|
||||
|
@@ -198,7 +198,7 @@ class HomeRecommendFragment : BaseViewBindingFragment<FragmentHomeRecommendBindi
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
val itemId = getItemId(position)
|
||||
return HomeTabRoomFragment.newInstance(itemId.toInt()).apply {
|
||||
this.autoRefreshOnVisible = true
|
||||
autoRefreshOnVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.chwl.app.home.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
@@ -1,202 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.invite
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.lifecycle.repeatOnLifecycle
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.common.widget.dialog.DialogManager
|
||||
import com.chwl.app.databinding.GameTeamInviteDialogBinding
|
||||
import com.chwl.app.ui.pay.ChargeActivity
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.game_team.UserGameTeamInfo
|
||||
import com.chwl.core.pay.PayModel
|
||||
import com.chwl.core.pay.bean.WalletInfo
|
||||
import com.chwl.core.utils.net.BalanceNotEnoughExeption
|
||||
import com.chwl.library.utils.ResUtil
|
||||
import com.chwl.library.utils.SingleToastUtil
|
||||
import com.example.lib_utils.ktx.singleClick
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.launch
|
||||
import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
|
||||
|
||||
class GameTeamInviteDialog : BaseDialogFragment<GameTeamInviteDialogBinding>() {
|
||||
|
||||
private val viewModel: GameTeamInviteViewModel by viewModels()
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.CENTER
|
||||
|
||||
private var gameId: Long = 0
|
||||
private var gameUid: Long = 0
|
||||
private var gameBackground: String? = null
|
||||
private var gamePrice: Long = 0
|
||||
private var gameInning: Long = 1
|
||||
private var dialogManager: DialogManager? = null
|
||||
|
||||
var successListener: (() -> Unit)? = null
|
||||
|
||||
companion object {
|
||||
fun newInstance(info: UserGameTeamInfo): GameTeamInviteDialog {
|
||||
return newInstance(info.uid ?: 0, info.gameId ?: 0, info.pic, info.price ?: 0, 1)
|
||||
}
|
||||
|
||||
fun newInstance(
|
||||
targetUid: Long,
|
||||
gameId: Long,
|
||||
gameBackground: String?,
|
||||
gamePrice: Long,
|
||||
gameInning: Long,
|
||||
): GameTeamInviteDialog {
|
||||
return GameTeamInviteDialog().apply {
|
||||
arguments = Bundle().apply {
|
||||
putLong("targetUid", targetUid)
|
||||
putLong("gameId", gameId)
|
||||
putSerializable("gameBackground", gameBackground)
|
||||
putLong("gamePrice", gamePrice)
|
||||
putLong("gameInning", gameInning)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
gameUid = arguments?.getLong("targetUid") ?: 0
|
||||
gameId = arguments?.getLong("gameId") ?: 0
|
||||
gameBackground = arguments?.getString("gameBackground")
|
||||
gamePrice = arguments?.getLong("gamePrice") ?: 0
|
||||
gameInning = arguments?.getLong("gameInning") ?: 1
|
||||
dialogManager = DialogManager(requireContext())
|
||||
initView()
|
||||
initEvent()
|
||||
initObserve()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
updateBalance()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
binding.ivGameImage.load(gameBackground)
|
||||
updateInning(0)
|
||||
requestBalance()
|
||||
}
|
||||
|
||||
private fun initEvent() {
|
||||
binding.ivClose.setOnClickListener {
|
||||
safeDismiss()
|
||||
}
|
||||
|
||||
binding.tvPay.singleClick {
|
||||
pay()
|
||||
}
|
||||
|
||||
binding.layoutRecharge.setOnClickListener {
|
||||
ChargeActivity.start(context)
|
||||
}
|
||||
|
||||
binding.ivCountAdd.setOnClickListener {
|
||||
updateInning(1)
|
||||
}
|
||||
|
||||
binding.ivCountSubtract.setOnClickListener {
|
||||
updateInning(-1)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initObserve() {
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
viewLifecycleOwner.lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||
viewModel.payResultFlow.collectLatest {
|
||||
dialogManager?.dismissDialog()
|
||||
if (it.isSuccess) {
|
||||
successListener?.invoke()
|
||||
SingleToastUtil.showToast(R.string.game_team_19)
|
||||
safeDismiss()
|
||||
} else if (it.code == BalanceNotEnoughExeption.code) {
|
||||
showBalanceNotEnoughDialog()
|
||||
} else {
|
||||
it.message?.let { msg ->
|
||||
SingleToastUtil.showToast(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showBalanceNotEnoughDialog() {
|
||||
dialogManager?.showOkCancelDialog(
|
||||
ResUtil.getString(R.string.widget_dialog_dialoguihelper_04),
|
||||
ResUtil.getString(R.string.treasure_to_charge)
|
||||
) {
|
||||
ChargeActivity.start(context)
|
||||
}
|
||||
}
|
||||
|
||||
private fun pay() {
|
||||
dialogManager?.showProgressDialog(requireContext())
|
||||
viewModel.pay(gameId, gameUid, gameInning)
|
||||
}
|
||||
|
||||
private fun updateInning(add: Int) {
|
||||
var newInning = gameInning + add
|
||||
if (newInning <= 0) {
|
||||
newInning = 1
|
||||
}
|
||||
gameInning = newInning
|
||||
if (gameInning <= 1L) {
|
||||
binding.ivCountSubtract.setImageResource(R.drawable.game_team_invite_ic_subtract_disabled)
|
||||
binding.ivCountSubtract.isEnabled = false
|
||||
} else {
|
||||
binding.ivCountSubtract.setImageResource(R.drawable.game_team_invite_ic_subtract)
|
||||
binding.ivCountSubtract.isEnabled = true
|
||||
}
|
||||
binding.tvCount.text = gameInning.toString()
|
||||
updateMoney()
|
||||
}
|
||||
|
||||
private fun updateMoney() {
|
||||
val total = gamePrice * gameInning
|
||||
binding.tvMoney.text = total.toString()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun updateBalance() {
|
||||
if (_binding == null) {
|
||||
return
|
||||
}
|
||||
val balanceTitle = getString(R.string.gift_wallet_overage)
|
||||
val balanceValue = PayModel.get().currentWalletInfo?.diamondNum ?: 0.0
|
||||
var balanceBigDecimal = BigDecimal.valueOf(balanceValue)
|
||||
balanceBigDecimal = balanceBigDecimal.setScale(0, RoundingMode.DOWN)
|
||||
binding.tvBalance.text = "$balanceTitle${balanceBigDecimal.toPlainString()}"
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun requestBalance() {
|
||||
PayModel.get().myRemoteWalletInfo.compose<WalletInfo>(bindToLifecycle())
|
||||
.subscribe { info: WalletInfo ->
|
||||
updateBalance()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
dialogManager?.dismissDialog()
|
||||
dialogManager = null
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
successListener = null
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.invite
|
||||
|
||||
import com.chwl.app.base.BaseViewModel
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.bean.response.BeanResult
|
||||
import com.chwl.core.room.game.GameModel
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
|
||||
class GameTeamInviteViewModel : BaseViewModel() {
|
||||
|
||||
var payResultFlow = MutableSharedFlow<BeanResult<Any>>()
|
||||
|
||||
fun pay(gameId: Long, gameUid: Long, inning: Long) {
|
||||
safeLaunch(onError = {
|
||||
payResultFlow.emit(BeanResult.failed(it))
|
||||
}) {
|
||||
val result =
|
||||
GameModel.startGameTeam(gameId, gameUid, inning, AuthModel.get().currentUid)
|
||||
payResultFlow.emit(BeanResult.success(result))
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,63 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.record
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.CommonVPAdapter
|
||||
import com.chwl.app.base.BaseViewBindingActivity
|
||||
import com.chwl.app.databinding.GameTeamRecordActivityBinding
|
||||
import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
import com.chwl.library.utils.ResUtil
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
|
||||
class GameTeamRecordActivity : BaseViewBindingActivity<GameTeamRecordActivityBinding>() {
|
||||
|
||||
companion object {
|
||||
fun start(context: Context) {
|
||||
context.startActivity(Intent(context, GameTeamRecordActivity::class.java))
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.game_team_09))
|
||||
initTab()
|
||||
}
|
||||
|
||||
private fun initTab() {
|
||||
val fragmentList = ArrayList<Fragment>()
|
||||
fragmentList.add(GameTeamRecordFragment.newInstance(GameTeamRecordFragment.TYPE_INITIATOR))
|
||||
fragmentList.add(GameTeamRecordFragment.newInstance(GameTeamRecordFragment.TYPE_RECEIVER))
|
||||
val titleList = ArrayList<String>()
|
||||
titleList.add(getString(R.string.game_team_10))
|
||||
titleList.add(getString(R.string.game_team_11))
|
||||
val commonNavigator = CommonNavigator(context)
|
||||
commonNavigator.setTitleWrapContent(false)
|
||||
val magicIndicatorAdapter = GameTeamRecordIndicatorAdapter(context, titleList)
|
||||
magicIndicatorAdapter.setOnItemSelectListener { position: Int, view: TextView? ->
|
||||
binding.viewPager.currentItem = position
|
||||
}
|
||||
commonNavigator.adapter = magicIndicatorAdapter
|
||||
binding.magicIndicator.navigator = commonNavigator
|
||||
binding.viewPager.offscreenPageLimit = 2
|
||||
binding.viewPager.adapter = CommonVPAdapter(
|
||||
supportFragmentManager,
|
||||
lifecycle,
|
||||
fragmentList
|
||||
)
|
||||
binding.viewPager.isUserInputEnabled = false
|
||||
ViewPagerHelper.bind(binding.magicIndicator, binding.viewPager)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.record
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isVisible
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.core.game_team.GameTeamRecordBean
|
||||
|
||||
class GameTeamRecordAdapter :
|
||||
BaseQuickAdapter<GameTeamRecordBean, BaseViewHolder>(R.layout.game_team_record_item) {
|
||||
|
||||
var isInitiator = false
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: GameTeamRecordBean?) {
|
||||
helper.addOnClickListener(R.id.tv_repurchase, R.id.tv_chat, R.id.iv_order_id_copy)
|
||||
val userAvatarView = helper.getView<ImageView>(R.id.iv_user_avatar)
|
||||
val repurchaseView = helper.getView<View>(R.id.tv_repurchase)
|
||||
if (isInitiator) {
|
||||
repurchaseView.isVisible = true
|
||||
helper.setText(R.id.tv_user_name, item?.toNick ?: "")
|
||||
helper.setText(R.id.tv_user_id, item?.toErBanNo?.toString() ?: "")
|
||||
userAvatarView.load(item?.toAvatar)
|
||||
} else {
|
||||
repurchaseView.isVisible = false
|
||||
helper.setText(R.id.tv_user_name, item?.fromNick ?: "")
|
||||
helper.setText(R.id.tv_user_id, item?.fromErBanNo?.toString() ?: "")
|
||||
userAvatarView.load(item?.fromAvatar)
|
||||
}
|
||||
helper.setText(R.id.tv_game_name, item?.gameName ?: "")
|
||||
helper.setText(R.id.tv_order_money, item?.amount?.toString())
|
||||
helper.setText(R.id.tv_order_time, item?.orderTime)
|
||||
helper.setText(R.id.tv_order_id, item?.orderNo)
|
||||
}
|
||||
}
|
@@ -1,154 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.record
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.GameTemaRecordFragmentBinding
|
||||
import com.chwl.app.ui.game_team.invite.GameTeamInviteDialog
|
||||
import com.chwl.app.ui.im.avtivity.NimP2PMessageActivity
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.utils.ClipboardUtils
|
||||
import com.chwl.core.game_team.GameTeamRecordBean
|
||||
import com.chwl.library.utils.SingleToastUtil
|
||||
|
||||
class GameTeamRecordFragment : BaseViewBindingFragment<GameTemaRecordFragmentBinding>() {
|
||||
|
||||
companion object {
|
||||
const val TYPE_INITIATOR = 0
|
||||
const val TYPE_RECEIVER = 1
|
||||
fun newInstance(type: Int): GameTeamRecordFragment {
|
||||
return GameTeamRecordFragment().apply {
|
||||
arguments = Bundle().apply {
|
||||
putInt("type", type)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: GameTeamRecordViewModel by viewModels()
|
||||
private val adapter = GameTeamRecordAdapter()
|
||||
|
||||
private var type: Int = TYPE_INITIATOR
|
||||
|
||||
private var rvDelegate: RVDelegate<GameTeamRecordBean>? = null
|
||||
|
||||
private var pageNum = 1
|
||||
|
||||
private val pageSize = 20
|
||||
|
||||
override fun init() {
|
||||
type = arguments?.getInt("type", TYPE_INITIATOR) ?: TYPE_INITIATOR
|
||||
initView()
|
||||
initEvent()
|
||||
initObserve()
|
||||
binding.swipeRefresh.isRefreshing = true
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
adapter.isInitiator = type == TYPE_INITIATOR
|
||||
binding.recyclerView.adapter = adapter
|
||||
rvDelegate = RVDelegate.Builder<GameTeamRecordBean>()
|
||||
.setPageSize(pageSize)
|
||||
.setAdapter(adapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewHeight(
|
||||
context,
|
||||
getString(R.string.data_empty)
|
||||
)
|
||||
)
|
||||
.setLayoutManager(LinearLayoutManager(mContext))
|
||||
.build()
|
||||
}
|
||||
|
||||
private fun initEvent() {
|
||||
adapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
val item = (adapter.getItem(position) as? GameTeamRecordBean)
|
||||
?: return@setOnItemChildClickListener
|
||||
|
||||
when (view.id) {
|
||||
R.id.tv_repurchase -> {
|
||||
jumpRepurchase(item)
|
||||
}
|
||||
|
||||
R.id.tv_chat -> {
|
||||
jumpChat(item)
|
||||
}
|
||||
|
||||
R.id.iv_order_id_copy -> {
|
||||
ClipboardUtils.copyText(item.orderNo ?: "")
|
||||
toast(getString(R.string.have_copy))
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.swipeRefresh.setOnRefreshListener {
|
||||
loadData(true)
|
||||
}
|
||||
adapter.setOnLoadMoreListener({
|
||||
loadData(false)
|
||||
}, binding.recyclerView)
|
||||
}
|
||||
|
||||
private fun initObserve() {
|
||||
viewModel.listLiveData.observe(this) {
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
rvDelegate?.loadData(it)
|
||||
if (!it.isSuccess && it.message != null) {
|
||||
toast(it.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun jumpRepurchase(item: GameTeamRecordBean) {
|
||||
val uid = getTargetUidByItem(item)
|
||||
val gameId = item.gameId
|
||||
val gameBackground = item.gamePic
|
||||
val gamePrice = item.price ?: 0
|
||||
val gameInning = item.inning ?: 1
|
||||
if (uid == null || gameId == null) {
|
||||
toast(R.string.data_parsing_exception)
|
||||
return
|
||||
}
|
||||
GameTeamInviteDialog.newInstance(
|
||||
targetUid = uid,
|
||||
gameId = gameId,
|
||||
gameBackground = gameBackground,
|
||||
gamePrice = gamePrice,
|
||||
gameInning = gameInning
|
||||
).apply {
|
||||
this.successListener = {
|
||||
loadData(true)
|
||||
}
|
||||
}.safeShow(requireActivity().supportFragmentManager, requireActivity())
|
||||
}
|
||||
|
||||
private fun jumpChat(item: GameTeamRecordBean) {
|
||||
val targetUid = getTargetUidByItem(item)?.toString()
|
||||
if (targetUid.isNullOrEmpty()) {
|
||||
return
|
||||
}
|
||||
NimP2PMessageActivity.start(requireContext(), targetUid)
|
||||
}
|
||||
|
||||
private fun getTargetUidByItem(item: GameTeamRecordBean): Long? {
|
||||
val targetUid = if (type == TYPE_INITIATOR) {
|
||||
item.toUid
|
||||
} else {
|
||||
item.fromUid
|
||||
}
|
||||
return targetUid
|
||||
}
|
||||
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
if (isRefresh) {
|
||||
pageNum = 1
|
||||
} else {
|
||||
pageNum++
|
||||
}
|
||||
viewModel.getRecordList(type, pageNum, pageSize)
|
||||
}
|
||||
}
|
@@ -1,103 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.record;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.ui.widget.XRecyclerView.ScaleTransitionPagerTitleView;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GameTeamRecordIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
private final Context mContext;
|
||||
private final List<? extends CharSequence> mTitleList;
|
||||
|
||||
private int textSize = 14;
|
||||
private float minScale = 1f;
|
||||
private boolean showIndicator = true;
|
||||
private OnItemSelectListener mOnItemSelectListener;
|
||||
|
||||
public GameTeamRecordIndicatorAdapter(Context context, List<? extends CharSequence> charSequences) {
|
||||
this.mContext = context;
|
||||
this.mTitleList = charSequences;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mTitleList == null ? 0 : mTitleList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int i) {
|
||||
ScaleTransitionPagerTitleView scaleTransitionPagerTitleView = new ScaleTransitionPagerTitleView(context, true);
|
||||
scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(context, R.color.color_66000000));
|
||||
scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(context, R.color.color_000000));
|
||||
scaleTransitionPagerTitleView.setMinScale(minScale);
|
||||
scaleTransitionPagerTitleView.setTextSize(textSize);
|
||||
int padding = UIUtil.dip2px(context, 13);
|
||||
scaleTransitionPagerTitleView.setPadding(padding, 0, padding, 0);
|
||||
scaleTransitionPagerTitleView.setText(mTitleList.get(i));
|
||||
scaleTransitionPagerTitleView.setOnClickListener(view -> {
|
||||
if (mOnItemSelectListener != null) {
|
||||
mOnItemSelectListener.onItemSelect(i, scaleTransitionPagerTitleView);
|
||||
}
|
||||
|
||||
});
|
||||
return scaleTransitionPagerTitleView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setLineHeight(context.getResources().getDimensionPixelOffset(R.dimen.dp_3));
|
||||
indicator.setRoundRadius(context.getResources().getDimensionPixelOffset(R.dimen.dp_2));
|
||||
indicator.setLineWidth(context.getResources().getDimensionPixelOffset(R.dimen.dp_13));
|
||||
indicator.setColors(context.getResources().getColor(R.color.color_0FCA81));
|
||||
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
// lp.bottomMargin = mBottomMargin;
|
||||
indicator.setLayoutParams(lp);
|
||||
return indicator;
|
||||
}
|
||||
|
||||
public int getTextSize() {
|
||||
return textSize;
|
||||
}
|
||||
|
||||
public void setTextSize(int textSize) {
|
||||
this.textSize = textSize;
|
||||
}
|
||||
|
||||
public float getMinScale() {
|
||||
return minScale;
|
||||
}
|
||||
|
||||
public void setMinScale(float minScale) {
|
||||
this.minScale = minScale;
|
||||
}
|
||||
|
||||
public boolean isShowIndicator() {
|
||||
return showIndicator;
|
||||
}
|
||||
|
||||
public void setShowIndicator(boolean showIndicator) {
|
||||
this.showIndicator = showIndicator;
|
||||
}
|
||||
|
||||
public void setOnItemSelectListener(OnItemSelectListener onItemSelectListener) {
|
||||
mOnItemSelectListener = onItemSelectListener;
|
||||
}
|
||||
|
||||
public interface OnItemSelectListener {
|
||||
void onItemSelect(int position, TextView view);
|
||||
}
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
package com.chwl.app.ui.game_team.record
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.chwl.app.base.BaseViewModel
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.bean.response.ListResult
|
||||
import com.chwl.core.game_team.GameTeamRecordBean
|
||||
import com.chwl.core.room.game.GameModel
|
||||
|
||||
class GameTeamRecordViewModel : BaseViewModel() {
|
||||
|
||||
val listLiveData = MutableLiveData<ListResult<GameTeamRecordBean>>()
|
||||
|
||||
fun getRecordList(type: Int, pageNum: Int, pageSize: Int) {
|
||||
safeLaunch(onError = {
|
||||
listLiveData.postValue(ListResult.failed(pageNum, it))
|
||||
}) {
|
||||
val list =
|
||||
GameModel.getGameTeamRecordList(type, pageNum, pageSize, AuthModel.get().currentUid)
|
||||
listLiveData.postValue(ListResult.success(list, pageNum))
|
||||
}
|
||||
}
|
||||
}
|
@@ -71,11 +71,6 @@ public class GiftInfoVm extends BaseItem<GiftInfo> {
|
||||
*/
|
||||
public boolean isSuperLuckyGift;
|
||||
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
public String giftName;
|
||||
|
||||
public GiftInfoVm(Context context, GiftInfo data, boolean select, boolean isKnap) {
|
||||
super(context, data);
|
||||
this.isSelect.set(select);
|
||||
@@ -115,7 +110,6 @@ public class GiftInfoVm extends BaseItem<GiftInfo> {
|
||||
SimpleVipInfo vipInfo = data.getGiftVipInfo();
|
||||
isLocked = vipInfo != null && VipHelper.getMyVipLevel() < vipInfo.getVipLevel();
|
||||
vipIcon = vipInfo == null ? "" : vipInfo.getVipIcon();
|
||||
giftName = data.getFirstGiftName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -5,10 +5,8 @@ import android.content.Context;
|
||||
import com.chwl.app.community.holder.DynamicSysHolder;
|
||||
import com.chwl.app.community.im.WorldDynamicShareViewHolder;
|
||||
import com.chwl.app.module_hall.im.msgholder.FamilyMsgViewHolder;
|
||||
import com.chwl.app.ui.im.chat.GameTeamInviteViewHolder;
|
||||
import com.chwl.core.community.attachment.DynamicSysAttachment;
|
||||
import com.chwl.core.community.im.WorldDynamicAttachment;
|
||||
import com.chwl.core.im.custom.bean.GameTeamInviteAttachment;
|
||||
import com.chwl.core.module_hall.im.FamilyAttachment;
|
||||
import com.netease.nim.uikit.api.NimUIKit;
|
||||
import com.netease.nim.uikit.api.model.contact.ContactEventListener;
|
||||
@@ -171,9 +169,6 @@ public class ImInitHelper {
|
||||
// 客服充值
|
||||
NimUIKit.registerMsgItemViewHolder(P2PContactRechargeAttachment.class, MsgViewHolderP2PContactRecharge.class);
|
||||
|
||||
// 游戏组队 - 邀请
|
||||
NimUIKit.registerMsgItemViewHolder(GameTeamInviteAttachment.class, GameTeamInviteViewHolder.class);
|
||||
|
||||
NimUIKit.setSessionListener(listener);
|
||||
NimUIKit.setContactEventListener(listener1);
|
||||
}
|
||||
|
@@ -8,7 +8,6 @@ import com.chwl.app.decoration.view.DecorationStoreActivity;
|
||||
import com.chwl.app.earn.activity.EarnRecordActivity;
|
||||
import com.chwl.app.pay.activity.GiveGoldActivity;
|
||||
import com.chwl.app.ui.feedback.FeedbackActivity;
|
||||
import com.chwl.app.ui.game_team.record.GameTeamRecordActivity;
|
||||
import com.chwl.core.module_hall.hall.bean.H5FamilyInfo;
|
||||
import com.chwl.core.module_hall.hall.bean.UserClanInfo;
|
||||
import com.trello.rxlifecycle3.components.support.RxAppCompatActivity;
|
||||
@@ -294,12 +293,6 @@ public class RouterHandler {
|
||||
case RouterType.MY_DONATION:
|
||||
GiveGoldActivity.Companion.start(context);
|
||||
break;
|
||||
case RouterType.GAME_TEAM_RECORD:
|
||||
GameTeamRecordActivity.Companion.start(context);
|
||||
break;
|
||||
case RouterType.MY_DRESS_ITEM:
|
||||
MyDecorationActivity.start(context, 0);
|
||||
break;
|
||||
default:
|
||||
SingleToastUtil.showToast(ResUtil.getString(R.string.ui_im_routerhandler_07));
|
||||
return false;
|
||||
|
@@ -1,118 +0,0 @@
|
||||
package com.chwl.app.ui.im.chat
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.Keep
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.im.custom.bean.GameTeamInviteAttachment
|
||||
import com.example.lib_utils.AppUtils
|
||||
import com.example.lib_utils.UiUtils
|
||||
import com.google.android.material.imageview.ShapeableImageView
|
||||
import com.google.android.material.shape.CornerFamily
|
||||
import com.google.android.material.shape.ShapeAppearanceModel
|
||||
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderBase
|
||||
import com.netease.nim.uikit.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
|
||||
|
||||
@Keep
|
||||
class GameTeamInviteViewHolder(adapter: BaseMultiItemFetchLoadAdapter<*, *>) :
|
||||
MsgViewHolderBase(adapter) {
|
||||
|
||||
private val isRTL = UiUtils.isRtl(AppUtils.getApp())
|
||||
|
||||
private val leftShapeAppearance: ShapeAppearanceModel by lazy(LazyThreadSafetyMode.NONE) {
|
||||
buildBackgroundShapeAppearance(context ?: AppUtils.getApp(), true)
|
||||
}
|
||||
private val rightShapeAppearance: ShapeAppearanceModel by lazy(LazyThreadSafetyMode.NONE) {
|
||||
buildBackgroundShapeAppearance(context ?: AppUtils.getApp(), false)
|
||||
}
|
||||
|
||||
override fun getContentResId(): Int {
|
||||
return R.layout.layout_msg_view_holder_game_team_invite
|
||||
}
|
||||
|
||||
override fun inflateContentView() {
|
||||
}
|
||||
|
||||
override fun leftBackground(): Int {
|
||||
return R.color.transparent
|
||||
}
|
||||
|
||||
override fun rightBackground(): Int {
|
||||
return R.color.transparent
|
||||
}
|
||||
|
||||
override fun bindContentView() {
|
||||
val attachment = message?.attachment as? GameTeamInviteAttachment
|
||||
val data = attachment?.msgData
|
||||
val gameNameView = findViewById<TextView>(R.id.tv_game_name)
|
||||
val gameInningView = findViewById<TextView>(R.id.tv_game_inning)
|
||||
val gameIconView = findViewById<ImageView>(R.id.iv_icon)
|
||||
val gameBackgroundView = findViewById<ShapeableImageView>(R.id.iv_image)
|
||||
val gameBackgroundMaskView = findViewById<ShapeableImageView>(R.id.iv_image_mask)
|
||||
val shapeAppearance = getBackgroundShapeAppearance()
|
||||
gameBackgroundView.shapeAppearanceModel = shapeAppearance
|
||||
gameBackgroundMaskView.shapeAppearanceModel = shapeAppearance
|
||||
gameNameView.text = data?.gameName ?: ""
|
||||
gameInningView.text =
|
||||
context?.getString(R.string.game_team_18)?.format(data?.inning?.toString() ?: "0") ?: ""
|
||||
gameIconView.load(data?.gameLogo)
|
||||
gameBackgroundView.load(data?.gamePic, defaultRes = R.color.color_33000000)
|
||||
}
|
||||
|
||||
private fun getBackgroundShapeAppearance(): ShapeAppearanceModel {
|
||||
return if (isReceivedMessage) {
|
||||
if (isRTL) {
|
||||
rightShapeAppearance
|
||||
} else {
|
||||
leftShapeAppearance
|
||||
}
|
||||
} else {
|
||||
if (isRTL) {
|
||||
leftShapeAppearance
|
||||
} else {
|
||||
rightShapeAppearance
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun buildBackgroundShapeAppearance(
|
||||
context: Context,
|
||||
isLeft: Boolean
|
||||
): ShapeAppearanceModel {
|
||||
val cornerA = context.resources.getDimension(R.dimen.dp_12)
|
||||
val cornerB = context.resources.getDimension(R.dimen.dp_2)
|
||||
val topLeftCorner: Float
|
||||
val topRightCorner: Float
|
||||
if (isLeft) {
|
||||
topLeftCorner = cornerB
|
||||
topRightCorner = cornerA
|
||||
} else {
|
||||
topLeftCorner = cornerA
|
||||
topRightCorner = cornerB
|
||||
}
|
||||
return ShapeAppearanceModel.Builder().apply {
|
||||
this.setTopLeftCorner(
|
||||
CornerFamily.ROUNDED,
|
||||
topLeftCorner
|
||||
)
|
||||
|
||||
this.setTopRightCorner(
|
||||
CornerFamily.ROUNDED,
|
||||
topRightCorner
|
||||
)
|
||||
|
||||
this.setBottomLeftCorner(
|
||||
CornerFamily.ROUNDED,
|
||||
cornerA
|
||||
)
|
||||
|
||||
this.setBottomRightCorner(
|
||||
CornerFamily.ROUNDED,
|
||||
cornerA
|
||||
)
|
||||
}.build()
|
||||
}
|
||||
}
|
@@ -14,7 +14,6 @@ import com.chwl.app.common.widget.dialog.DialogManager.OkCancelDialogListener
|
||||
import com.chwl.app.databinding.ActivitySettingBinding
|
||||
import com.chwl.app.notify.RoomNotifyManager
|
||||
import com.chwl.app.ui.debug.DebugActivity
|
||||
import com.chwl.app.ui.game_team.record.GameTeamRecordActivity
|
||||
import com.chwl.app.ui.im.avtivity.BlackListManageActivity
|
||||
import com.chwl.app.ui.language.LanguageActivity
|
||||
import com.chwl.app.ui.login.BindPhoneActivity
|
||||
@@ -85,11 +84,12 @@ class SettingActivity : BaseViewBindingActivity<ActivitySettingBinding>(), View.
|
||||
binding.tvLanugage.setOnClickListener(this)
|
||||
binding.rlyPayPwd.setOnClickListener(this)
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
// TODO 临时调整
|
||||
// if (BuildConfig.DEBUG) {
|
||||
binding.titleBar.setOnTitleClickListener {
|
||||
debug()
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -223,8 +223,8 @@ class SettingActivity : BaseViewBindingActivity<ActivitySettingBinding>(), View.
|
||||
}
|
||||
|
||||
private fun debug() {
|
||||
startActivity(Intent(this, GameTeamRecordActivity::class.java))
|
||||
// CommonWebViewActivity.start(this,"http://beta.api.molistar.xyz/molistar/modules/order/index.html")
|
||||
// startActivity(Intent(this, DebugActivity::class.java))
|
||||
CommonWebViewActivity.start(this,"http://beta.api.molistar.xyz/molistar/modules/order/index.html")
|
||||
// PublicChatRoomMessageActivity.start(this)
|
||||
// MyDecorationActivity.start(this,0)
|
||||
}
|
||||
|
@@ -245,9 +245,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
initPhoto(dataBean.getPrivatePhoto());
|
||||
setWhereVisible();
|
||||
});
|
||||
viewModel.getUserInfoDetailError().observe(this, String -> {
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
private void setTitleVisible(boolean visible) {
|
||||
|
@@ -1,31 +0,0 @@
|
||||
package com.chwl.app.ui.user.adapter
|
||||
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isVisible
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.game_team.UserGameTeamInfo
|
||||
|
||||
class UserInfoGameTeamAdapter(private val isMe: Boolean) :
|
||||
BaseQuickAdapter<UserGameTeamInfo, BaseViewHolder>(R.layout.user_info_item_game_team) {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||
return super.onCreateViewHolder(parent, viewType).apply {
|
||||
addOnClickListener(R.id.layout_play)
|
||||
getView<View>(R.id.layout_play).isVisible = !isMe
|
||||
}
|
||||
}
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: UserGameTeamInfo) {
|
||||
helper.setText(R.id.tv_name, item.gameName)
|
||||
helper.setText(R.id.tv_level, item.proficiency)
|
||||
helper.setText(R.id.tv_price, item.price?.toString() ?: "")
|
||||
helper.getView<ImageView>(R.id.iv_icon).load(item.logo)
|
||||
helper.getView<ImageView>(R.id.iv_bg)
|
||||
.load(item.background, defaultRes = R.color.color_66000000)
|
||||
}
|
||||
}
|
@@ -3,7 +3,7 @@ package com.chwl.app.ui.user.dialog
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogUserAreaPickerBinding
|
||||
import com.chwl.app.ui.user.adapter.ArrayWheelAdapter
|
||||
import java.io.Serializable
|
||||
@@ -15,7 +15,7 @@ import java.io.Serializable
|
||||
* desc: 用户地区
|
||||
*/
|
||||
class UserAreaDialog :
|
||||
BaseDialogFragment<DialogUserAreaPickerBinding>() {
|
||||
BaseDialog<DialogUserAreaPickerBinding>() {
|
||||
|
||||
private var mOptionsItems: List<String>? = null
|
||||
|
||||
|
@@ -9,26 +9,22 @@ import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.databinding.UserInfoDataFragmentBinding
|
||||
import com.chwl.app.support.FragmentVisibleStateHelper
|
||||
import com.chwl.app.ui.game_team.invite.GameTeamInviteDialog
|
||||
import com.chwl.app.ui.user.activity.ShowPhotoActivity
|
||||
import com.chwl.app.ui.user.activity.UserInfoModifyActivity
|
||||
import com.chwl.app.ui.user.activity.UserModifyPhotosActivity
|
||||
import com.chwl.app.ui.user.adapter.UserInfoAlbumAdapter
|
||||
import com.chwl.app.ui.user.adapter.UserInfoGameTeamAdapter
|
||||
import com.chwl.app.ui.user.adapter.UserInfoGiftAdapter
|
||||
import com.chwl.app.ui.user.adapter.UserInfoMedalAdapter
|
||||
import com.chwl.app.ui.user.viewmodel.UserInfoViewModel
|
||||
import com.chwl.app.ui.widget.recyclerview.decoration.GridSpacingItemNewDecoration
|
||||
import com.chwl.app.ui.widget.recyclerview.decoration.SpacingDecoration
|
||||
import com.chwl.core.game_team.UserGameTeamInfo
|
||||
import com.chwl.core.user.bean.UserPhoto
|
||||
import com.example.lib_utils.UiUtils
|
||||
|
||||
class UserInfoDataFragment : BaseViewBindingFragment<UserInfoDataFragmentBinding>() {
|
||||
|
||||
private val viewModel: UserInfoViewModel by activityViewModels()
|
||||
|
||||
override fun init() {
|
||||
initGameTeam()
|
||||
initAlbum()
|
||||
initMedal()
|
||||
initGift()
|
||||
@@ -40,29 +36,6 @@ class UserInfoDataFragment : BaseViewBindingFragment<UserInfoDataFragmentBinding
|
||||
}
|
||||
}
|
||||
|
||||
private fun initGameTeam() {
|
||||
val adapter = UserInfoGameTeamAdapter(viewModel.isMe)
|
||||
binding.recyclerViewGameTeam.addItemDecoration(
|
||||
SpacingDecoration(
|
||||
0,
|
||||
resources.getDimensionPixelOffset(R.dimen.dp_10),
|
||||
false
|
||||
)
|
||||
)
|
||||
binding.recyclerViewGameTeam.adapter = adapter
|
||||
adapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
activity?.let {
|
||||
val item = (adapter.getItem(position) as? UserGameTeamInfo)
|
||||
?: return@setOnItemChildClickListener
|
||||
GameTeamInviteDialog.newInstance(item).safeShow(it.supportFragmentManager, it)
|
||||
}
|
||||
}
|
||||
viewModel.userInfoDetailData.observe(this) {
|
||||
adapter.setNewData(it.userGamePartner ?: emptyList())
|
||||
binding.layoutGameTeam.isVisible = !it.userGamePartner.isNullOrEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
private fun initAlbum() {
|
||||
val albumAdapter = UserInfoAlbumAdapter()
|
||||
binding.ivAlbumMore.isVisible = viewModel.isMe
|
||||
|
@@ -26,9 +26,7 @@ class UserInfoViewModel : BaseViewModel() {
|
||||
val userInfoData: LiveData<UserInfo> = _userInfoData
|
||||
|
||||
private val _userInfoDetailData = MutableLiveData<UserDetailInfo.DataBean>()
|
||||
private val _userInfoDetailError = MutableLiveData<String>()
|
||||
val userInfoDetailData: LiveData<UserDetailInfo.DataBean> = _userInfoDetailData
|
||||
val userInfoDetailError: LiveData<String> = _userInfoDetailError
|
||||
|
||||
val userClanData = MutableLiveData<UserClanInfo>()
|
||||
|
||||
@@ -57,7 +55,6 @@ class UserInfoViewModel : BaseViewModel() {
|
||||
.subscribe(object : BeanObserver<UserDetailInfo?>() {
|
||||
override fun onErrorMsg(error: String) {
|
||||
error.toast()
|
||||
_userInfoDetailError.postValue(error)
|
||||
}
|
||||
|
||||
override fun onSuccess(info: UserDetailInfo) {
|
||||
|
@@ -11,22 +11,18 @@ import com.chwl.core.pay.bean.PayRecordId
|
||||
import com.chwl.library.utils.SingleToastUtil
|
||||
import com.example.lib_utils.log.ILog
|
||||
import com.example.module_base.support.billing.IBillingResult
|
||||
import com.example.module_base.support.billing.IBillingService2
|
||||
import com.example.module_base.support.billing.IBillingService
|
||||
import com.example.module_base.support.billing.IProductDetails
|
||||
import com.example.module_base.support.billing.IPurchase
|
||||
import com.example.module_base.support.billing.OnBillingClientStateListener
|
||||
import com.example.module_base.support.billing.OnConsumeResponseListener
|
||||
import com.example.module_base.support.billing.OnProductDetailsResponseListener
|
||||
import com.example.module_base.support.billing.OnPurchasesResponseListener
|
||||
import com.example.module_base.support.google.IGoogleService
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.Listener,
|
||||
OnProductDetailsResponseListener, LifecycleEventObserver, ILog, OnBillingClientStateListener {
|
||||
class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService.Listener,
|
||||
IBillingService.ProductDetailsResponseListener, LifecycleEventObserver, ILog {
|
||||
|
||||
private var compositeDisposable: CompositeDisposable? = null
|
||||
private var _billingService: IBillingService2? = null
|
||||
private var _billingService: IBillingService? = null
|
||||
private val dialogManager = DialogManager(activity)
|
||||
|
||||
private var paymentIntent: PaymentIntent? = null
|
||||
@@ -39,11 +35,9 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
(activity as? LifecycleOwner)?.lifecycle?.addObserver(this)
|
||||
}
|
||||
|
||||
private fun getBillingService(): IBillingService2? {
|
||||
private fun getBillingService(): IBillingService? {
|
||||
if (_billingService == null) {
|
||||
_billingService = IGoogleService.newBillingService2(activity, this)
|
||||
_billingService?.setLogEnabled(true)
|
||||
_billingService?.startConnection(this)
|
||||
_billingService = IGoogleService.newBillingService(activity, this)
|
||||
}
|
||||
return _billingService
|
||||
}
|
||||
@@ -60,14 +54,6 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
}
|
||||
|
||||
private fun tryLaunch() {
|
||||
val billingService = getBillingService()
|
||||
if (billingService == null) {
|
||||
callFailed(
|
||||
IPaymentClient.CODE_NONSUPPORT,
|
||||
PaymentException(activity.getString(R.string.bean_response_serviceresult_015))
|
||||
)
|
||||
return
|
||||
}
|
||||
val productId = paymentIntent?.productId
|
||||
val productItem = productItem
|
||||
logD("tryLaunch() productId:$productId productItem:$productItem")
|
||||
@@ -92,7 +78,7 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
{ recordId: PayRecordId ->
|
||||
if (paymentIntent?.productId == productItem.getProductId()) {
|
||||
orderId = recordId.recordId
|
||||
getBillingService()?.launchBillingFlow(
|
||||
getBillingService()?.initiatePurchaseFlow(
|
||||
productItem,
|
||||
recordId.recordId
|
||||
)
|
||||
@@ -105,81 +91,47 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
})
|
||||
}
|
||||
|
||||
override fun onBillingSetupFinished(billingResult: IBillingResult) {
|
||||
if (billingResult.isResponseOk()) {
|
||||
logD("onBillingClientSetupFinished()")
|
||||
getBillingService()?.queryPurchases(object : OnPurchasesResponseListener {
|
||||
override fun onQueryPurchasesResponse(
|
||||
billingResult: IBillingResult,
|
||||
purchases: List<IPurchase>
|
||||
) {
|
||||
if (billingResult.isResponseOk() && purchases.isNotEmpty()) {
|
||||
purchases.forEach {
|
||||
handlePurchases(false, it)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
tryLaunch()
|
||||
} else {
|
||||
callFailed(
|
||||
IPaymentClient.CODE_UNAVAILABLE, billingResult
|
||||
)
|
||||
}
|
||||
override fun onBillingClientSetupFinished() {
|
||||
logD("onBillingClientSetupFinished()")
|
||||
tryLaunch()
|
||||
}
|
||||
|
||||
override fun onPurchasesUpdated(billingResult: IBillingResult, purchases: List<IPurchase>?) {
|
||||
logD("onPurchasesUpdated() billingResult:${billingResult.getResponseCode()} purchases:${purchases?.size}")
|
||||
if (billingResult.isResponseOk() && !purchases.isNullOrEmpty()) {
|
||||
purchases.forEach {
|
||||
handlePurchases(true, it)
|
||||
}
|
||||
} else {
|
||||
callFailed(IPaymentClient.CODE_PURCHASE_FAILED, billingResult)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handlePurchases(isCurrentPaying: Boolean, purchases: IPurchase) {
|
||||
logD("handlePurchases isCurrentPaying:${isCurrentPaying} state:${purchases.getPurchaseState()}")
|
||||
val identifiers = purchases.getAccountIdentifiers()
|
||||
if (purchases.isPurchasedState() && identifiers != null) {
|
||||
logD("handlePurchases() verifyOrder")
|
||||
addDisposable(
|
||||
PayModel.get().verifyOrder(
|
||||
identifiers.getObfuscatedAccountId(),
|
||||
purchases.getProducts().firstOrNull(),
|
||||
purchases.getPackageName(),
|
||||
purchases.getPurchaseToken()
|
||||
).subscribe({
|
||||
logD("handlePurchases() verifyOrder consumeAsync")
|
||||
consumeAsync(isCurrentPaying, it)
|
||||
}, {
|
||||
logD("handlePurchases() error:${it.message}")
|
||||
if (isCurrentPaying) {
|
||||
override fun onPurchasesUpdated(purchases: List<IPurchase>) {
|
||||
logD("onPurchasesUpdated() purchases:${purchases.size}")
|
||||
purchases.forEach {
|
||||
logD("onPurchasesUpdated() item.state:${it.getPurchaseState()}")
|
||||
logD("onPurchasesUpdated() item.orderId:${it.getOrderId()}")
|
||||
logD("onPurchasesUpdated() item.token:${it.getPurchaseToken()}")
|
||||
logD("onPurchasesUpdated() item.data:${it.getData()}")
|
||||
val identifiers = it.getAccountIdentifiers()
|
||||
if (it.isPurchasedState() && identifiers != null) {
|
||||
addDisposable(
|
||||
PayModel.get().verifyOrder(
|
||||
identifiers.getObfuscatedAccountId(),
|
||||
it.getProducts().firstOrNull(),
|
||||
it.getPackageName(),
|
||||
it.getPurchaseToken()
|
||||
).subscribe({
|
||||
getBillingService()?.consumeAsync(it)
|
||||
}, {
|
||||
callFailed(IPaymentClient.CODE_VERIFY_ORDER_FAILED, it)
|
||||
}
|
||||
})
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun consumeAsync(isCurrentPaying: Boolean, token: String) {
|
||||
logD("consumeAsync() isCurrentPaying:${isCurrentPaying} token:$token")
|
||||
getBillingService()?.consumeAsync(token, object : OnConsumeResponseListener {
|
||||
override fun onConsumeResponse(billingResult: IBillingResult, purchaseToken: String) {
|
||||
logD("consumeAsync() onConsumeResponse billingResult:${billingResult} purchaseToken:$purchaseToken")
|
||||
if (isCurrentPaying) {
|
||||
if (billingResult.isResponseOk()) {
|
||||
val orderId = orderId
|
||||
if (orderId != null) {
|
||||
callSuccess(orderId)
|
||||
}
|
||||
} else {
|
||||
callFailed(IPaymentClient.CODE_CONSUME_ORDER_FAILED, billingResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
override fun onConsumeFinished(token: String?, result: Int) {
|
||||
logD("onConsumeFinished() token:${token} result:$result")
|
||||
val orderId = orderId
|
||||
if (orderId != null) {
|
||||
callSuccess(orderId)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailedHandle(result: Int) {
|
||||
logD("onFailedHandle() result:${result}")
|
||||
callFailed(IPaymentClient.CODE_OTHER)
|
||||
}
|
||||
|
||||
override fun onProductDetailsResponse(
|
||||
@@ -195,10 +147,10 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
if (item != null) {
|
||||
tryLaunch()
|
||||
} else {
|
||||
callFailed(IPaymentClient.CODE_PRODUCT_NOT_FOUND, billingResult)
|
||||
callFailed(IPaymentClient.CODE_NOT_FOUND)
|
||||
}
|
||||
} else {
|
||||
callFailed(IPaymentClient.CODE_PRODUCT_NOT_FOUND, billingResult)
|
||||
callFailed(IPaymentClient.CODE_NOT_FOUND)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,31 +163,10 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
dialogManager.dismissDialog()
|
||||
}
|
||||
|
||||
private fun callFailed(code: Int) {
|
||||
callFailed(
|
||||
code,
|
||||
PaymentException(
|
||||
code,
|
||||
message = activity.getString(R.string.common_operation_prompt_format).format(code)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun callFailed(code: Int, billingResult: IBillingResult) {
|
||||
callFailed(
|
||||
code,
|
||||
PaymentException(
|
||||
code,
|
||||
message = activity.getString(R.string.common_operation_prompt_format)
|
||||
.format("$code-${billingResult.getResponseCode()}")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun callFailed(code: Int, throwable: Throwable) {
|
||||
throwable.printStackTrace()
|
||||
logD("callFailed() code:${code} throwable:${throwable.message}")
|
||||
throwable.let {
|
||||
private fun callFailed(code: Int, throwable: Throwable? = null) {
|
||||
throwable?.printStackTrace()
|
||||
logD("callFailed() code:${code} throwable:${throwable?.message}")
|
||||
throwable?.let {
|
||||
SingleToastUtil.showToast(
|
||||
it.message
|
||||
)
|
||||
@@ -262,7 +193,6 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
|
||||
override fun onCleared() {
|
||||
logD("onCleared()")
|
||||
_billingService?.destroy()
|
||||
paymentIntent = null
|
||||
compositeDisposable?.dispose()
|
||||
compositeDisposable = null
|
||||
@@ -272,6 +202,12 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
|
||||
override fun onStateChanged(source: LifecycleOwner, event: Lifecycle.Event) {
|
||||
logD("onStateChanged() event:$event")
|
||||
when (event) {
|
||||
Lifecycle.Event.ON_RESUME -> {
|
||||
if (_billingService?.isServiceConnected() == true) {
|
||||
_billingService?.onQueryPurchases()
|
||||
}
|
||||
}
|
||||
|
||||
Lifecycle.Event.ON_DESTROY -> {
|
||||
(activity as? LifecycleOwner)?.lifecycle?.removeObserver(this)
|
||||
onCleared()
|
||||
|
@@ -10,26 +10,17 @@ interface IPaymentClient : ICleared {
|
||||
// 未知异常原因
|
||||
const val CODE_OTHER = 0
|
||||
|
||||
// 不支持该功能
|
||||
const val CODE_NONSUPPORT = 1
|
||||
// 服务不可用
|
||||
const val CODE_UNAVAILABLE = 1
|
||||
|
||||
// 服务暂不可用
|
||||
const val CODE_UNAVAILABLE = 2
|
||||
|
||||
// 未查询到购买信息
|
||||
const val CODE_PRODUCT_NOT_FOUND = 3
|
||||
// 查询订单信息失败
|
||||
const val CODE_NOT_FOUND = 2
|
||||
|
||||
// 预下单失败
|
||||
const val CODE_PLACE_ORDER_FAILED = 4
|
||||
|
||||
// 购买失败
|
||||
const val CODE_PURCHASE_FAILED = 5
|
||||
const val CODE_PLACE_ORDER_FAILED = 3
|
||||
|
||||
// 验证订单失败
|
||||
const val CODE_VERIFY_ORDER_FAILED = 6
|
||||
|
||||
// 核消订单失败
|
||||
const val CODE_CONSUME_ORDER_FAILED = 7
|
||||
const val CODE_VERIFY_ORDER_FAILED = 4
|
||||
}
|
||||
|
||||
fun launchPayment(intent: PaymentIntent)
|
||||
|
@@ -1,13 +0,0 @@
|
||||
package com.chwl.app.ui.wallet.payment
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
@Keep
|
||||
class PaymentException : Exception {
|
||||
var code = 0
|
||||
|
||||
constructor(message: String) : super(message)
|
||||
constructor(code: Int, message: String) : super(message) {
|
||||
this.code = code
|
||||
}
|
||||
}
|
@@ -59,6 +59,7 @@ import com.chwl.library.record.AuditRecorderConfiguration;
|
||||
import com.chwl.library.record.ExtAudioRecorder;
|
||||
import com.chwl.library.rxbus.RxBus;
|
||||
import com.chwl.library.utils.AppMetaDataUtil;
|
||||
import com.chwl.library.utils.AppUtils;
|
||||
import com.chwl.library.utils.DeviceUuidFactory;
|
||||
import com.chwl.library.utils.SystemUtils;
|
||||
import com.chwl.library.utils.VersionUtil;
|
||||
@@ -544,7 +545,7 @@ public class JSInterface implements ICleared {
|
||||
jsonObject.put("netType", String.valueOf(SystemUtils.getNetworkType(context)));
|
||||
jsonObject.put("model", SystemUtils.getPhoneModel());
|
||||
jsonObject.put("appVersion", VersionUtil.getLocalName(context));
|
||||
jsonObject.put("appVersionCode", String.valueOf(VersionUtil.getVersionCode(context)));
|
||||
jsonObject.put("appVersionCode", String.valueOf(AppUtils.getVersionCode(context)));
|
||||
jsonObject.put("deviceId", DeviceUtil.getDeviceId(context));
|
||||
jsonObject.put("channel", AppMetaDataUtil.getChannelID());
|
||||
jsonObject.put("Accept-Language", LanguageHelper.INSTANCE.getCurrentLanguageType());
|
||||
@@ -629,6 +630,7 @@ public class JSInterface implements ICleared {
|
||||
|
||||
@Override
|
||||
public void onCleared() {
|
||||
ICleared.super.onCleared();
|
||||
if (paymentClient != null) {
|
||||
paymentClient.onCleared();
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@ import com.tencent.vasdolly.helper.ChannelReaderUtil;
|
||||
import com.chwl.app.application.App;
|
||||
import com.chwl.core.XConstants;
|
||||
import com.chwl.core.Constants;
|
||||
import com.chwl.library.utils.AppUtils;
|
||||
import com.chwl.library.utils.VersionUtil;
|
||||
|
||||
/**
|
||||
@@ -107,7 +108,7 @@ public class SimpleJSInterface {
|
||||
jsonObject.put("os", "android");
|
||||
jsonObject.put("app", XConstants.APP_MARK);
|
||||
jsonObject.put("appVersion", VersionUtil.getLocalName(context));
|
||||
jsonObject.put("appVersionCode", String.valueOf(VersionUtil.getVersionCode(context)));
|
||||
jsonObject.put("appVersionCode", String.valueOf(AppUtils.getVersionCode(context)));
|
||||
jsonObject.put("channel", getChannel());
|
||||
Log.e(TAG, "getDeviceInfo: " + jsonObject);
|
||||
return jsonObject.toJSONString();
|
||||
|
@@ -2,13 +2,13 @@ package com.chwl.app.ui.widget
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogDatingSelectBinding
|
||||
import com.chwl.core.room.event.DatingSelectUserEvent
|
||||
import com.chwl.library.utils.ResUtil
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
class DatingSelectDialog(val position: Int, val uid: Long, private val myUid: Long, val roomUid: Long) : BaseDialogFragment<DialogDatingSelectBinding>() {
|
||||
class DatingSelectDialog(val position: Int, val uid: Long, private val myUid: Long, val roomUid: Long) : BaseDialog<DialogDatingSelectBinding>() {
|
||||
|
||||
override fun init() {
|
||||
width = ScreenUtil.dip2px(200f)
|
||||
|
@@ -1,13 +1,5 @@
|
||||
package com.chwl.app.ui.widget;
|
||||
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_COUNTRY;
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_LUCKY;
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_NOBLE;
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_NORMAL;
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_SING_ROOM;
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_SUPER_LUCKY;
|
||||
import static com.chwl.app.ui.widget.magicindicator.GiftIndicator.TYPE_WEEK;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@@ -46,8 +38,6 @@ import com.chwl.app.ui.webview.DialogWebViewActivity;
|
||||
import com.chwl.core.UriProvider;
|
||||
import com.chwl.core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo;
|
||||
import com.chwl.core.gift.bean.TagsInfo;
|
||||
import com.chwl.core.home.bean.TabInfo;
|
||||
import com.chwl.core.room.anotherroompk.ShowUserInfoDialogEvent;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
import com.example.lib_utils.UiUtils;
|
||||
@@ -448,16 +438,13 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
sendGiftButton.setOnClickListener(this);
|
||||
giftNumLayout = root.findViewById(R.id.gift_number_layout);
|
||||
giftNumLayout.setOnClickListener(this);
|
||||
|
||||
List<GiftTab> tabInfoList = updateTabs();
|
||||
// MARK: 获取到新 API 数据后,tab 按这里的方式更新
|
||||
// List<GiftTab> tabInfoList = new ArrayList<>();
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NORMAL, ResUtil.getString(R.string.ui_widget_giftdialog_01), ResUtil.getString(R.string.ui_widget_giftdialog_02)));
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_LUCKY, ResUtil.getString(R.string.ui_widget_giftdialog_03), ResUtil.getString(R.string.ui_widget_giftdialog_04)));
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NOBLE, ResUtil.getString(R.string.ui_widget_giftdialog_05), ResUtil.getString(R.string.ui_widget_giftdialog_06)));
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_WEEK, ResUtil.getString(R.string.ui_widget_giftdialog_07), ResUtil.getString(R.string.ui_widget_giftdialog_08)));
|
||||
List<GiftTab> tabInfoList = new ArrayList<>();
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NORMAL, ResUtil.getString(R.string.ui_widget_giftdialog_01), ResUtil.getString(R.string.ui_widget_giftdialog_02)));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_LUCKY, ResUtil.getString(R.string.ui_widget_giftdialog_03), ResUtil.getString(R.string.ui_widget_giftdialog_04)));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NOBLE, ResUtil.getString(R.string.ui_widget_giftdialog_05), ResUtil.getString(R.string.ui_widget_giftdialog_06)));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_WEEK, ResUtil.getString(R.string.ui_widget_giftdialog_07), ResUtil.getString(R.string.ui_widget_giftdialog_08)));
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_DRAW_GIFT, ResUtil.getString(R.string.ui_widget_giftdialog_09), ResUtil.getString(R.string.ui_widget_giftdialog_010)));
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_SING_ROOM, ResUtil.getString(R.string.ui_widget_giftdialog_hot), ResUtil.getString(R.string.ui_widget_giftdialog_hot)));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_SING_ROOM, ResUtil.getString(R.string.ui_widget_giftdialog_hot), ResUtil.getString(R.string.ui_widget_giftdialog_hot)));
|
||||
// tabInfoList.add(new GiftTab(GiftIndicator.TYPE_KNAP, ResUtil.getString(R.string.ui_widget_giftdialog_011), ResUtil.getString(R.string.ui_widget_giftdialog_012)));
|
||||
giftIndicator = root.findViewById(R.id.gift_indicator);
|
||||
giftIndicator.initTab(
|
||||
@@ -516,30 +503,24 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
|
||||
if (giftId == 0) {
|
||||
// 更新所有礼物
|
||||
giftIndicator.setPosition(TYPE_NORMAL);
|
||||
giftIndicator.setPosition(GiftIndicator.TYPE_NORMAL);
|
||||
updateGiftView(giftIndicator.getCurrrentType());
|
||||
} else {
|
||||
int indicatorType = TYPE_NORMAL;
|
||||
int indicatorType = GiftIndicator.TYPE_NORMAL;
|
||||
GiftInfo giftInfo = GiftModel.get().findGiftInfoById(giftId);
|
||||
if (giftInfo != null) {
|
||||
switch (giftInfo.getGiftType()) {
|
||||
case GiftType.GIFT_TYPE_NORMAL:
|
||||
indicatorType = TYPE_NORMAL;
|
||||
indicatorType = GiftIndicator.TYPE_NORMAL;
|
||||
break;
|
||||
case GiftType.GIFT_TYPE_LUCKY:
|
||||
indicatorType = GiftIndicator.TYPE_LUCKY;
|
||||
break;
|
||||
case GiftType.GIFT_TYPE_SUPER_LUCKY:
|
||||
indicatorType = TYPE_SUPER_LUCKY;
|
||||
break;
|
||||
case GiftType.GIFT_TYPE_VIP:
|
||||
indicatorType = TYPE_NOBLE;
|
||||
break;
|
||||
case GiftType.GIFT_TYPE_COUNTRY:
|
||||
indicatorType = TYPE_COUNTRY;
|
||||
indicatorType = GiftIndicator.TYPE_NOBLE;
|
||||
break;
|
||||
case GiftType.GIFT_TYPE_WEEK_STAR:
|
||||
indicatorType = TYPE_WEEK;
|
||||
indicatorType = GiftIndicator.TYPE_WEEK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -600,34 +581,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
});
|
||||
}
|
||||
|
||||
private List<GiftTab> updateTabs() {
|
||||
List<GiftTab> tabInfoList = new ArrayList<>();
|
||||
for (TagsInfo info: GiftModel.get().getTabList()) {
|
||||
tabInfoList.add(new GiftTab(swithGiftTypeToTabType(info), info.tagName(), info.tagName()));
|
||||
}
|
||||
return tabInfoList;
|
||||
}
|
||||
|
||||
private int swithGiftTypeToTabType(TagsInfo info) {
|
||||
switch (info.tagGiftType()) {
|
||||
case GiftType.GIFT_TYPE_NORMAL:
|
||||
return TYPE_NORMAL;
|
||||
case GiftType.GIFT_TYPE_LUCKY:
|
||||
return TYPE_LUCKY;
|
||||
case GiftType.GIFT_TYPE_SUPER_LUCKY:
|
||||
return TYPE_SUPER_LUCKY;
|
||||
case GiftType.GIFT_TYPE_VIP:
|
||||
return TYPE_NOBLE;
|
||||
case GiftType.GIFT_TYPE_WEEK_STAR:
|
||||
return TYPE_WEEK;
|
||||
case GiftType.GIFT_TYPE_COUNTRY:
|
||||
return TYPE_COUNTRY;
|
||||
case GiftType.GIFT_TYPE_SINGLE_ROOM:
|
||||
return TYPE_SING_ROOM;
|
||||
}
|
||||
return TYPE_NORMAL;
|
||||
}
|
||||
|
||||
private void showLoadingAnimation() {
|
||||
Animation rotateAnimation = new RotateAnimation(0, 360,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f,
|
||||
@@ -703,35 +656,31 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
List<GiftInfo> nobleGiftInfos = getNobleGiftInfos();
|
||||
if (position == GiftIndicator.TYPE_KNAP) {
|
||||
currentGiftInfoList = GiftModel.get().getKnapList();
|
||||
} else if (position == TYPE_NOBLE) {
|
||||
} else if (position == GiftIndicator.TYPE_NOBLE) {
|
||||
currentGiftInfoList = nobleGiftInfos;
|
||||
} else if (position == TYPE_NORMAL) {
|
||||
} else if (position == GiftIndicator.TYPE_NORMAL) {
|
||||
currentGiftInfoList = getNormalGiftInfos();
|
||||
} else if (position == GiftIndicator.TYPE_LUCKY) {
|
||||
currentGiftInfoList = getLuckyGiftInfos();
|
||||
} else if (position == TYPE_WEEK) {
|
||||
} else if (position == GiftIndicator.TYPE_WEEK) {
|
||||
currentGiftInfoList = getWeekStarGiftInfos();
|
||||
} else if (position == GiftIndicator.TYPE_DRAW_GIFT) {
|
||||
currentGiftInfoList = getDrawGiftInfos();
|
||||
} else if (position == GiftIndicator.TYPE_SING_ROOM) {
|
||||
currentGiftInfoList = getSingleRoomGiftInfos();
|
||||
} else if (position == TYPE_SUPER_LUCKY) {
|
||||
currentGiftInfoList = getSuperLuckyGiftInfos();
|
||||
} else if (position == TYPE_COUNTRY) {
|
||||
currentGiftInfoList = getCountryGiftInfos();
|
||||
}
|
||||
// 有贵族礼物才显示贵族礼物的tab
|
||||
if (ListUtils.isListEmpty(nobleGiftInfos)) {
|
||||
giftIndicator.hidePosition(TYPE_NOBLE);
|
||||
giftIndicator.hidePosition(GiftIndicator.TYPE_NOBLE);
|
||||
} else {
|
||||
giftIndicator.showPosition(TYPE_NOBLE);
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_NOBLE);
|
||||
}
|
||||
// 有塗鴉礼物才显示塗鴉礼物的tab
|
||||
// if (ListUtils.isListEmpty(getDrawGiftInfos())) {
|
||||
// giftIndicator.hidePosition(GiftIndicator.TYPE_DRAW_GIFT);
|
||||
// } else {
|
||||
// giftIndicator.showPosition(GiftIndicator.TYPE_DRAW_GIFT);
|
||||
// }
|
||||
if (ListUtils.isListEmpty(getDrawGiftInfos())) {
|
||||
giftIndicator.hidePosition(GiftIndicator.TYPE_DRAW_GIFT);
|
||||
} else {
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_DRAW_GIFT);
|
||||
}
|
||||
//是否背包礼物
|
||||
final boolean isKnap = (position == GiftIndicator.TYPE_KNAP);
|
||||
initEasyPop(isKnap);
|
||||
@@ -741,11 +690,9 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
// tvGiftValue.setVisibility(View.VISIBLE);
|
||||
showEmptyView();
|
||||
} else if (position == GiftIndicator.TYPE_LUCKY ||
|
||||
position == TYPE_SUPER_LUCKY ||
|
||||
position == TYPE_WEEK ||
|
||||
position == GiftIndicator.TYPE_WEEK ||
|
||||
position == GiftIndicator.TYPE_SING_ROOM ||
|
||||
position == GiftIndicator.TYPE_DRAW_GIFT ||
|
||||
position == TYPE_COUNTRY) {
|
||||
position == GiftIndicator.TYPE_DRAW_GIFT) {
|
||||
showEmptyView();
|
||||
updateWeekStarDesc();
|
||||
isShowDrawGiftModel = false;
|
||||
@@ -760,7 +707,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
if (currentGiftInfo.isSendMsg()) {
|
||||
etSendMessage.setVisibility(View.VISIBLE);
|
||||
}
|
||||
pagerList = beanTransformVm(context, currentGiftInfoList, isKnap, position == TYPE_WEEK ? 4 : 8, currentGiftInfo);
|
||||
pagerList = beanTransformVm(context, currentGiftInfoList, isKnap, position == GiftIndicator.TYPE_WEEK ? 4 : 8, currentGiftInfo);
|
||||
setGridViewData(pagerList);
|
||||
if (isKnap) {
|
||||
// tvGiftValue.setVisibility(View.VISIBLE);
|
||||
@@ -776,13 +723,10 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
updateWeekStarDesc();
|
||||
updateDrawGift();
|
||||
giftIndicator.post(() -> {
|
||||
boolean isRTL = UiUtils.INSTANCE.isRtl(getContext());
|
||||
// if (position < TYPE_WEEK) { GiftModel.get().getTabList().size()/2;
|
||||
int centerIndex = GiftModel.get().getTabList().size()/2;
|
||||
if (position < centerIndex) {
|
||||
giftIndicator.fullScroll(isRTL ? View.FOCUS_RIGHT : View.FOCUS_LEFT);
|
||||
if (position < GiftIndicator.TYPE_WEEK) {
|
||||
giftIndicator.fullScroll(View.FOCUS_LEFT);
|
||||
} else {
|
||||
giftIndicator.fullScroll(isRTL ? View.FOCUS_LEFT : View.FOCUS_RIGHT);
|
||||
giftIndicator.fullScroll(View.FOCUS_RIGHT);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -853,7 +797,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
|
||||
private void updateWeekStarDesc() {
|
||||
|
||||
if (giftIndicator.getCurrrentType() == TYPE_WEEK) {
|
||||
if (giftIndicator.getCurrrentType() == GiftIndicator.TYPE_WEEK) {
|
||||
flLuckyDesc.setVisibility(View.GONE);
|
||||
llStarWeek.setVisibility(View.GONE);
|
||||
mStarWeekBanner.setVisibility(View.VISIBLE);
|
||||
@@ -1172,11 +1116,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
return giftInfos;
|
||||
}
|
||||
|
||||
private List<TagsInfo> getAllTabsAndGiftInfos() {
|
||||
List<TagsInfo> tagsInfos = null;
|
||||
return tagsInfos;
|
||||
}
|
||||
|
||||
private List<GiftInfo> getNormalGiftInfos() {
|
||||
List<GiftInfo> giftInfos = loadGiftInfoList();
|
||||
List<GiftInfo> infos = new ArrayList<>();
|
||||
@@ -1213,18 +1152,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
GiftType.GIFT_TYPE_SINGLE_ROOM);
|
||||
}
|
||||
|
||||
private List<GiftInfo> getSuperLuckyGiftInfos() {
|
||||
return GiftModel.get().getGiftInfosByType(
|
||||
String.valueOf(AvRoomDataManager.get().getRoomUid()),
|
||||
GiftType.GIFT_TYPE_SUPER_LUCKY);
|
||||
}
|
||||
|
||||
private List<GiftInfo> getCountryGiftInfos() {
|
||||
return GiftModel.get().getGiftInfosByType(
|
||||
String.valueOf(AvRoomDataManager.get().getRoomUid()),
|
||||
GiftType.GIFT_TYPE_COUNTRY);
|
||||
}
|
||||
|
||||
private List<GiftInfo> getNobleGiftInfos() {
|
||||
return GiftModel.get().getGiftInfoList(GiftType.GIFT_TYPE_VIP);
|
||||
}
|
||||
@@ -1522,10 +1449,10 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
if (needShowLoading) showLoadingView();
|
||||
int currentType = giftIndicator.getCurrrentType();
|
||||
switch (currentType) {
|
||||
case TYPE_NORMAL:
|
||||
case GiftIndicator.TYPE_NORMAL:
|
||||
case GiftIndicator.TYPE_LUCKY:
|
||||
case TYPE_NOBLE:
|
||||
case TYPE_WEEK:
|
||||
case GiftIndicator.TYPE_NOBLE:
|
||||
case GiftIndicator.TYPE_WEEK:
|
||||
String roomUid = null;
|
||||
if (isInRoom) {
|
||||
if (AvRoomDataManager.get().getRoomUid() > 0) {
|
||||
|
@@ -59,7 +59,7 @@ class SideBarView : View {
|
||||
this.textSizeFocus = focusTextSize
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
override fun onDraw(canvas: Canvas?) {
|
||||
super.onDraw(canvas)
|
||||
paintText(canvas)
|
||||
}
|
||||
|
@@ -67,16 +67,6 @@ public class GiftIndicator extends LinearLayout {
|
||||
*/
|
||||
public static final int TYPE_SING_ROOM = 6;
|
||||
|
||||
/**
|
||||
* 国家礼物
|
||||
*/
|
||||
public static final int TYPE_COUNTRY = 7;
|
||||
|
||||
/**
|
||||
* 超级幸运礼物
|
||||
*/
|
||||
public static final int TYPE_SUPER_LUCKY = 8;
|
||||
|
||||
private List<GiftTab> tabList = new ArrayList<>();
|
||||
|
||||
@Getter
|
||||
|
@@ -21,7 +21,7 @@ class AutoMirroredAnimView : AnimView {
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
override fun dispatchDraw(canvas: Canvas) {
|
||||
override fun dispatchDraw(canvas: Canvas?) {
|
||||
if (layoutDirection == LAYOUT_DIRECTION_RTL) {
|
||||
canvas?.scale(-1f, 1f, width / 2f, height / 2f)
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ class AutoMirroredImageView : ImageView {
|
||||
defStyleRes: Int
|
||||
) : super(context, attrs, defStyleAttr, defStyleRes)
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
override fun onDraw(canvas: Canvas?) {
|
||||
if (layoutDirection == LAYOUT_DIRECTION_RTL) {
|
||||
canvas?.scale(-1f, 1f, width / 2f, height / 2f)
|
||||
}
|
||||
|
@@ -1,23 +0,0 @@
|
||||
package com.chwl.app.view
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.util.AttributeSet
|
||||
import com.google.android.material.imageview.ShapeableImageView
|
||||
|
||||
class AutoMirroredShapeableImageView : ShapeableImageView {
|
||||
constructor(context: Context?) : super(context)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
if (layoutDirection == LAYOUT_DIRECTION_RTL) {
|
||||
canvas?.scale(-1f, 1f, width / 2f, height / 2f)
|
||||
}
|
||||
super.onDraw(canvas)
|
||||
}
|
||||
}
|
@@ -5,7 +5,7 @@ import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogPaymentBinding
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.vip.adapter.PayAdapter
|
||||
@@ -15,7 +15,7 @@ import com.chwl.library.utils.ResUtil
|
||||
/**
|
||||
* 支付选择弹窗
|
||||
*/
|
||||
class PaymentDialog : BaseDialogFragment<DialogPaymentBinding>() {
|
||||
class PaymentDialog : BaseDialog<DialogPaymentBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<PayInfo>
|
||||
|
||||
|
@@ -10,7 +10,7 @@ import android.view.WindowManager
|
||||
import androidx.core.graphics.toColorInt
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogSelectPayTypeBinding
|
||||
import com.chwl.app.ui.widget.dialog.CommonTipDialog
|
||||
import com.chwl.app.utils.SpannableBuilder
|
||||
@@ -24,7 +24,7 @@ import com.chwl.library.utils.SingleToastUtil
|
||||
/**
|
||||
* 充值方式选择弹窗
|
||||
*/
|
||||
class SelectPayTypeDialog : BaseDialogFragment<DialogSelectPayTypeBinding>() {
|
||||
class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
||||
|
||||
private val descText by lazy { requireArguments().getString("descText", "") }
|
||||
private val coins by lazy { requireArguments().getLong("coins", 0) }
|
||||
|
@@ -1,11 +1,11 @@
|
||||
package com.chwl.app.vip.dialog
|
||||
|
||||
import android.os.Bundle
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogVipAuthDetailsBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
|
||||
class VipAuthDetailsDialog : BaseDialogFragment<DialogVipAuthDetailsBinding>() {
|
||||
class VipAuthDetailsDialog : BaseDialog<DialogVipAuthDetailsBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -6,7 +6,7 @@ import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogVipBroadcastBinding
|
||||
import com.chwl.app.vip.VipViewModel
|
||||
import com.chwl.core.utils.CurrentTimeUtils
|
||||
@@ -17,7 +17,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class VipBroadcastDialog : BaseDialogFragment<DialogVipBroadcastBinding>() {
|
||||
class VipBroadcastDialog : BaseDialog<DialogVipBroadcastBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package com.chwl.app.vip.dialog
|
||||
|
||||
import android.os.Bundle
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogVipRemainTimeBinding
|
||||
|
||||
class VipRemainTimeDialog : BaseDialogFragment<DialogVipRemainTimeBinding>() {
|
||||
class VipRemainTimeDialog : BaseDialog<DialogVipRemainTimeBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -8,14 +8,14 @@ import com.opensource.svgaplayer.SVGADrawable
|
||||
import com.opensource.svgaplayer.SVGAParser
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
import com.chwl.app.base.BaseActivity
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.DialogVipUpgradeBinding
|
||||
import com.chwl.app.vip.VipViewModel
|
||||
import com.chwl.core.vip.bean.VipInfo
|
||||
import java.net.MalformedURLException
|
||||
import java.net.URL
|
||||
|
||||
class VipUpgradeDialog : BaseDialogFragment<DialogVipUpgradeBinding>() {
|
||||
class VipUpgradeDialog : BaseDialog<DialogVipUpgradeBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FFFE4EB4"
|
||||
android:startColor="#FFFF1ED7"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners
|
||||
android:bottomLeftRadius="100dp"
|
||||
android:topLeftRadius="100dp" />
|
||||
|
||||
</shape>
|
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:startColor="#4C1A1A1A"
|
||||
android:centerColor="#CC1F1F1F"
|
||||
android:endColor="#E5161616" />
|
||||
</shape>
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 748 B |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 314 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_logo_text.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable-xxhdpi/room_ic_game.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.1 KiB |
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#4C1A1A1A"
|
||||
android:centerColor="#CC1F1F1F"
|
||||
android:startColor="#E5161616" />
|
||||
</shape>
|
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="13dp" />
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#41D4F6"
|
||||
android:startColor="#70E9E7" />
|
||||
</shape>
|
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="13dp" />
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#FED118"
|
||||
android:startColor="#FDB719" />
|
||||
</shape>
|
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="@dimen/dp_12" />
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#4C1A1A1A"
|
||||
android:centerColor="#CC1F1F1F"
|
||||
android:startColor="#E5161616" />
|
||||
</shape>
|
@@ -1,21 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="91dp">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_F5F5F5" />
|
||||
android:layout_height="1px"
|
||||
android:background="@color/color_F5F5F5"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="90dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="@dimen/dp_20">
|
||||
android:gravity="center" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -23,32 +22,32 @@
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_voice_seek_01"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_999999" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/voice_seek"
|
||||
style="@style/seekbarAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1.0"
|
||||
android:minHeight="2dp"
|
||||
android:maxHeight="2dp"
|
||||
android:minHeight="2dp" />
|
||||
android:layout_gravity="center_vertical"
|
||||
style="@style/seekbarAppearance"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/voice_number"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="50%"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_999999" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -56,34 +55,34 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_voice_seek_02"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_999999" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/music_voice_seek"
|
||||
style="@style/seekbarAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1.0"
|
||||
android:minHeight="2dp"
|
||||
android:maxHeight="2dp"
|
||||
android:minHeight="2dp" />
|
||||
android:layout_gravity="center_vertical"
|
||||
style="@style/seekbarAppearance"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/music_voice_number"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="100%"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_999999" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -228,19 +228,6 @@
|
||||
tools:contentDescription="@string/layout_fragment_av_room_game_05"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_config_entrance"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_above="@id/iv_game"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_game"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
@@ -248,23 +235,20 @@
|
||||
android:layout_above="@id/iv_queuing_micro"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
android:src="@drawable/room_ic_game" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_team_pk"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_above="@id/iv_config_entrance"
|
||||
android:layout_above="@id/iv_game"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:src="@drawable/room_team_pk_icon"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -171,41 +171,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_music" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_130"
|
||||
android:clipChildren="false"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bottom_view">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_config_entrance"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_above="@id/iv_game"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_collect_no"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_game"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:alpha="1"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.chwl.app.avroom.widget.BottomView
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="0dp"
|
||||
@@ -246,7 +211,6 @@
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/input_layout"
|
||||
android:layout_width="0dp"
|
||||
@@ -254,10 +218,8 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
@@ -292,13 +254,13 @@
|
||||
android:src="@android:drawable/ic_menu_send" />
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/input_headline_send"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/room_ic_headline_send"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:src="@drawable/room_ic_headline_send" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
@@ -1,236 +0,0 @@
|
||||
<?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="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_38"
|
||||
app:layout_constraintDimensionRatio="300:280"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_close">
|
||||
|
||||
<com.chwl.app.view.AutoMirroredImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/game_team_invite_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/game_team_06"
|
||||
android:textColor="#563C1F"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.091" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_game_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="@dimen/dp_1"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="223:95"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.339"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.327"
|
||||
app:shapeAppearance="@style/shape_corner_10dp"
|
||||
app:strokeColor="#F09540"
|
||||
app:strokeWidth="@dimen/dp_2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_count_add"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/game_team_invite_ic_add"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_game_image"
|
||||
app:layout_constraintHeight_percent="0.082"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.663" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_30"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
android:text="1"
|
||||
android:textColor="#471606"
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_count_add"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_count_add"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_count_add" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_count_subtract"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/game_team_invite_ic_subtract"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_count_add"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_count"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_count_add" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/game_team_07"
|
||||
android:textColor="#3F3C33"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_count_add"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_game_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_count_add" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_money"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/icon_diamond"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.042"
|
||||
app:layout_constraintHorizontal_bias="0.81"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.768" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:text="0"
|
||||
android:textColor="#491609"
|
||||
android:textSize="@dimen/dp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_money"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_money"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_money" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_money_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/game_team_08"
|
||||
android:textColor="#3F3C33"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_money"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_game_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_money" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:background="#33442A11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_game_image"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_game_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.835" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/base_shape_theme_13dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pay"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:autoSizeMaxTextSize="@dimen/dp_13"
|
||||
app:autoSizeMinTextSize="@dimen/dp_8"
|
||||
app:autoSizeStepGranularity="1px"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="65:26"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_game_image"
|
||||
app:layout_constraintHeight_percent="0.092"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.948" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_balance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@string/gift_wallet_overage"
|
||||
android:textColor="#3F3C33"
|
||||
android:textSize="@dimen/dp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/layout_recharge"
|
||||
app:layout_constraintEnd_toStartOf="@id/layout_recharge"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_game_image"
|
||||
app:layout_constraintTop_toTopOf="@id/layout_recharge"
|
||||
app:layout_constraintWidth_default="wrap" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_recharge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_pay"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_pay"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_balance"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_pay"
|
||||
app:layout_constraintVertical_bias="0.6">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_balance"
|
||||
android:layout_width="@dimen/dp_10"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_1_5"
|
||||
android:src="@drawable/icon_diamond" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/tv_recharge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:text="@string/charge"
|
||||
android:textColor="#FF433A"
|
||||
android:textSize="@dimen/dp_12" />
|
||||
|
||||
<com.chwl.app.view.AutoMirroredImageView
|
||||
android:id="@+id/iv_recharge"
|
||||
android:layout_width="@dimen/dp_4_5"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/game_team_invite_ic_recharge_arrow" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="@dimen/dp_26"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginStart="-1dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/game_team_invite_ic_close"
|
||||
app:layout_constraintStart_toEndOf="@id/layout_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,38 +0,0 @@
|
||||
<?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="#F9F9F9">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#EBECF3"
|
||||
android:paddingTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.chwl.app.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.chwl.app.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_title_bar" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/magic_indicator" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,237 +0,0 @@
|
||||
<?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_marginHorizontal="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:background="@drawable/game_team_record_bg_item"
|
||||
android:paddingHorizontal="@dimen/dp_9"
|
||||
android:paddingBottom="@dimen/dp_14">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_user_avatar"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearance="@style/shape_corner_10dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_user_id"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_user_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_user_avatar"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#666666"
|
||||
android:textSize="@dimen/dp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_user_avatar"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_user_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_user_name"
|
||||
tools:text="1000" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_line_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:background="#F4F4F4"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_user_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_game_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="@string/game_team_12"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/v_line_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_money_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:text="@string/game_team_13"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_game_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_game_name_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_time_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:text="@string/game_team_14"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_game_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_order_money_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_id_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:text="@string/game_team_15"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_15"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_game_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_order_time_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/barrier_title_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="end"
|
||||
app:constraint_referenced_ids="tv_game_name_title,tv_order_time_title,tv_order_id_title,tv_order_money_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_game_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_game_name_title"
|
||||
app:layout_constraintStart_toEndOf="@id/barrier_title_end"
|
||||
tools:text="Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_money"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:autoSizeMaxTextSize="@dimen/dp_14"
|
||||
app:autoSizeMinTextSize="@dimen/dp_8"
|
||||
app:autoSizeStepGranularity="1px"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_order_money_title"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_order_money"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_game_name"
|
||||
app:layout_constraintWidth_default="wrap"
|
||||
tools:text="1000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_order_time_title"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_game_name"
|
||||
tools:text="2024-10-22 12:22:34" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_id"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:textColor="#242335"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:autoSizeMaxTextSize="@dimen/dp_14"
|
||||
app:autoSizeMinTextSize="@dimen/dp_8"
|
||||
app:autoSizeStepGranularity="1px"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_order_id_title"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_order_id_copy"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_game_name"
|
||||
app:layout_constraintWidth_default="wrap"
|
||||
tools:text="1231231231231" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_order_money"
|
||||
android:layout_width="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:src="@drawable/icon_diamond"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_order_money"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_order_money"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_order_money" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_order_id_copy"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/game_team_record_ic_copy"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_order_id"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_order_id"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_order_id" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_line_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="#F4F4F4"
|
||||
app:layout_constraintEnd_toEndOf="@id/v_line_top"
|
||||
app:layout_constraintStart_toStartOf="@id/v_line_top"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_order_id_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_chat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:background="@drawable/shape_g_70e9e7_41d4f6_13_lr"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_65"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
android:text="@string/send_msg"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/v_line_bottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_repurchase"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/shape_g_fed118_fdb719_13_lr"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_65"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
android:text="@string/game_team_16"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_chat"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_chat"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_chat" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout 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:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.chwl.app.common.widget.StatusLayout
|
||||
android:id="@+id/status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/game_team_record_item">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
</com.chwl.app.common.widget.StatusLayout>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
@@ -59,26 +59,66 @@
|
||||
android:textColor="#1E1E1F"
|
||||
android:textColorHint="#1E1E1F"
|
||||
android:textSize="@dimen/dp_12"
|
||||
app:layout_constraintBottom_toTopOf="@id/recycler_view_users"
|
||||
app:layout_constraintBottom_toTopOf="@id/fl_avatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_room_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_room_title"
|
||||
tools:text="Content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_users"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:orientation="horizontal"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_online_number"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_room_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc"
|
||||
tools:listitem="@layout/home_item_room_user" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc">
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_0"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1px" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_1"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1px" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_2"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1px" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_3"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_48"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1px" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_4"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_64"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1px" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_online_number"
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.imageview.ShapeableImageView 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:id="@+id/iv_avatar"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:padding="@dimen/dp_0_5"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:shapeAppearance="@style/shape_circle"
|
||||
app:strokeColor="@color/white"
|
||||
app:strokeWidth="@dimen/dp_1" />
|
@@ -11,24 +11,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_send_msg_input"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:background="@drawable/shape_190b032d_14dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/dp_3"
|
||||
android:paddingEnd="@dimen/dp_3"
|
||||
android:text="@string/room_say_something"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/layout_menus"
|
||||
android:layout_width="0dp"
|
||||
@@ -39,7 +21,7 @@
|
||||
app:layout_constraintEnd_toStartOf="@id/icon_room_send_gift"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_room_send_msg_input"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="wrap">
|
||||
|
||||
@@ -49,6 +31,25 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_send_msg_input"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:background="@drawable/shape_190b032d_14dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/dp_3"
|
||||
android:paddingEnd="@dimen/dp_3"
|
||||
android:text="@string/room_say_something"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible"
|
||||
app:autoSizeMaxTextSize="@dimen/dp_10"
|
||||
app:autoSizeMinTextSize="@dimen/dp_7"
|
||||
app:autoSizeStepGranularity="1px"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/room_mic_layout"
|
||||
android:layout_width="@dimen/dp_29"
|
||||
@@ -119,23 +120,12 @@
|
||||
android:src="@drawable/room_menu_ic_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_room_baishun_game"
|
||||
android:id="@+id/icon_room_game"
|
||||
android:layout_width="@dimen/dp_29"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/room_menu_ic_baishun_game" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_room_PK_game"
|
||||
android:layout_width="@dimen/dp_29"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/room_menu_ic_playlist"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
android:src="@drawable/room_menu_ic_playlist" />
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|