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
ef10c020
Commit
ef10c020
authored
Sep 07, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新VIP页面样式
parent
df0c7c61
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
497 additions
and
60 deletions
+497
-60
VipPresenter.kt
...n/java/com/mints/helivideo/mvp/presenters/VipPresenter.kt
+31
-4
VipView.kt
...pp/src/main/java/com/mints/helivideo/mvp/views/VipView.kt
+3
-0
VipActivity.kt
...main/java/com/mints/helivideo/ui/activitys/VipActivity.kt
+134
-45
VipAdapter.kt
...rc/main/java/com/mints/helivideo/ui/adapter/VipAdapter.kt
+14
-10
VipBannerAdapter.java
...java/com/mints/helivideo/ui/adapter/VipBannerAdapter.java
+36
-0
shape_vip_blur.xml
video/app/src/main/res/drawable/shape_vip_blur.xml
+13
-0
activity_new_vip.xml
video/app/src/main/res/layout/activity_new_vip.xml
+265
-0
ic_left_arrow.png
video/app/src/main/res/mipmap-xhdpi/ic_left_arrow.png
+0
-0
ic_vip_arc.png
video/app/src/main/res/mipmap-xhdpi/ic_vip_arc.png
+0
-0
bg_vip_1.png
video/app/src/main/res/mipmap-xxhdpi/bg_vip_1.png
+0
-0
bg_vip_2.png
video/app/src/main/res/mipmap-xxhdpi/bg_vip_2.png
+0
-0
bg_vip_3.png
video/app/src/main/res/mipmap-xxhdpi/bg_vip_3.png
+0
-0
colors.xml
video/app/src/main/res/values/colors.xml
+1
-1
No files found.
video/app/src/main/java/com/mints/helivideo/mvp/presenters/VipPresenter.kt
View file @
ef10c020
...
...
@@ -2,15 +2,12 @@ package com.mints.helivideo.mvp.presenters
import
com.mints.helivideo.MintsApplication
import
com.mints.helivideo.manager.AppHttpManager
import
com.mints.helivideo.mvp.model.BaseResponse
import
com.mints.helivideo.mvp.model.VipBean
import
com.mints.helivideo.mvp.model.WxPayParamBean
import
com.mints.helivideo.mvp.views.VipView
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
com.mints.helivideo.common.DeviceInfo
import
com.mints.helivideo.manager.UserManager
import
com.mints.helivideo.mvp.model.
UserBean
import
com.mints.helivideo.mvp.model.
*
import
com.mints.helivideo.utils.DeviceUuidFactory
import
java.util.*
...
...
@@ -209,4 +206,34 @@ class VipPresenter : BasePresenter<VipView>() {
}
})
}
fun
orders
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
orders
(),
object
:
BaseSubscriber
<
BaseResponse
<
BannerList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
BannerList
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
ordersSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
showToast
(
message
)
}
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/mvp/views/VipView.kt
View file @
ef10c020
package
com.mints.helivideo.mvp.views
import
com.mints.helivideo.mvp.model.BannerList
import
com.mints.helivideo.mvp.model.VipBean
import
com.mints.helivideo.mvp.model.WxPayParamBean
...
...
@@ -7,4 +8,6 @@ interface VipView : BaseView {
fun
getVipProductSuc
(
data
:
VipBean
)
fun
getVipPayParamsSuc
(
payChannel
:
String
,
data
:
WxPayParamBean
)
fun
queryVipOrderSuc
(
isPay
:
Boolean
)
fun
ordersSuc
(
data
:
BannerList
?)
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/activitys/VipActivity.kt
View file @
ef10c020
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/mints/helivideo/ui/adapter/VipAdapter.kt
View file @
ef10c020
package
com.mints.helivideo.ui.adapter
import
android.content.Context
import
android.graphics.Color
import
android.graphics.Paint
import
android.
text.TextUtils
import
android.
view.Gravity
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.LinearLayout
import
android.widget.RelativeLayout
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.RecyclerView
import
com.mints.helivideo.R
import
com.mints.helivideo.mvp.model.VipBean
import
com.mints.helivideo.utils.UIUtils
class
VipAdapter
(
val
vipList
:
MutableList
<
VipBean
.
ListBean
>)
:
RecyclerView
.
Adapter
<
VipAdapter
.
ViewHolder
>()
{
...
...
@@ -53,12 +51,18 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
vipBean
=
vipList
[
position
]
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
if
(
TextUtils
.
isEmpty
(
vipBean
.
topTitle
))
{
holder
.
tvVipItemLable
.
visibility
=
View
.
INVISIBLE
if
(
vipBean
.
trial
!=
0
)
{
holder
.
tvVipItemLable
.
setPadding
(
0
,
0
,
0
,
0
)
holder
.
tvVipItemLable
.
text
=
"限时特惠"
holder
.
tvVipItemLable
.
gravity
=
Gravity
.
CENTER
holder
.
tvVipItemLable
.
setBackgroundResource
(
R
.
mipmap
.
ic_vip_lable
)
}
else
{
holder
.
tvVipItemLable
.
text
=
vipBean
.
topTitle
holder
.
tvVipItemLable
.
visibility
=
View
.
VISIBLE
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
)
}
if
(
vipBean
.
price
<
1
)
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
}
else
{
...
...
@@ -84,11 +88,11 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
if
(
getPosition
()
==
position
)
{
//当前选中
holder
.
rlVipItemRoot
.
setBackgroundResource
(
R
.
drawable
.
shape_vip_adapter
)
holder
.
rlVipItemRoot
.
setBackgroundResource
(
R
.
mipmap
.
ic_vip_selected
)
holder
.
tvVipItemCurMoney
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_F
F7563
R
.
color
.
color_F
D7E0E
)
)
}
else
{
...
...
video/app/src/main/java/com/mints/helivideo/ui/adapter/VipBannerAdapter.java
0 → 100644
View file @
ef10c020
package
com
.
mints
.
helivideo
.
ui
.
adapter
;
import
android.content.Context
;
import
android.view.LayoutInflater
;
import
android.view.ViewGroup
;
import
com.mints.helivideo.R
;
import
com.mints.helivideo.mvp.model.VedioBean
;
import
com.mints.library.utils.GlideUtils
;
import
com.youth.banner.adapter.BannerAdapter
;
import
java.util.List
;
public
class
VipBannerAdapter
extends
BannerAdapter
<
VedioBean
,
ImageTitleHolder
>
{
private
Context
context
;
public
VipBannerAdapter
(
List
<
VedioBean
>
data
)
{
super
(
data
);
}
@Override
public
ImageTitleHolder
onCreateHolder
(
ViewGroup
parent
,
int
viewType
)
{
context
=
parent
.
getContext
();
return
new
ImageTitleHolder
(
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_banner_vip
,
parent
,
false
));
}
@Override
public
void
onBindView
(
ImageTitleHolder
holder
,
VedioBean
data
,
int
position
,
int
size
)
{
if
(
data
.
getCoverImage
()
!=
null
)
{
GlideUtils
.
INSTANCE
.
loadImageViewGifForCenterCrop
(
context
,
data
.
getCoverImage
(),
holder
.
imageView
,
15
);
}
holder
.
title
.
setText
(
data
.
getTitle
());
}
}
video/app/src/main/res/drawable/shape_vip_blur.xml
0 → 100644
View file @
ef10c020
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:centerColor=
"@color/half_transparent"
android:centerX=
"0.5"
android:centerY=
"0.5"
android:endColor=
"@color/black"
android:gradientRadius=
"200dp"
android:startColor=
"@color/full_transparent"
android:type=
"radial"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/layout/activity_new_vip.xml
0 → 100644
View file @
ef10c020
This diff is collapsed.
Click to expand it.
video/app/src/main/res/mipmap-xhdpi/ic_left_arrow.png
0 → 100755
View file @
ef10c020
499 Bytes
video/app/src/main/res/mipmap-xhdpi/ic_vip_arc.png
0 → 100644
View file @
ef10c020
12.8 KB
video/app/src/main/res/mipmap-xxhdpi/bg_vip_1.png
0 → 100644
View file @
ef10c020
534 KB
video/app/src/main/res/mipmap-xxhdpi/bg_vip_2.png
0 → 100644
View file @
ef10c020
860 KB
video/app/src/main/res/mipmap-xxhdpi/bg_vip_3.png
0 → 100644
View file @
ef10c020
This diff is collapsed.
Click to expand it.
video/app/src/main/res/values/colors.xml
View file @
ef10c020
...
...
@@ -27,7 +27,7 @@
<color
name=
"apk_uninstalled"
>
#fea54c
</color>
<color
name=
"color_2F155E"
>
#2F155E
</color>
<color
name=
"color_8D8F90"
>
#7F8182
</color>
...
...
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