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
a2373e98
Commit
a2373e98
authored
Apr 03, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e3c33631
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
46 deletions
+46
-46
build.gradle
video/app/build.gradle
+2
-2
UserBean.java
...c/main/java/com/duben/xixiplaylet/mvp/model/UserBean.java
+1
-1
VipActivity.kt
...in/java/com/duben/xixiplaylet/ui/activitys/VipActivity.kt
+36
-36
VipAdapter.kt
.../main/java/com/duben/xixiplaylet/ui/adapter/VipAdapter.kt
+7
-7
No files found.
video/app/build.gradle
View file @
a2373e98
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.xixiplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
24
versionName
"
2.0.3
"
versionCode
60
versionName
"
6.0.0
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/xixiplaylet/mvp/model/UserBean.java
View file @
a2373e98
...
...
@@ -95,6 +95,6 @@ public class UserBean implements Serializable {
}
public
int
getActiviteFlag
()
{
return
activiteFlag
;
return
1
;
}
}
video/app/src/main/java/com/duben/xixiplaylet/ui/activitys/VipActivity.kt
View file @
a2373e98
...
...
@@ -107,9 +107,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
else
{
vipPresenter
.
userLogin
(
isAliPayInstalled
())
}
if
(
isDetail
&&
UserManager
.
getInstance
().
newFlag
)
{
AppConfig
.
showVipAdDialog
=
true
}
//
if (isDetail && UserManager.getInstance().newFlag) {
//
AppConfig.showVipAdDialog = true
//
}
vipPresenter
.
orders
()
...
...
@@ -271,23 +271,23 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
?):
Boolean
{
when
(
keyCode
)
{
KeyEvent
.
KEYCODE_BACK
->
{
if
(
UserManager
.
getInstance
().
newFlag
&&
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
vipAdapter
.
setPosition
(
0
)
vipAdapter
.
notifyDataSetChanged
()
val
vipBean
=
vipList
!!
[
0
]
if
(
vipBean
.
trial
==
1
)
{
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
GONE
payType
=
ALIPAY
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
backPayYesDialog
(
vipBean
)
return
true
}
//
if (UserManager.getInstance().newFlag
//
&& vipList != null && vipList!!.size > 0
//
) {
//
//
vipAdapter.setPosition(0)
//
vipAdapter.notifyDataSetChanged()
//
val vipBean = vipList!![0]
//
if (vipBean.trial == 1) {
//
ll_vip_alipay.visibility = View.VISIBLE
//
ll_vip_wx.visibility = View.GONE
//
payType = ALIPAY
//
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
//
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
//
}
//
backPayYesDialog(vipBean)
//
return true
//
}
finish
()
}
...
...
@@ -300,23 +300,23 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
when
(
v
?.
id
)
{
R
.
id
.
ic_vip_quit
->
{
if
(
UserManager
.
getInstance
().
newFlag
&&
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
vipAdapter
.
setPosition
(
0
)
vipAdapter
.
notifyDataSetChanged
()
val
vipBean
=
vipList
!!
[
0
]
if
(
vipBean
.
trial
==
1
)
{
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
GONE
payType
=
ALIPAY
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
backPayYesDialog
(
vipBean
)
}
else
{
//
if (UserManager.getInstance().newFlag &&
//
vipList != null && vipList!!.size > 0
//
) {
//
vipAdapter.setPosition(0)
//
vipAdapter.notifyDataSetChanged()
//
val vipBean = vipList!![0]
//
if (vipBean.trial == 1) {
//
ll_vip_alipay.visibility = View.VISIBLE
//
ll_vip_wx.visibility = View.GONE
//
payType = ALIPAY
//
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
//
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
//
}
//
backPayYesDialog(vipBean)
//
} else {
finish
()
}
//
}
}
R
.
id
.
tvVipPay
->
{
if
(
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/adapter/VipAdapter.kt
View file @
a2373e98
...
...
@@ -56,17 +56,17 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
vipBean
=
vipList
[
position
]
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
{
//
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
.
setPadding
(
0
,
0
,
0
,
0
)
holder
.
tvVipItemLable
.
text
=
"热门"
holder
.
tvVipItemLable
.
gravity
=
Gravity
.
CENTER
holder
.
tvVipItemLable
.
setBackgroundResource
(
R
.
mipmap
.
ic_vip_lable
)
}
//
}
// try {
...
...
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