Commit 95119d20 authored by jyx's avatar jyx

单套餐解锁功能页面样式更新

parent 9be61a4a
package com.mints.xunmi.ui.activitys
import android.graphics.Paint
import android.os.Bundle
import android.text.Spannable
import android.text.SpannableStringBuilder
import android.text.TextUtils
import android.text.style.ForegroundColorSpan
import android.view.KeyEvent
import android.view.View
import android.widget.CompoundButton
import com.cuieney.sdk.rxpay.RxPay
import com.mints.library.utils.nodoubleclick.AntiShake
import com.mints.xunmi.BuildConfig
import com.mints.xunmi.R
import com.mints.xunmi.common.Constant
import com.mints.xunmi.manager.JpushLoginManager
......@@ -25,15 +28,13 @@ import com.mints.xunmi.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.mints.xunmi.utils.LogUtil
import com.mints.xunmi.utils.TimeRender
import kotlinx.android.synthetic.main.activity_vip2.*
import kotlinx.android.synthetic.main.header_activity.*
/**
* 描述:会员永久
* 作者:孟崔广
* 时间:2020/7/6 11:21
*/
class Vip2Activity : BaseActivity()
, VipView, View.OnClickListener, CompoundButton.OnCheckedChangeListener {
class Vip2Activity : BaseActivity(), VipView, View.OnClickListener, CompoundButton.OnCheckedChangeListener {
private var backPayDialog: BackPayDialog? = null
private var mTimer: CountDownTimerSupport? = null
......@@ -47,7 +48,6 @@ class Vip2Activity : BaseActivity()
private var countDownInterval: Long = 1000 //间隔时长
private val PRICE_TIME_HOUR: Int = 24 //单位 小时
override fun getContentViewLayoutID() = R.layout.activity_vip2
override fun isApplyKitKatTranslucency() = false
......@@ -62,15 +62,22 @@ class Vip2Activity : BaseActivity()
userManager = UserManager.getInstance()
showPriceTime()
tv_activity_title.setText("付款信息")
if (UserManager.getInstance().vipFlag) {
tvVip2Title.text = "功能已解锁"
tv_activity_title.text = "功能已解锁"
tvVip2Pay.text = "已支付"
} else {
tvVip2Title.text = "解锁功能"
tv_activity_title.text = "解锁功能"
tvVip2Pay.text = "去支付"
}
// 添加删除线
tvVip2CashNor.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
val ssb = SpannableStringBuilder("同意《寻蜜付费会员服务协议》")
val fcs = ForegroundColorSpan(resources.getColor(R.color.vip_color_red))
ssb.setSpan(fcs, 2, ssb.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
tvVip2Agreement.text = ssb
initListener()
}
......@@ -99,6 +106,8 @@ class Vip2Activity : BaseActivity()
if (data != null && data.list != null && data.list.size > 0) {
vipList = data.list
tvVip2Cash.text = "${vipList!![0].price}元"
val split = vipList!![0].remarks.split(",")
tvVip2CashNor.text = split[1]
if (!TextUtils.isEmpty(data.content)) {
tvVipContent.visibility = View.VISIBLE
......
......@@ -8,7 +8,9 @@ import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.MotionEvent;
......@@ -42,12 +44,14 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
try {
if (TextUtils.equals(getClass().getSimpleName(), "SplashActivity") ||
TextUtils.equals(getClass().getSimpleName(), "GuideActivity") ) {
TextUtils.equals(getClass().getSimpleName(), "GuideActivity")) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else {
StatusBarUtil.transparencyBar(this); //设置状态栏全透明
StatusBarUtil.StatusBarLightMode(this); //设置白底黑字
if (!TextUtils.equals(getClass().getSimpleName(), "Vip2Activity")) {
StatusBarUtil.transparencyBar(this); //设置状态栏全透明
StatusBarUtil.StatusBarLightMode(this); //设置白底黑字
}
}
} catch (Exception e) {
e.printStackTrace();
......@@ -115,7 +119,6 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
// protected void onNetworkDisConnected() {
// showToast(getString(R.string.netfail));
// }
@Override
protected boolean isApplyStatusBarTranslucency() {
return true;
......
......@@ -156,4 +156,6 @@
<color name="vip_adapter_color">#283041</color>
<color name="legalright_bg_color">#384051</color>
<color name="main_text_color">#8a8a8a</color>
<color name="vip_color_gold">#C2A137</color>
<color name="vip_color_red">#D48064</color>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment