Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
ae53f8bb
Commit
ae53f8bb
authored
Jun 25, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new pro
parent
156eeff3
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
140 additions
and
75 deletions
+140
-75
build.gradle
video/app/build.gradle
+2
-2
VipActivity.kt
...n/java/com/duben/easytheateru/ui/activitys/VipActivity.kt
+3
-1
VipAdapter.kt
...main/java/com/duben/easytheateru/ui/adapter/VipAdapter.kt
+45
-30
shape_vip_adapter.xml
video/app/src/main/res/drawable/shape_vip_adapter.xml
+2
-2
shape_vip_adapter_none.xml
video/app/src/main/res/drawable/shape_vip_adapter_none.xml
+1
-1
shape_vip_btn.xml
video/app/src/main/res/drawable/shape_vip_btn.xml
+14
-0
shape_vip_lable.xml
video/app/src/main/res/drawable/shape_vip_lable.xml
+17
-0
activity_new_vip.xml
video/app/src/main/res/layout/activity_new_vip.xml
+4
-4
item_rv_vip.xml
video/app/src/main/res/layout/item_rv_vip.xml
+52
-35
No files found.
video/app/build.gradle
View file @
ae53f8bb
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.easytheateru"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
7
0
1
versionName
"7.
0
.1"
versionCode
7
1
1
versionName
"7.
1
.1"
flavorDimensions
"default"
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/easytheateru/ui/activitys/VipActivity.kt
View file @
ae53f8bb
...
...
@@ -12,6 +12,7 @@ import android.view.KeyEvent
import
android.view.View
import
android.widget.CompoundButton
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.duben.library.utils.GlideUtils
...
...
@@ -186,6 +187,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// }
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
GONE
payType
=
ALIPAY
...
...
@@ -372,7 +374,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private
fun
initRvView
()
{
if
(
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
val
gridLayoutManager
=
GridLayoutManager
(
this
,
3
)
val
gridLayoutManager
=
LinearLayoutManager
(
this
)
rvVip
.
layoutManager
=
gridLayoutManager
vipAdapter
=
VipAdapter
(
vipList
!!
)
rvVip
.
adapter
=
vipAdapter
...
...
video/app/src/main/java/com/duben/easytheateru/ui/adapter/VipAdapter.kt
View file @
ae53f8bb
...
...
@@ -105,24 +105,39 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
// }catch (e:Exception){
// e.printStackTrace()
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
if
(
vipBean
.
price
==
0.0
)
{
holder
.
tvVipItemCurMoney
.
text
=
"¥0.01"
}
else
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
}
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
// if (vipBean.price < 1) {
// holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
// } else {
// holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
//// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
// }
if
(
vipBean
.
price
==
0.0
){
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
"0.01"
)
.
setFontSize
(
BubbleUtils
.
sp2px
(
34
))
.
append
(
"元"
)
.
create
()
}
else
{
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
vipBean
.
price
.
toString
())
.
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
{
...
...
@@ -132,21 +147,21 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
if
(
getPosition
()
==
position
)
{
//当前选中
holder
.
rlVipItemRoot
.
setBackgroundResource
(
R
.
mipmap
.
ic_vip_selected
)
holder
.
tvVipItemCurMoney
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FD7E0E
)
)
holder
.
rlVipItemRoot
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter
)
//
holder.tvVipItemCurMoney.setTextColor(
//
ContextCompat.getColor(
//
context,
//
R.color.color_FD7E0E
//
)
//
)
}
else
{
holder
.
rlVipItemRoot
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter_none
)
holder
.
tvVipItemCurMoney
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
white
)
)
//
holder.tvVipItemCurMoney.setTextColor(
//
ContextCompat.getColor(
//
context,
//
R.color.white
//
)
//
)
}
holder
.
itemView
.
setTag
(
position
)
...
...
video/app/src/main/res/drawable/shape_vip_adapter.xml
View file @
ae53f8bb
...
...
@@ -2,8 +2,8 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 填充的颜色 -->
<stroke
android:width=
"
3dp"
android:color=
"@color/red
"
/>
<solid
android:color=
"
#240a0e
"
/>
<stroke
android:width=
"
2dp"
android:color=
"#EFBC6A
"
/>
<solid
android:color=
"
@color/black
"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"5dip"
/>
...
...
video/app/src/main/res/drawable/shape_vip_adapter_none.xml
View file @
ae53f8bb
...
...
@@ -3,7 +3,7 @@
android:shape=
"rectangle"
>
<!-- 填充的颜色 -->
<solid
android:color=
"
#282D34
"
/>
<solid
android:color=
"
@color/black
"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"5dip"
/>
...
...
video/app/src/main/res/drawable/shape_vip_btn.xml
0 → 100644
View file @
ae53f8bb
<?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
video/app/src/main/res/drawable/shape_vip_lable.xml
0 → 100644
View file @
ae53f8bb
<?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
video/app/src/main/res/layout/activity_new_vip.xml
View file @
ae53f8bb
...
...
@@ -138,8 +138,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvVip"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"
wrap_content
"
android:layout_width=
"
match_par
ent"
android:layout_height=
"
130dp
"
android:layout_gravity=
"center_horizontal"
android:background=
"@null"
android:overScrollMode=
"never"
/>
...
...
@@ -244,7 +244,7 @@
<io.supercharge.shimmerlayout.ShimmerLayout
android:id=
"@+id/shimmer_text"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"40dp"
...
...
@@ -258,7 +258,7 @@
android:id=
"@+id/tvVipPay"
android:layout_width=
"match_parent"
android:layout_height=
"46dp"
android:background=
"@
mipmap/bg
_vip_btn"
android:background=
"@
drawable/shape
_vip_btn"
android:gravity=
"center"
android:text=
"立即开通"
android:textColor=
"@color/color_2F155E"
...
...
video/app/src/main/res/layout/item_rv_vip.xml
View file @
ae53f8bb
...
...
@@ -2,51 +2,68 @@
<FrameLayout
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_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<FrameLayout
android:id=
"@+id/rlVipItemRoot"
android:layout_width=
"110dp
"
android:layout_height=
"15
0dp"
android:layout_margin=
"10
dp"
android:layout_width=
"match_parent
"
android:layout_height=
"11
0dp"
android:layout_marginTop=
"8
dp"
android:background=
"@drawable/shape_vip_adapter_none"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_marginTop=
"-8dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:orientation=
"vertical"
>
android:layout_gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tvVipItemTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"14dp"
android:textColor=
"@color/white"
android:textSize=
"18sp"
android:layout_marginLeft=
"18dp"
android:textColor=
"#efbc6a"
android:textSize=
"20sp"
android:layout_centerVertical=
"true"
android:textStyle=
"bold"
tools:text=
"包年会员"
/>
<TextView
android:id=
"@+id/tvVipItemCurMoney"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"8dp"
android:layout_centerVertical=
"true"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"18dp"
android:gravity=
"center"
android:textColor=
"#373737"
android:textSize=
"20sp"
android:textStyle=
"bold"
android:textColor=
"#efbc6a"
android:textSize=
"16sp"
tools:text=
"$78"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tvVipItemMoney"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"10dp"
android:textColor=
"#939AA3"
android:textSize=
"14sp"
android:layout_width=
"match_parent"
android:layout_height=
"28dp"
android:layout_gravity=
"bottom"
android:background=
"@drawable/shape_vip_lable"
android:gravity=
"center"
android:textColor=
"@color/color_A24240"
android:textSize=
"12sp"
tools:text=
"原价:123"
/>
</LinearLayout>
</FrameLayout>
<TextView
android:id=
"@+id/tvVipItemLable"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment