Commit 69d7ccd4 authored by jyx's avatar jyx

new pro

parent c380593a
...@@ -10,8 +10,8 @@ android { ...@@ -10,8 +10,8 @@ android {
applicationId "com.duben.funplayskitsu" applicationId "com.duben.funplayskitsu"
minSdkVersion rootProject.ext.androidMinSdkVersion minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 701 versionCode 711
versionName "7.0.1" versionName "7.1.1"
flavorDimensions "default" flavorDimensions "default"
// dex突破65535的限制 // dex突破65535的限制
......
...@@ -12,6 +12,7 @@ import android.view.KeyEvent ...@@ -12,6 +12,7 @@ import android.view.KeyEvent
import android.view.View import android.view.View
import android.widget.CompoundButton import android.widget.CompoundButton
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.daimajia.androidanimations.library.Techniques import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo import com.daimajia.androidanimations.library.YoYo
import com.duben.library.utils.GlideUtils import com.duben.library.utils.GlideUtils
...@@ -186,6 +187,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -186,6 +187,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue) // iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none) // iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// } // }
ll_vip_alipay.visibility = View.VISIBLE ll_vip_alipay.visibility = View.VISIBLE
ll_vip_wx.visibility = View.GONE ll_vip_wx.visibility = View.GONE
payType = ALIPAY payType = ALIPAY
...@@ -372,7 +374,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -372,7 +374,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private fun initRvView() { private fun initRvView() {
if (vipList != null && vipList!!.size > 0) { if (vipList != null && vipList!!.size > 0) {
val gridLayoutManager = GridLayoutManager(this, 3) val gridLayoutManager = LinearLayoutManager(this)
rvVip.layoutManager = gridLayoutManager rvVip.layoutManager = gridLayoutManager
vipAdapter = VipAdapter(vipList!!) vipAdapter = VipAdapter(vipList!!)
rvVip.adapter = vipAdapter rvVip.adapter = vipAdapter
......
...@@ -104,25 +104,40 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) : ...@@ -104,25 +104,40 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
// } // }
// }catch (e:Exception){ // }catch (e:Exception){
// e.printStackTrace() // e.printStackTrace()
holder.tvVipItemTitle.text = vipBean.title holder.tvVipItemTitle.text = vipBean.title
if (vipBean.price == 0.0) { // if (vipBean.price < 1) {
holder.tvVipItemCurMoney.text = "¥0.01" // holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
} else { // } else {
holder.tvVipItemCurMoney.text = "¥${vipBean.price}" // holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}" //// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
} // }
if (vipBean.oldPrice > 0) { if(vipBean.price==0.0){
holder.tvVipItemMoney.visibility = View.VISIBLE holder.tvVipItemCurMoney.text = SpanUtils()
holder.tvVipItemMoney.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中间横线(删除线) .append("0.01")
if (vipBean.oldPrice < 1) { .setFontSize(BubbleUtils.sp2px(34))
holder.tvVipItemMoney.text = "原价:${vipBean.oldPrice}" .append("元")
} else { .create()
holder.tvVipItemMoney.text = "原价:${String.format("%.0f", vipBean.oldPrice)}" }else{
} holder.tvVipItemCurMoney.text = SpanUtils()
} else { .append(vipBean.price.toString())
holder.tvVipItemMoney.visibility = View.INVISIBLE .setFontSize(BubbleUtils.sp2px(34))
.append("元")
.create()
} }
// if (vipBean.oldPrice > 0) {
// holder.tvVipItemMoney.visibility = View.VISIBLE
// holder.tvVipItemMoney.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中间横线(删除线)
// if (vipBean.oldPrice < 1) {
// holder.tvVipItemMoney.text = "原价:${vipBean.oldPrice}"
// } else {
// holder.tvVipItemMoney.text = "原价:${String.format("%.0f", vipBean.oldPrice)}"
// }
// } else {
// holder.tvVipItemMoney.visibility = View.INVISIBLE
// }
// } // }
holder.tvVipItemMoney.text = vipBean.topTitle
holder.rlVipItemRoot.setOnClickListener { holder.rlVipItemRoot.setOnClickListener {
...@@ -132,21 +147,21 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) : ...@@ -132,21 +147,21 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
if (getPosition() == position) { if (getPosition() == position) {
//当前选中 //当前选中
holder.rlVipItemRoot.setBackgroundResource(R.mipmap.ic_vip_selected) holder.rlVipItemRoot.setBackgroundResource(R.drawable.shape_vip_adapter)
holder.tvVipItemCurMoney.setTextColor( // holder.tvVipItemCurMoney.setTextColor(
ContextCompat.getColor( // ContextCompat.getColor(
context, // context,
R.color.color_FD7E0E // R.color.color_FD7E0E
) // )
) // )
} else { } else {
holder.rlVipItemRoot.setBackgroundResource(R.drawable.shape_vip_adapter_none) holder.rlVipItemRoot.setBackgroundResource(R.drawable.shape_vip_adapter_none)
holder.tvVipItemCurMoney.setTextColor( // holder.tvVipItemCurMoney.setTextColor(
ContextCompat.getColor( // ContextCompat.getColor(
context, // context,
R.color.white // R.color.white
) // )
) // )
} }
holder.itemView.setTag(position) holder.itemView.setTag(position)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<!-- 填充的颜色 --> <!-- 填充的颜色 -->
<stroke android:width="3dp" android:color="@color/red" /> <stroke android:width="2dp" android:color="#EFBC6A" />
<solid android:color="#240a0e" /> <solid android:color="@color/black" />
<!-- 设置按钮的四个角为弧形 --> <!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 --> <!-- android:radius 弧形的半径 -->
<corners android:radius="5dip" /> <corners android:radius="5dip" />
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
android:shape="rectangle"> android:shape="rectangle">
<!-- 填充的颜色 --> <!-- 填充的颜色 -->
<solid android:color="#282D34" /> <solid android:color="@color/black" />
<!-- 设置按钮的四个角为弧形 --> <!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 --> <!-- android:radius 弧形的半径 -->
<corners android:radius="5dip" /> <corners android:radius="5dip" />
......
<?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="#f2d6a4"
android:startColor="#efbc6a" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="30dp"
/>
</shape>
\ No newline at end of file
<?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="#f2d6a4"
android:startColor="#efbc6a" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
/>
</shape>
\ No newline at end of file
...@@ -138,8 +138,8 @@ ...@@ -138,8 +138,8 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvVip" android:id="@+id/rvVip"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="130dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:background="@null" android:background="@null"
android:overScrollMode="never" /> android:overScrollMode="never" />
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
<io.supercharge.shimmerlayout.ShimmerLayout <io.supercharge.shimmerlayout.ShimmerLayout
android:id="@+id/shimmer_text" android:id="@+id/shimmer_text"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginLeft="40dp" android:layout_marginLeft="40dp"
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
android:id="@+id/tvVipPay" android:id="@+id/tvVipPay"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="46dp" android:layout_height="46dp"
android:background="@mipmap/bg_vip_btn" android:background="@drawable/shape_vip_btn"
android:gravity="center" android:gravity="center"
android:text="立即开通" android:text="立即开通"
android:textColor="@color/color_2F155E" android:textColor="@color/color_2F155E"
......
...@@ -2,51 +2,68 @@ ...@@ -2,51 +2,68 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rlVipItemRoot" android:layout_width="match_parent"
android:layout_width="110dp" android:layout_marginLeft="20dp"
android:layout_height="150dp" android:layout_marginRight="20dp"
android:layout_margin="10dp" android:layout_marginTop="10dp"
android:background="@drawable/shape_vip_adapter_none" android:layout_marginBottom="10dp"
android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <FrameLayout
android:layout_width="wrap_content" android:id="@+id/rlVipItemRoot"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_gravity="center" android:layout_height="110dp"
android:layout_marginTop="8dp"
android:background="@drawable/shape_vip_adapter_none"
android:orientation="vertical"> android:orientation="vertical">
<TextView <RelativeLayout
android:id="@+id/tvVipItemTitle" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_marginTop="-8dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_vertical">
android:layout_marginTop="14dp"
android:textColor="@color/white"
android:textSize="18sp"
tools:text="包年会员" />
<TextView <TextView
android:id="@+id/tvVipItemCurMoney" android:id="@+id/tvVipItemTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp" android:layout_marginLeft="18dp"
android:gravity="center" android:textColor="#efbc6a"
android:textColor="#373737" android:textSize="20sp"
android:textSize="20sp" android:layout_centerVertical="true"
android:textStyle="bold" android:textStyle="bold"
tools:text="$78" /> tools:text="包年会员" />
<TextView
android:id="@+id/tvVipItemCurMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="18dp"
android:gravity="center"
android:textColor="#efbc6a"
android:textSize="16sp"
tools:text="$78" />
</RelativeLayout>
<TextView <TextView
android:id="@+id/tvVipItemMoney" android:id="@+id/tvVipItemMoney"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="28dp"
android:layout_gravity="center_horizontal" android:layout_gravity="bottom"
android:layout_marginTop="10dp" android:background="@drawable/shape_vip_lable"
android:textColor="#939AA3" android:gravity="center"
android:textSize="14sp" android:textColor="@color/color_A24240"
android:textSize="12sp"
tools:text="原价:123" /> tools:text="原价:123" />
</LinearLayout>
</FrameLayout>
<TextView <TextView
android:id="@+id/tvVipItemLable" android:id="@+id/tvVipItemLable"
......
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