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
40dbb673
Commit
40dbb673
authored
Feb 21, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
12ff6164
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
VipPresenter.kt
...ava/com/duben/happyplaylet/mvp/presenters/VipPresenter.kt
+1
-0
VipActivity.kt
...n/java/com/duben/happyplaylet/ui/activitys/VipActivity.kt
+9
-4
item_rv_vip.xml
video/app/src/main/res/layout/item_rv_vip.xml
+7
-1
No files found.
video/app/src/main/java/com/duben/happyplaylet/mvp/presenters/VipPresenter.kt
View file @
40dbb673
...
@@ -172,6 +172,7 @@ class VipPresenter : BasePresenter<VipView>() {
...
@@ -172,6 +172,7 @@ class VipPresenter : BasePresenter<VipView>() {
val
code
:
Int
=
baseResponse
.
getStatus
()
val
code
:
Int
=
baseResponse
.
getStatus
()
when
(
code
)
{
when
(
code
)
{
200
->
{
200
->
{
getMyInfo
()
view
.
getVipProductSuc
(
baseResponse
.
data
)
view
.
getVipProductSuc
(
baseResponse
.
data
)
}
}
else
->
{
else
->
{
...
...
video/app/src/main/java/com/duben/happyplaylet/ui/activitys/VipActivity.kt
View file @
40dbb673
...
@@ -406,8 +406,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -406,8 +406,11 @@ 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 = GridLayoutManager(this, 3)
rvVip
.
layoutManager
=
gridLayoutManager
// rvVip.layoutManager = gridLayoutManager
val
layoutManager
=
LinearLayoutManager
(
this
)
layoutManager
.
orientation
=
LinearLayoutManager
.
HORIZONTAL
rvVip
.
layoutManager
=
layoutManager
vipAdapter
=
VipAdapter
(
vipList
!!
)
vipAdapter
=
VipAdapter
(
vipList
!!
)
rvVip
.
adapter
=
vipAdapter
rvVip
.
adapter
=
vipAdapter
vipAdapter
.
setOnItemClickListener
(
this
)
vipAdapter
.
setOnItemClickListener
(
this
)
...
@@ -520,7 +523,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -520,7 +523,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
}
},
},
20
00
8
00
)
)
}
}
})
})
...
@@ -801,13 +804,14 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -801,13 +804,14 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
AlipayAuthManager
.
authV2
(
this
@VipActivity
,
AlipayAuthManager
.
authV2
(
this
@VipActivity
,
object
:
AlipayAuthManager
.
AuthListener
{
object
:
AlipayAuthManager
.
AuthListener
{
override
fun
authSuccess
()
{
override
fun
authSuccess
()
{
vipPresenter
.
getMyInfo
()
mainHandler
.
postDelayed
({
mainHandler
.
postDelayed
({
alipay
(
wxParanBean
)
alipay
(
wxParanBean
)
},
500
)
},
500
)
}
}
override
fun
authFail
(
resultStatus
:
String
)
{
override
fun
authFail
(
resultStatus
:
String
)
{
showToast
(
"支付宝登录失败 "
+
resultStatus
)
//
showToast("支付宝登录失败 " + resultStatus)
}
}
})
})
}
}
...
@@ -823,6 +827,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -823,6 +827,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
"确定"
,
"确定"
,
object
:
DialogListener
()
{
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
dialog
?.
dismiss
()
alipayAuth
(
wxParanBean
)
alipayAuth
(
wxParanBean
)
}
}
})
})
...
...
video/app/src/main/res/layout/item_rv_vip.xml
View file @
40dbb673
...
@@ -5,7 +5,10 @@
...
@@ -5,7 +5,10 @@
android:id=
"@+id/rlVipItemRoot"
android:id=
"@+id/rlVipItemRoot"
android:layout_width=
"110dp"
android:layout_width=
"110dp"
android:layout_height=
"150dp"
android:layout_height=
"150dp"
android:layout_margin=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:background=
"@drawable/shape_vip_adapter_none"
android:background=
"@drawable/shape_vip_adapter_none"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -21,6 +24,9 @@
...
@@ -21,6 +24,9 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"14dp"
android:layout_marginTop=
"14dp"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:gravity=
"center_horizontal"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"18sp"
android:textSize=
"18sp"
tools:text=
"包年会员"
/>
tools:text=
"包年会员"
/>
...
...
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