feat: 修正反饋問題
@@ -732,9 +732,6 @@
|
||||
<activity
|
||||
android:name=".ui.setting.PermissionGuideActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".vip.VipMainActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".vip.VipCenterActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
@@ -1442,7 +1442,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
enterRoomEffects = remoteExtension[UserInfo.ENTER_ROOM_EFFECTS] as String?
|
||||
}
|
||||
val wrapNick = "【" + targetNicks[0].subAndReplaceDot(7) + "】" + enterText
|
||||
|
||||
|
||||
if (!TextUtils.isEmpty(enterRoomEffects)) {
|
||||
playMemberInAnimByUrl(wrapNick, enterRoomEffects)
|
||||
} else {
|
||||
@@ -1496,7 +1496,11 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
|
||||
private fun playMemberInAnim(text: String, svgaVideoEntity: SVGAVideoEntity) {
|
||||
binding.roomMenberInSvga.visibility = VISIBLE
|
||||
binding.roomMenberInSvga.loops = 1
|
||||
if (svgaVideoEntity.frames == 1) {
|
||||
binding.roomMenberInSvga.loops = 50
|
||||
} else {
|
||||
binding.roomMenberInSvga.loops = 1
|
||||
}
|
||||
binding.roomMenberInSvga.clearsAfterStop = true
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
|
@@ -36,7 +36,6 @@ import com.chwl.app.ui.wallet.WalletActivity
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
||||
import com.chwl.app.view.GenderAgeTextView
|
||||
import com.chwl.app.vip.VipCenterActivity
|
||||
import com.chwl.app.vip.VipMainActivity
|
||||
import com.chwl.app.vip.VipViewModel
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.initial.InitialModel
|
||||
@@ -354,7 +353,6 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
}
|
||||
|
||||
R.id.iv_vip -> {
|
||||
// VipMainActivity.start(mContext)
|
||||
VipCenterActivity.start(mContext)
|
||||
//进入贵族中心埋点
|
||||
val goldWalletInfo = PayModel.get().currentWalletInfo
|
||||
|
@@ -9,6 +9,7 @@ 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.app.vip.VipCenterActivity;
|
||||
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;
|
||||
@@ -38,7 +39,6 @@ import com.chwl.app.ui.pay.ChargeActivity;
|
||||
import com.chwl.app.ui.setting.ModifyPwdActivity;
|
||||
import com.chwl.app.ui.user.activity.UserInfoActivity;
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity;
|
||||
import com.chwl.app.vip.VipMainActivity;
|
||||
import com.chwl.core.DemoCache;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.community.event.SquareTaskEvent;
|
||||
@@ -216,7 +216,7 @@ public class RouterHandler {
|
||||
ModifyPwdActivity.start(context, ModifyPwdActivity.LOGIN_PWD);
|
||||
break;
|
||||
case RouterType.VIP_MAIN:
|
||||
VipMainActivity.start(context);
|
||||
VipCenterActivity.start(context);
|
||||
break;
|
||||
case RouterType.CP_INVITE:
|
||||
CpInviteRecordActivity.Companion.start(context, false);
|
||||
|
@@ -43,6 +43,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.chwl.app.ui.adapter.StarWeekAdapter;
|
||||
import com.chwl.app.ui.webview.DialogWebViewActivity;
|
||||
import com.chwl.app.vip.VipCenterActivity;
|
||||
import com.chwl.core.UriProvider;
|
||||
import com.chwl.core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo;
|
||||
@@ -74,7 +75,6 @@ import com.chwl.app.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.chwl.app.ui.widget.recyclerview.decoration.VerticalDecoration;
|
||||
import com.chwl.app.utils.RegexUtil;
|
||||
import com.chwl.app.utils.SpannableBuilder;
|
||||
import com.chwl.app.vip.VipMainActivity;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.bean.RoomQueueInfo;
|
||||
import com.chwl.core.gift.GiftModel;
|
||||
@@ -1467,7 +1467,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
showEasyPopup();
|
||||
break;
|
||||
case R.id.iv_open_noble:
|
||||
VipMainActivity.start(context);
|
||||
VipCenterActivity.start(context);
|
||||
//进入贵族中心埋点
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, IReportConstants.THREE);
|
||||
|
@@ -16,12 +16,12 @@ import android.widget.TextView;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.chwl.app.vip.VipCenterActivity;
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.library.common.util.Utils;
|
||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
||||
import com.chwl.app.vip.VipMainActivity;
|
||||
import com.chwl.core.market_verify.MarketVerifyModel;
|
||||
import com.chwl.core.room.event.FaceIsReadyEvent;
|
||||
import com.chwl.core.room.face.DynamicFaceModel;
|
||||
@@ -309,7 +309,7 @@ public class DynamicFaceDialog extends BottomSheetDialog
|
||||
tvNormalTab.setSelected(true);
|
||||
}
|
||||
} else if (v.getId() == R.id.iv_open_noble) {
|
||||
VipMainActivity.start(context);
|
||||
VipCenterActivity.start(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -119,13 +119,8 @@ class VipCenterActivity : BaseViewBindingActivity<ActivityVipCenterBinding>(),
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
this.banner = findViewById(R.id.banner_view)
|
||||
// if (UiUtils.isRtl(AppUtils.getApp())) {
|
||||
//// banner.setBannerGalleryEffect(5, 5, 5)
|
||||
// } else {
|
||||
banner.setBannerGalleryEffect(20, 20, 15)
|
||||
// }
|
||||
|
||||
banner = findViewById(R.id.banner_view)
|
||||
banner.setBannerGalleryEffect(20, 20, 15)
|
||||
banner.addOnPageChangeListener(object : OnPageChangeListener {
|
||||
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
|
||||
// 页面滑动中
|
||||
@@ -147,17 +142,18 @@ class VipCenterActivity : BaseViewBindingActivity<ActivityVipCenterBinding>(),
|
||||
recyclerView.layoutManager = GridLayoutManager(this, 2)
|
||||
}
|
||||
|
||||
|
||||
private fun updateVipCenterBar() {
|
||||
mTitleBar = findViewById(R.id.title_bar)
|
||||
if (mTitleBar != null) {
|
||||
mTitleBar.addAction(object : TitleBar.ImageAction(R.drawable.vip_center_help_button) {
|
||||
override fun performAction(view: View) {
|
||||
CommonWebViewActivity.start(
|
||||
this@VipCenterActivity,
|
||||
UriProvider.getVipHelpUrl())
|
||||
}
|
||||
})
|
||||
}
|
||||
// if (mTitleBar != null) {
|
||||
// mTitleBar.addAction(object : TitleBar.ImageAction(R.drawable.vip_center_help_button) {
|
||||
// override fun performAction(view: View) {
|
||||
// CommonWebViewActivity.start(
|
||||
// this@VipCenterActivity,
|
||||
// UriProvider.getVipHelpUrl())
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
||||
private fun handleAuthAdapter() {
|
||||
@@ -222,23 +218,23 @@ class VipCenterActivity : BaseViewBindingActivity<ActivityVipCenterBinding>(),
|
||||
}
|
||||
|
||||
vipViewModel.myVipInfoLiveData.observe(this) {
|
||||
val adapter = vipViewModel.vipInfosLiveData.value?.let { it1 ->
|
||||
VipCenterBannerAdapter(this,
|
||||
it1, it)
|
||||
}
|
||||
banner.setAdapter(adapter, false)
|
||||
it?.let {
|
||||
val adapter = vipViewModel.vipInfosLiveData.value?.let { it1 ->
|
||||
VipCenterBannerAdapter(this,
|
||||
it1, it)
|
||||
}
|
||||
banner.setAdapter(adapter, false)
|
||||
lifecycleScope.launch {
|
||||
delay(500)
|
||||
// lifecycleScope.launch {
|
||||
// delay(500)
|
||||
banner.setCurrentItem(it.vipLevel-1)
|
||||
}
|
||||
// bannerView.post {
|
||||
// binding.bannerView.setPageMargin(UIUtil.dip2px(mContext, 8.0))
|
||||
// .setScrollDuration(800)
|
||||
// .setOnPageClickListener { _: View?, position: Int ->
|
||||
// }
|
||||
// .create(it)
|
||||
// }
|
||||
if (it.ownAuthTypes?.contains(13) == true && mTitleBar.actionCount == 1) {
|
||||
mTitleBar.addAction(object : TitleBar.ImageAction(R.drawable.ic_vip_setting) {
|
||||
override fun performAction(view: View?) {
|
||||
VipSettingActivity.start(this@VipCenterActivity)
|
||||
}
|
||||
}, 0)
|
||||
}
|
||||
} ?: run {
|
||||
// binding.layoutLevelInfo.isVisible = false
|
||||
// binding.layoutLevelProgress.isVisible = false
|
||||
@@ -252,7 +248,7 @@ class VipCenterActivity : BaseViewBindingActivity<ActivityVipCenterBinding>(),
|
||||
if (it.comingSoon == 2) {
|
||||
/// 处理敬请期待情况, 补充显示 SVGA
|
||||
binding.slAuth.isVisible = false
|
||||
binding.bannerView.isVisible = false
|
||||
// binding.bannerView.isVisible = false
|
||||
binding.layoutBottomPanel.isVisible = false
|
||||
} else {
|
||||
val myVipInfo = vipViewModel.myVipInfoLiveData.value
|
||||
@@ -402,6 +398,9 @@ class VipCenterActivity : BaseViewBindingActivity<ActivityVipCenterBinding>(),
|
||||
private fun refreshBottomArea() {
|
||||
val currentPageVipInfo = vipViewModel.vipInfosLiveData.value?.get(currentIndex)
|
||||
currentPageVipInfo?.let {
|
||||
currentChargeInfo = chargeList?.firstOrNull {
|
||||
it.prodDesc?.toIntOrNull() == currentPageVipInfo.vipLevel
|
||||
}
|
||||
if (it.buyAmount == 0) {
|
||||
binding.tvNoticeText.visibility = View.VISIBLE
|
||||
binding.tvAdditionalText.visibility = View.GONE
|
||||
@@ -419,14 +418,6 @@ class VipCenterActivity : BaseViewBindingActivity<ActivityVipCenterBinding>(),
|
||||
myVipIsHighLevel = myVipInfo.vipLevel >= currentPageVipInfo.vipLevel
|
||||
}
|
||||
|
||||
if (myVipIsHighLevel) {
|
||||
binding.layoutBottomPanel.alpha = 0.5F
|
||||
binding.layoutBottomPanel.isEnabled = false
|
||||
} else {
|
||||
binding.layoutBottomPanel.alpha = 1F
|
||||
binding.layoutBottomPanel.isEnabled = true
|
||||
}
|
||||
|
||||
binding.tvNoticeText.visibility = View.GONE
|
||||
binding.tvAdditionalText.visibility = View.VISIBLE
|
||||
binding.tvOpenVip.visibility = View.VISIBLE
|
||||
|
@@ -1,621 +0,0 @@
|
||||
package com.chwl.app.vip
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.activity.viewModels
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.example.module_base.support.billing.IBillingResult
|
||||
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.google.IGoogleService
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.netease.nim.uikit.common.util.sys.TimeUtil
|
||||
import com.opensource.svgaplayer.SVGADrawable
|
||||
import com.opensource.svgaplayer.SVGAImageView
|
||||
import com.opensource.svgaplayer.SVGAParser
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingActivity
|
||||
import com.chwl.app.base.TitleBar
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.ActivityVipMainBinding
|
||||
import com.chwl.app.ui.pay.ChargeActivity
|
||||
import com.chwl.app.ui.setting.ModifyPwdActivity
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
import com.chwl.app.vip.adapter.VipAuthAdapter
|
||||
import com.chwl.app.vip.adapter.VipMagicIndicatorAdapter
|
||||
import com.chwl.app.vip.adapter.VipRebateAdapter
|
||||
import com.chwl.app.vip.dialog.SelectPayTypeDialog
|
||||
import com.chwl.app.vip.dialog.VipAuthDetailsDialog
|
||||
import com.chwl.app.vip.dialog.VipRemainTimeDialog
|
||||
import com.chwl.core.UriProvider
|
||||
import com.chwl.core.pay.PayModel
|
||||
import com.chwl.core.pay.bean.ChargeBean
|
||||
import com.chwl.core.pay.bean.PayRecordId
|
||||
import com.chwl.core.utils.net.IgnoreException
|
||||
import com.chwl.core.vip.bean.VipAuthInfo
|
||||
import com.chwl.core.vip.bean.VipInfo
|
||||
import com.chwl.core.utils.extension.toast
|
||||
import com.chwl.core.vip.VipOpenEvent
|
||||
import com.chwl.library.utils.SingleToastUtil
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import java.net.MalformedURLException
|
||||
import java.net.URL
|
||||
|
||||
class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
||||
VipMagicIndicatorAdapter.OnItemSelectListener, IBillingService.Listener {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, VipMainActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
|
||||
private const val BIND_CODE_GOLD = 200
|
||||
private const val TAG = "VipMainActivity"
|
||||
}
|
||||
|
||||
private val authAdapter = VipAuthAdapter()
|
||||
private lateinit var rvDelegate: RVDelegate<VipAuthInfo>
|
||||
private val vipViewModel: VipViewModel by viewModels()
|
||||
private var billingManager: IBillingService? = null
|
||||
private var currentChargeInfo: ChargeBean? = null
|
||||
private var chargeList: List<ChargeBean>? = null
|
||||
private val rebateAdapter = VipRebateAdapter()
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
EventBus.getDefault().register(this)
|
||||
initWhiteTitleBar(getString(R.string.vip_center))
|
||||
mTitleBar.addAction(object : TitleBar.ImageAction(R.drawable.ic_vip_help) {
|
||||
override fun performAction(view: View) {
|
||||
CommonWebViewActivity.start(this@VipMainActivity, UriProvider.getVipHelpUrl())
|
||||
}
|
||||
})
|
||||
initView()
|
||||
initObserve()
|
||||
binding.ivRankList.setOnClickListener {
|
||||
CommonWebViewActivity.start(this@VipMainActivity, UriProvider.getRankListUrl())
|
||||
}
|
||||
binding.ivTimeHelp.setOnClickListener {
|
||||
VipRemainTimeDialog.newInstance().show(this)
|
||||
}
|
||||
|
||||
rvDelegate = RVDelegate.Builder<VipAuthInfo>()
|
||||
.setLayoutManager(GridLayoutManager(this, 3))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextView(
|
||||
context,
|
||||
getString(R.string.me_no_search_results)
|
||||
)
|
||||
)
|
||||
.setAdapter(authAdapter)
|
||||
.build()
|
||||
binding.recyclerView.isNestedScrollingEnabled = false
|
||||
authAdapter.setOnItemClickListener { _, _, position ->
|
||||
authAdapter.getItem(position)?.let {
|
||||
VipAuthDetailsDialog.newInstance(it.descPic, it.authName, it.authIntro).show(this)
|
||||
}
|
||||
}
|
||||
vipViewModel.getVipPageInfo()
|
||||
|
||||
vipViewModel.loadingLiveData.observe(this) {
|
||||
if (it == true) {
|
||||
dialogManager.showProgressDialog(this)
|
||||
} else {
|
||||
dialogManager.dismissDialog()
|
||||
}
|
||||
}
|
||||
|
||||
vipViewModel.authInfosLiveData.observe(this) {
|
||||
authAdapter.setNewData(it)
|
||||
}
|
||||
|
||||
vipViewModel.vipInfosLiveData.observe(this) {
|
||||
it?.let {
|
||||
initTitleTab(it)
|
||||
}
|
||||
}
|
||||
|
||||
vipViewModel.myVipInfoLiveData.observe(this) {
|
||||
it?.let {
|
||||
binding.layoutLevelInfo.isVisible = true
|
||||
binding.layoutLevelProgress.isVisible = true
|
||||
binding.tvNotOpen.text =
|
||||
"${getString(R.string.me_current_power_value)}${it.currScore}"
|
||||
binding.tvCurrValue.text = "${getString(R.string.me_current)}${it.currScore}"
|
||||
binding.tvCurrLevelName.text = it.vipName
|
||||
binding.tvKeepValue.text = "${getString(R.string.me_grading)}${it.levelKeepScore}"
|
||||
if (it.isMaxLevel) {
|
||||
binding.llNextLevelDesc.isVisible = false
|
||||
binding.tvMaxLevelHint.isVisible = true
|
||||
binding.tvUpValue.isVisible = false
|
||||
} else {
|
||||
binding.llNextLevelDesc.isVisible = true
|
||||
binding.tvMaxLevelHint.isVisible = false
|
||||
binding.tvUpValue.isVisible = true
|
||||
binding.tvNextLevelName.text = it.nextVipName
|
||||
binding.tvUpValue.text = "${getString(R.string.me_upgrade)}${it.levelUpScore}"
|
||||
binding.tvUpgradeValue.text = "${it.levelUpScore - it.currScore}"
|
||||
}
|
||||
binding.tvResidueTime.text = TimeUtil.getElapseTimeForVip(it.remainSeconds)
|
||||
binding.seekBar.max = it.levelUpScore
|
||||
binding.seekBar.progress = Math.min(it.currScore, it.levelUpScore)
|
||||
|
||||
val currValueParams =
|
||||
binding.tvCurrValue.layoutParams as ConstraintLayout.LayoutParams
|
||||
currValueParams.horizontalBias =
|
||||
Math.min(it.currScore.toFloat() / it.levelUpScore, 1f)
|
||||
binding.tvCurrValue.layoutParams = currValueParams
|
||||
|
||||
val keepParams =
|
||||
binding.ivKeepIndicator.layoutParams as ConstraintLayout.LayoutParams
|
||||
keepParams.horizontalBias = it.levelKeepScore.toFloat() / it.levelUpScore
|
||||
binding.ivKeepIndicator.layoutParams = keepParams
|
||||
|
||||
if (it.ownAuthTypes?.contains(13) == true && mTitleBar.actionCount == 1) {
|
||||
mTitleBar.addAction(object : TitleBar.ImageAction(R.drawable.ic_vip_setting) {
|
||||
override fun performAction(view: View) {
|
||||
VipSettingActivity.start(this@VipMainActivity)
|
||||
}
|
||||
}, 0)
|
||||
}
|
||||
|
||||
} ?: run {
|
||||
binding.layoutLevelInfo.isVisible = false
|
||||
binding.layoutLevelProgress.isVisible = false
|
||||
binding.slAuth.isVisible = true
|
||||
binding.tvNotOpen.text = getString(R.string.me_no_aristocracy_yet)
|
||||
}
|
||||
}
|
||||
|
||||
vipViewModel.currVipInfoLiveData.observe(this) {
|
||||
it?.let {
|
||||
if (it.comingSoon == 2) {
|
||||
binding.llNotOpen.isVisible = true
|
||||
binding.slAuth.isVisible = false
|
||||
binding.layoutBottomPanel.isVisible = false
|
||||
loadSVGA(binding.ivNotOpenIcon, it.vipLogo)
|
||||
} else {
|
||||
binding.slAuth.isVisible = true
|
||||
binding.llNotOpen.isVisible = false
|
||||
binding.layoutBottomPanel.isVisible = true
|
||||
val myVipInfo = vipViewModel.myVipInfoLiveData.value
|
||||
binding.ivMyLevel.isInvisible = it.vipLevel != myVipInfo?.vipLevel
|
||||
binding.tvNotOpen.isInvisible =
|
||||
!(it.vipLevel == myVipInfo?.vipLevel || myVipInfo == null)
|
||||
loadSVGA(binding.ivVipIcon, it.vipLogo)
|
||||
binding.tvAuthNum.text =
|
||||
"${it.ownAuthTypes?.size ?: 0}/${vipViewModel.authInfosLiveData.value?.size ?: 0}"
|
||||
authAdapter.setVipInfo(it)
|
||||
authAdapter.notifyDataSetChanged()
|
||||
loadRebateData(it)
|
||||
refreshOpenVipState()
|
||||
}
|
||||
} ?: run {
|
||||
getString(R.string.me_failed_to_get_aristocrat_data).toast()
|
||||
binding.llNotOpen.isVisible = false
|
||||
binding.slAuth.isVisible = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
vipViewModel.pageLiveData.observe(this) {
|
||||
it?.let {
|
||||
binding.magicIndicator.onPageSelected(it)
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOpenVip.setOnClickListener {
|
||||
checkBuyVip {
|
||||
buyVip()
|
||||
}
|
||||
}
|
||||
requestChargeList{
|
||||
loadChargeList(it)
|
||||
}
|
||||
initBilling()
|
||||
}
|
||||
|
||||
private fun initBilling() {
|
||||
billingManager = IGoogleService.newBillingService(this,this)
|
||||
}
|
||||
|
||||
override fun initWhiteTitleBar(title: String?) {
|
||||
mTitleBar = findViewById(R.id.title_bar)
|
||||
if (mTitleBar != null) {
|
||||
mTitleBar.setTitle(title)
|
||||
mTitleBar.setImmersive(false)
|
||||
mTitleBar.setTitleColor(resources.getColor(R.color.white))
|
||||
mTitleBar.setLeftImageResource(R.drawable.arrow_left_white)
|
||||
mTitleBar.setBackgroundResource(R.color.transparent)
|
||||
mTitleBar.setLeftClickListener { onLeftClickListener() }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化推荐和派对tab
|
||||
*/
|
||||
private fun initTitleTab(vipInfos: List<VipInfo>) {
|
||||
val commonNavigator = CommonNavigator(context)
|
||||
commonNavigator.isEnablePivotScroll = true
|
||||
commonNavigator.isFollowTouch = false
|
||||
val magicIndicatorAdapter =
|
||||
VipMagicIndicatorAdapter(
|
||||
context,
|
||||
vipInfos
|
||||
)
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this)
|
||||
commonNavigator.adapter = magicIndicatorAdapter
|
||||
binding.magicIndicator.navigator = commonNavigator
|
||||
commonNavigator.titleContainer.showDividers = LinearLayout.SHOW_DIVIDER_MIDDLE
|
||||
}
|
||||
|
||||
private fun loadSVGA(svgaImageView: SVGAImageView, svgaUrl: String) {
|
||||
try {
|
||||
SVGAParser.shareParser()
|
||||
.decodeFromURL(URL(svgaUrl), object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val drawable = SVGADrawable(videoItem)
|
||||
svgaImageView.setImageDrawable(drawable)
|
||||
svgaImageView.startAnimation()
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
}
|
||||
})
|
||||
} catch (e: MalformedURLException) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onItemSelect(position: Int, view: TextView?) {
|
||||
vipViewModel.onItemSelect(position)
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onVipOpenEvent(vipOpenEvent: VipOpenEvent) {
|
||||
getString(R.string.me_opening_of_the_aristocracy_successful).toast()
|
||||
vipViewModel.getVipPageInfo()
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
}
|
||||
|
||||
/*客户端设置成功回调*/
|
||||
@SuppressLint("CheckResult", "SetTextI18n")
|
||||
override fun onBillingClientSetupFinished() {
|
||||
Log.i(TAG, "onBillingClientSetupFinished")
|
||||
val call: ((List<ChargeBean>) -> Unit) = { list ->
|
||||
loadChargeList(list)
|
||||
val productKeys = ArrayList<String>()
|
||||
list.forEach {
|
||||
productKeys.add(it.getChargeProdId())
|
||||
}
|
||||
billingManager?.querySkuDetailsAsync(productKeys,
|
||||
object : IBillingService.ProductDetailsResponseListener {
|
||||
override fun onProductDetailsResponse(
|
||||
billingResult: IBillingResult,
|
||||
productDetails: List<IProductDetails>
|
||||
) {
|
||||
if (!billingResult.isResponseOk()) {
|
||||
Log.w(
|
||||
TAG,
|
||||
"Unsuccessful query for Error code: " + billingResult.getResponseCode()
|
||||
)
|
||||
} else if (productDetails.isNotEmpty()) {
|
||||
for (item in list) {
|
||||
for (skuDetails in productDetails) {
|
||||
if (skuDetails.getProductId() == item.getChargeProdId()) {
|
||||
item.productDetails = skuDetails
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
loadChargeList(list)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
val list = chargeList
|
||||
if (list.isNullOrEmpty()) {
|
||||
requestChargeList{
|
||||
call.invoke(it)
|
||||
}
|
||||
} else {
|
||||
call.invoke(list)
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun requestChargeList(call: (List<ChargeBean>) -> Unit) {
|
||||
PayModel.get().vipList
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(
|
||||
{
|
||||
call.invoke(it)
|
||||
}, {
|
||||
it.printStackTrace()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/*商品更新回调*/
|
||||
@SuppressLint("CheckResult")
|
||||
override fun onPurchasesUpdated(purchases: List<IPurchase>) {
|
||||
for (purchase in purchases) {
|
||||
if (purchase.isPurchasedState() &&
|
||||
purchase.getAccountIdentifiers() != null
|
||||
) {
|
||||
PayModel.get().verifyOrder(
|
||||
purchase.getAccountIdentifiers()!!.getObfuscatedAccountId(),
|
||||
purchase.getProducts().firstOrNull(),
|
||||
purchase.getPackageName(),
|
||||
purchase.getPurchaseToken()
|
||||
)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(
|
||||
{ token: String ->
|
||||
//L.i("token=" + token);
|
||||
billingManager?.consumeAsync(token)
|
||||
// var skuDetails: IProductDetails? = null
|
||||
// if (googleChargeBean?.getChargeProdId() == purchase.getProducts()
|
||||
// .firstOrNull()
|
||||
// ) {
|
||||
// skuDetails = googleChargeBean?.productDetails
|
||||
// }
|
||||
// if (skuDetails != null) {
|
||||
// val eventValue: MutableMap<String, Any> =
|
||||
// HashMap()
|
||||
// eventValue[AFInAppEventParameterName.CONTENT_TYPE] = "Gold"
|
||||
// eventValue[AFInAppEventParameterName.QUANTITY] = 1
|
||||
// eventValue[AFInAppEventParameterName.CONTENT_ID] =
|
||||
// purchase.getOrderId()!!
|
||||
// if (skuDetails.getOneTimePurchaseOfferDetails() != null) {
|
||||
// eventValue[AFInAppEventParameterName.REVENUE] =
|
||||
// skuDetails.getOneTimePurchaseOfferDetails()
|
||||
// ?.getPriceAmountMicros()!! / 1000000f
|
||||
// eventValue["Price"] =
|
||||
// skuDetails.getOneTimePurchaseOfferDetails()
|
||||
// ?.getFormattedPrice()!!
|
||||
// eventValue[AFInAppEventParameterName.CURRENCY] =
|
||||
// skuDetails.getOneTimePurchaseOfferDetails()
|
||||
// ?.getPriceCurrencyCode()!!
|
||||
// }
|
||||
// AppsFlyerLib.getInstance().logEvent(
|
||||
// applicationContext,
|
||||
// AFInAppEventType.PURCHASE,
|
||||
// eventValue
|
||||
// )
|
||||
// }
|
||||
}
|
||||
) { throwable: Throwable ->
|
||||
if (throwable !is IgnoreException) {
|
||||
SingleToastUtil.showToast(throwable.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.i(TAG, "onPurchasesUpdated")
|
||||
}
|
||||
|
||||
override fun onConsumeFinished(token: String?, result: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onFailedHandle(result: Int) {
|
||||
|
||||
}
|
||||
|
||||
/*购买商品*/
|
||||
@SuppressLint("CheckResult")
|
||||
fun buyProduct(productDetails: IProductDetails?) {
|
||||
if (productDetails != null) {
|
||||
Log.d(TAG, "BuyProduct:" + productDetails.getProductId())
|
||||
PayModel.get().placeOrder(productDetails.getProductId())
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(
|
||||
{ recordId: PayRecordId ->
|
||||
billingManager?.initiatePurchaseFlow(
|
||||
productDetails,
|
||||
recordId.recordId
|
||||
)
|
||||
}
|
||||
) { throwable: Throwable ->
|
||||
SingleToastUtil.showToast(
|
||||
throwable.message
|
||||
)
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "skuDetails ==null")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (billingManager?.isServiceConnected() == true) {
|
||||
billingManager?.onQueryPurchases()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
EventBus.getDefault().unregister(this)
|
||||
billingManager?.destroy()
|
||||
currentChargeInfo = null
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
dialogManager.dismissDialog()
|
||||
if (resultCode != RESULT_OK) {
|
||||
return
|
||||
}
|
||||
if (requestCode == BIND_CODE_GOLD) {
|
||||
ModifyPwdActivity.start(this, ModifyPwdActivity.FOGERT_PAY_PWD)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun initView() {
|
||||
binding.tvTabPrivilege.setOnClickListener {
|
||||
showPrivilegeTab()
|
||||
}
|
||||
binding.tvTabRebate.setOnClickListener {
|
||||
showRebateTab()
|
||||
}
|
||||
rebateAdapter.onGetListener = {
|
||||
vipViewModel.getVipRebate(it)
|
||||
}
|
||||
binding.rvRebate.isNestedScrollingEnabled = false
|
||||
binding.rvRebate.adapter = rebateAdapter
|
||||
}
|
||||
|
||||
private fun initObserve(){
|
||||
lifecycleScope.launch(Dispatchers.Main) {
|
||||
vipViewModel.getVipRebateSuccessFlow.collect {
|
||||
rebateAdapter.notifyItemRangeChanged(0, rebateAdapter.itemCount, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showPrivilegeTab() {
|
||||
binding.layoutRebate.isInvisible = true
|
||||
binding.groupPrivilege.isInvisible = false
|
||||
binding.tvTabPrivilege.setBackgroundResource(R.drawable.vip_bg_tab_selected)
|
||||
binding.tvTabRebate.setBackgroundResource(R.drawable.vip_bg_tab_unselected)
|
||||
}
|
||||
|
||||
private fun showRebateTab() {
|
||||
binding.groupPrivilege.isInvisible = true
|
||||
binding.layoutRebate.isInvisible = false
|
||||
binding.tvTabPrivilege.setBackgroundResource(R.drawable.vip_bg_tab_unselected)
|
||||
binding.tvTabRebate.setBackgroundResource(R.drawable.vip_bg_tab_selected)
|
||||
}
|
||||
|
||||
private fun loadChargeList(list: List<ChargeBean>) {
|
||||
this.chargeList = list
|
||||
refreshOpenVipState()
|
||||
}
|
||||
|
||||
private fun loadRebateData(info: VipInfo) {
|
||||
binding.tvTableLevelName.text = info.vipName
|
||||
binding.tvRebateTips1.text =
|
||||
context.getString(R.string.vip_buy_tips_format).format(info.vipName)
|
||||
rebateAdapter.setNewData(info.returnProfits)
|
||||
val isNormalStatus = info.isRebate()
|
||||
binding.layoutRebate.children.forEach {
|
||||
if(it == binding.tvRebateDisableStatus){
|
||||
it.isVisible = !isNormalStatus
|
||||
}else{
|
||||
it.isVisible = isNormalStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun refreshOpenVipState() {
|
||||
val currentVipInfo = vipViewModel.currVipInfoLiveData.value
|
||||
val myVipInfo = vipViewModel.myVipInfoLiveData.value
|
||||
if (currentVipInfo != null) {
|
||||
currentChargeInfo = chargeList?.firstOrNull {
|
||||
it.prodDesc?.toIntOrNull() == currentVipInfo.vipLevel
|
||||
}
|
||||
if (currentChargeInfo != null && (myVipInfo == null || myVipInfo.vipLevel < currentVipInfo.vipLevel)) {
|
||||
"${currentChargeInfo?.getMoney()} ${
|
||||
getString(R.string.vip_buy_format).format(
|
||||
currentVipInfo.vipName
|
||||
)
|
||||
}".also { binding.tvOpenVip.text = it }
|
||||
binding.layoutOpenVip.isVisible = true
|
||||
} else {
|
||||
binding.layoutOpenVip.isVisible = false
|
||||
}
|
||||
} else {
|
||||
currentChargeInfo = null
|
||||
binding.layoutOpenVip.isVisible = false
|
||||
}
|
||||
if (binding.layoutOpenVip.isVisible && binding.layoutLevelProgress.isVisible) {
|
||||
binding.layoutBottomPanel.setBackgroundDrawable(binding.layoutLevelProgress.background)
|
||||
} else {
|
||||
binding.layoutBottomPanel.setBackgroundDrawable(null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkBuyVip(block: () -> Unit) {
|
||||
val myVipInfo = vipViewModel.myVipInfoLiveData.value
|
||||
val currentVipInfo = vipViewModel.currVipInfoLiveData.value
|
||||
if (currentVipInfo != null && myVipInfo != null && currentVipInfo.vipLevel > myVipInfo.vipLevel) {
|
||||
val message = context.getString(R.string.vip_buy_tips).format(
|
||||
myVipInfo.vipName,currentVipInfo.vipName
|
||||
)
|
||||
dialogManager.showOkCancelDialog(message,
|
||||
context.getString(R.string.miniworld_activity_mwteamroommessageact_07),
|
||||
context.getString(R.string.miniworld_activity_mwteamroommessageact_08),
|
||||
true
|
||||
) { block.invoke() }
|
||||
} else {
|
||||
block.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
private fun buyVip() {
|
||||
val googleUnavailable = ((currentChargeInfo?.productDetails?.getOneTimePurchaseOfferDetails()
|
||||
?.getPriceAmountMicros()
|
||||
?: "0") == "0")
|
||||
var text =
|
||||
currentChargeInfo?.productDetails?.getOneTimePurchaseOfferDetails()?.getFormattedPrice()
|
||||
if (text.isNullOrEmpty()) {
|
||||
text = ((currentChargeInfo?.money ?: 0.0) * 1000).toInt().toString()
|
||||
}
|
||||
// SelectPayTypeDialog.newInstance(
|
||||
// text,
|
||||
// !googleUnavailable,
|
||||
// currentChargeInfo?.getMoney() ?: 0.0
|
||||
// )
|
||||
// .apply {
|
||||
// setOnDiamondChargeClick {
|
||||
// vipViewModel.openVipWithDiamond(
|
||||
// currentChargeInfo?.getProdDesc()?.toIntOrNull() ?: -1
|
||||
// )
|
||||
// }
|
||||
// setOnGoogleChargeClick {
|
||||
// if (googleUnavailable) {
|
||||
// toast(getString(R.string.Recharge_failure))
|
||||
// return@setOnGoogleChargeClick
|
||||
// }
|
||||
// currentChargeInfo?.let { charge ->
|
||||
// buyProduct(charge.productDetails)
|
||||
// }
|
||||
// }
|
||||
// setOnChargeClick {
|
||||
// ChargeActivity.start(this@VipMainActivity)
|
||||
// }
|
||||
// }
|
||||
// .show(context)
|
||||
}
|
||||
}
|
@@ -35,14 +35,8 @@ class VipCenterIdentificationsAdapter(
|
||||
holder: VipCenterIdentificationsAdapter.ItemViewHolder,
|
||||
position: Int
|
||||
) {
|
||||
// var targetIndex = 0
|
||||
// when(position) {
|
||||
// 0 -> targetIndex = 0
|
||||
// 1 -> targetIndex = 1
|
||||
// 2 -> targetIndex = 4
|
||||
// 3 -> targetIndex = 7
|
||||
// 4 -> targetIndex = 11
|
||||
// }
|
||||
|
||||
|
||||
|
||||
val filteredList = items.filter {
|
||||
it.authType == 1 || it.authType == 5 || it.authType == 8 || it.authType ==
|
||||
@@ -70,6 +64,12 @@ class VipCenterIdentificationsAdapter(
|
||||
holder.contentImageView.setImageResource(resourceId)
|
||||
}
|
||||
|
||||
val screenWidth = context.resources.displayMetrics.widthPixels
|
||||
val itemWidth = (screenWidth * 160)/375
|
||||
val layoutParams = holder.itemView.layoutParams
|
||||
layoutParams.width = itemWidth
|
||||
holder.itemView.layoutParams = layoutParams
|
||||
|
||||
// holder.itemView.setOnClickListener {
|
||||
// listener.onItemClick(position)
|
||||
// }
|
||||
@@ -88,7 +88,6 @@ class VipCenterIdentificationsAdapter(
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun setVipInfo(vipInfo: VipInfo?) {
|
||||
this.vipInfo = vipInfo
|
||||
// TODO:过滤 items 的内容,显示指定的 vip 权益
|
||||
this.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 487 B |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_vip_setting.webp
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 642 KiB After Width: | Height: | Size: 642 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -26,6 +26,7 @@
|
||||
android:id="@+id/main_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:elevation="0.5dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/vip_center_background"
|
||||
app:layout_constraintDimensionRatio="750:820"
|
||||
app:layout_constraintDimensionRatio="375:330"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -48,7 +48,7 @@
|
||||
android:id="@+id/sl_auth"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="@dimen/dp_46"
|
||||
android:layout_marginBottom="@dimen/dp_80"
|
||||
android:fillViewport="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -274,7 +274,7 @@
|
||||
app:layout_constraintEnd_toEndOf="@id/layout_bottom_panel"
|
||||
app:layout_constraintStart_toStartOf="@id/layout_bottom_panel"
|
||||
app:layout_constraintTop_toTopOf="@id/layout_bottom_panel"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:text="Only through activity"
|
||||
android:text="@string/vip_center_9"
|
||||
tools:visibility="visible"
|
||||
|
@@ -3,19 +3,18 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:layout_constraintDimensionRatio="166:120"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
app:layout_constraintDimensionRatio="164:120"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<!-- 背景图片 -->
|
||||
<ImageView
|
||||
android:id="@+id/item_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/vip_center_identification_card"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintDimensionRatio="166:120"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -24,9 +23,9 @@
|
||||
<!-- 内容图片 -->
|
||||
<ImageView
|
||||
android:id="@+id/item_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
app:layout_constraintDimensionRatio="164:90"
|
||||
app:layout_constraintStart_toStartOf="@id/item_background"
|
||||
app:layout_constraintEnd_toEndOf="@id/item_background"
|
||||
@@ -44,11 +43,10 @@
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/color_FFE3AF"
|
||||
android:textSize="13sp"
|
||||
android:gravity="center"
|
||||
android:gravity="center_horizontal|bottom"
|
||||
tools:text="1234567"
|
||||
app:layout_constraintStart_toStartOf="@id/item_background"
|
||||
app:layout_constraintEnd_toEndOf="@id/item_background"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_background"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_image" />
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_background" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -48,11 +48,11 @@ public class SquareFragment extends BaseFragment implements ContactsIndicatorAda
|
||||
/**
|
||||
* 关注
|
||||
*/
|
||||
public static final int TAB_TYPE_ATTENT = 0;
|
||||
public static final int TAB_TYPE_ATTENT = 1;
|
||||
/**
|
||||
* 推荐
|
||||
*/
|
||||
public static final int TAB_TYPE_RECOMMEND = 1;
|
||||
public static final int TAB_TYPE_RECOMMEND = 0;
|
||||
/**
|
||||
* 最新
|
||||
*/
|
||||
@@ -86,8 +86,8 @@ public class SquareFragment extends BaseFragment implements ContactsIndicatorAda
|
||||
@Override
|
||||
public void initiate() {
|
||||
List<Integer> fragmentPos = new ArrayList<>();
|
||||
fragmentPos.add(TAB_TYPE_ATTENT);
|
||||
fragmentPos.add(TAB_TYPE_RECOMMEND);
|
||||
fragmentPos.add(TAB_TYPE_ATTENT);
|
||||
fragmentPos.add(TAB_TYPE_NEW);
|
||||
List<String> tagList = new ArrayList<>();
|
||||
List<Fragment> fragmentList = new ArrayList<>();
|
||||
@@ -114,13 +114,13 @@ public class SquareFragment extends BaseFragment implements ContactsIndicatorAda
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(getContext());
|
||||
commonNavigator.setLeftPadding(20);
|
||||
commonNavigator.setRightPadding(40);
|
||||
commonNavigator.setRightPadding(100);
|
||||
ContactsIndicatorAdapter magicIndicatorAdapter = new ContactsIndicatorAdapter(getContext(), tagList);
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this);
|
||||
commonNavigator.setTitleWrapContent(true);
|
||||
commonNavigator.setAdapter(magicIndicatorAdapter);
|
||||
magicIndicator.setNavigator(commonNavigator);
|
||||
commonNavigator.getTitleContainer().setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
|
||||
commonNavigator.getTitleContainer().setShowDividers(LinearLayout.SHOW_DIVIDER_BEGINNING);
|
||||
//init indicator
|
||||
ViewPagerHelper.bind(magicIndicator, viewPager);
|
||||
viewPager.post(new Runnable() {
|
||||
|
@@ -33,8 +33,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@@ -133,7 +133,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ludo_game_logo"
|
||||
app:layout_constraintDimensionRatio="141.5:113"
|
||||
app:layout_constraintDimensionRatio="187:139"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/line_logo_top"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#ff9f8052"
|
||||
android:textSize="14dp"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="@string/layout_item_vip_auth_01" />
|
||||
|
||||
</LinearLayout>
|
@@ -414,7 +414,7 @@ class mapping:
|
||||
bbadb.dbabde.SingleRoomPKSearchActivity -> bt.KL
|
||||
ecaccbb.beccadff.GrantedPermissionsActivity -> s.KM
|
||||
ecaccbb.beccadff.PermissionGuideActivity -> s.KN
|
||||
abaeec.bdedac.VipMainActivity -> dn.KO
|
||||
abaeec.bdedac.VipCenterActivity -> dn.KO
|
||||
abaeec.bdedac.VipSettingActivity -> dn.KP
|
||||
ebceceb.facbeebc.AddSkillActivity -> dp.KQ
|
||||
ebceceb.facbeebc.SkillHomeActivity -> dp.KR
|
||||
|