Commit 7e0c89d7 authored by jyx's avatar jyx

更改VIP页面竖项样式

parent d7c4de2f
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.miaoquplaylet"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 22
versionName "2.0.2"
versionCode 23
versionName "2.0.3"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -28,10 +28,13 @@ import com.duben.miaoquplaylet.ui.adapter.VipBannerAdapter
import com.duben.miaoquplaylet.ui.widgets.*
import com.duben.library.utils.GlideUtils
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.miaoquplaylet.ad.splash.SplashManager
import com.duben.miaoquplaylet.manager.ActivityPageManager
import com.duben.miaoquplaylet.mvp.model.*
import com.duben.miaoquplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import com.duben.miaoquplaylet.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.duben.miaoquplaylet.utils.AppPreferencesManager
import com.duben.miaoquplaylet.utils.LogUtil
import com.duben.miaoquplaylet.utils.rxutil.CommonRxTask
import com.duben.miaoquplaylet.utils.rxutil.RxjavaUtil
import com.jobo.alipay.AliPay
......@@ -66,6 +69,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
const val VEDIO_ID = "VEDIO_ID"
}
var timer: CountDownTimerSupport? = null
private var breathAnim: YoYo.YoYoString? = null
private var payAgreementDialog: PayAgreementDialog? = null
private var payYesDialog: PayYesDialog? = null
......@@ -138,11 +142,13 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if (!isMain) {
AppConfig.enterVipAct = false
}
breathAnim?.stop()
if (timer != null) { //防止计时器重复
timer!!.stop()
timer = null
}
breathAnim?.stop()
vipPresenter.detachView()
}
......@@ -378,8 +384,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private fun initRvView() {
if (vipList != null && vipList!!.size > 0) {
val gridLayoutManager = GridLayoutManager(this, 3)
rvVip.layoutManager = gridLayoutManager
val ma = LinearLayoutManager(this)
ma.orientation = LinearLayoutManager.VERTICAL
rvVip.layoutManager = ma
vipAdapter = VipAdapter(vipList!!)
rvVip.adapter = vipAdapter
vipAdapter.setOnItemClickListener(this)
......
......@@ -61,7 +61,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
holder.tvVipItemLable.gravity = Gravity.CENTER
holder.tvVipItemLable.setBackgroundResource(R.mipmap.ic_vip_lable)
} else {
holder.tvVipItemLable.setPadding(0, 0, UIUtils.dp2px(12), 0)
holder.tvVipItemLable.setPadding(0, 0, UIUtils.dp2px(10), 0)
holder.tvVipItemLable.gravity = Gravity.END or Gravity.CENTER_VERTICAL
holder.tvVipItemLable.text = "可微信支付"
holder.tvVipItemLable.setBackgroundResource(R.mipmap.ic_vip_lable_wx)
......@@ -83,7 +83,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
.append("¥")
.append(tempTitle[0])
.setFontSize(BubbleUtils.sp2px(30))
.append(if(TextUtils.isEmpty(tempTitle[1])) "" else "/"+tempTitle[1])
.append("/"+tempTitle[1])
.create()
} else {
......
......@@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rlVipItemRoot"
android:layout_width="110dp"
android:layout_height="150dp"
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="4dp"
......@@ -14,7 +14,7 @@
<TextView
android:id="@+id/tvVipItemLable"
android:layout_width="wrap_content"
android:layout_width="90dp"
android:layout_height="18dp"
android:background="@mipmap/ic_vip_lable"
android:gravity="center"
......@@ -27,9 +27,10 @@
tools:text="包年会员" />
<LinearLayout
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:orientation="vertical">
<TextView
......@@ -38,34 +39,26 @@
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_gravity="center_horizontal"
tools:text="包年会员" />
<TextView
android:id="@+id/tvVipItemCurMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:text=""
android:layout_marginTop="2dp"
android:textColor="@color/white"
android:textSize="13sp" />
<TextView
android:id="@+id/tvVipItemMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="16sp"
android:layout_gravity="center_horizontal"
tools:text="原价:123" />
</LinearLayout>
<TextView
android:id="@+id/tvVipItemMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="原价:123" />
</RelativeLayout>
\ 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