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
d809c8ce
Commit
d809c8ce
authored
Nov 22, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e9c5156c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
19 deletions
+21
-19
.gitignore
video/app/.gitignore
+4
-1
VipActivity.kt
...n/java/com/duben/loveplayletu/ui/activitys/VipActivity.kt
+8
-7
VipAdapter.kt
...main/java/com/duben/loveplayletu/ui/adapter/VipAdapter.kt
+5
-5
activity_vip.xml
video/app/src/main/res/layout/activity_vip.xml
+3
-4
item_rv_vip.xml
video/app/src/main/res/layout/item_rv_vip.xml
+1
-2
No files found.
video/app/.gitignore
View file @
d809c8ce
...
@@ -4,4 +4,7 @@ seeds.txt
...
@@ -4,4 +4,7 @@ seeds.txt
unused.txt
unused.txt
priguardMapping.txt
priguardMapping.txt
/facai
/facai
/smartclean
/huawei
\ No newline at end of file
/oppo
/xiaomi
/vivo
\ No newline at end of file
video/app/src/main/java/com/duben/loveplayletu/ui/activitys/VipActivity.kt
View file @
d809c8ce
...
@@ -9,15 +9,17 @@ import android.os.Bundle
...
@@ -9,15 +9,17 @@ import android.os.Bundle
import
android.os.Handler
import
android.os.Handler
import
android.os.Looper
import
android.os.Looper
import
android.text.TextUtils
import
android.text.TextUtils
import
android.util.Log
import
android.view.KeyEvent
import
android.view.KeyEvent
import
android.view.View
import
android.view.View
import
android.widget.CompoundButton
import
android.widget.CompoundButton
import
android
x.recyclerview.widget.GridLayoutManager
import
android
.widget.LinearLayout
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.alipay.sdk.app.OpenAuthTask
import
com.alipay.sdk.app.OpenAuthTask
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.nodoubleclick.AntiShake
import
com.duben.loveplayletu.BuildConfig
import
com.duben.loveplayletu.BuildConfig
import
com.duben.loveplayletu.R
import
com.duben.loveplayletu.R
import
com.duben.loveplayletu.common.AppConfig
import
com.duben.loveplayletu.common.AppConfig
...
@@ -33,8 +35,6 @@ import com.duben.loveplayletu.ui.adapter.VipBannerAdapter
...
@@ -33,8 +35,6 @@ import com.duben.loveplayletu.ui.adapter.VipBannerAdapter
import
com.duben.loveplayletu.ui.widgets.*
import
com.duben.loveplayletu.ui.widgets.*
import
com.duben.loveplayletu.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.loveplayletu.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.loveplayletu.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.loveplayletu.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.library.utils.GlideUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.loveplayletu.utils.SpanUtils
import
com.duben.loveplayletu.utils.SpanUtils
import
com.jobo.alipay.AliPay
import
com.jobo.alipay.AliPay
import
com.jobo.alipay.AlipayInfoImpl
import
com.jobo.alipay.AlipayInfoImpl
...
@@ -47,7 +47,7 @@ import com.tencent.mm.opensdk.openapi.IWXAPI
...
@@ -47,7 +47,7 @@ import com.tencent.mm.opensdk.openapi.IWXAPI
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
import
com.youth.banner.listener.OnPageChangeListener
import
com.youth.banner.listener.OnPageChangeListener
import
kotlinx.android.synthetic.main.activity_new_vip.*
import
kotlinx.android.synthetic.main.activity_new_vip.*
import
java.net.URLDecoder
import
kotlinx.android.synthetic.main.header_layout.*
import
java.net.URLEncoder
import
java.net.URLEncoder
...
@@ -421,8 +421,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -421,8 +421,9 @@ 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
=
LinearLayoutManager
(
this
)
val
linearLayoutManager
=
LinearLayoutManager
(
this
)
rvVip
.
layoutManager
=
gridLayoutManager
linearLayoutManager
.
orientation
=
LinearLayoutManager
.
HORIZONTAL
rvVip
.
layoutManager
=
linearLayoutManager
vipAdapter
=
VipAdapter
(
vipList
!!
)
vipAdapter
=
VipAdapter
(
vipList
!!
)
rvVip
.
adapter
=
vipAdapter
rvVip
.
adapter
=
vipAdapter
vipAdapter
.
setOnItemClickListener
(
this
)
vipAdapter
.
setOnItemClickListener
(
this
)
...
...
video/app/src/main/java/com/duben/loveplayletu/ui/adapter/VipAdapter.kt
View file @
d809c8ce
...
@@ -13,7 +13,7 @@ import com.duben.loveplayletu.mvp.model.VipBean
...
@@ -13,7 +13,7 @@ import com.duben.loveplayletu.mvp.model.VipBean
import
com.duben.loveplayletu.utils.BubbleUtils
import
com.duben.loveplayletu.utils.BubbleUtils
import
com.duben.loveplayletu.utils.SpanUtils
import
com.duben.loveplayletu.utils.SpanUtils
class
VipAdapter
(
val
vipList
:
MutableList
<
VipBean
.
ListBean
>)
:
class
VipAdapter
(
private
val
vipList
:
MutableList
<
VipBean
.
ListBean
>)
:
RecyclerView
.
Adapter
<
VipAdapter
.
ViewHolder
>()
{
RecyclerView
.
Adapter
<
VipAdapter
.
ViewHolder
>()
{
var
myPos
:
Int
=
0
var
myPos
:
Int
=
0
...
@@ -22,8 +22,8 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
...
@@ -22,8 +22,8 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
lateinit
var
mOnItemClickListener
:
OnItemClickListener
lateinit
var
mOnItemClickListener
:
OnItemClickListener
init
{
init
{
if
(
vipList
!=
null
&&
vipList
.
size
>
0
)
{
if
(
vipList
.
size
>
0
)
{
for
(
i
in
0
..
vipList
.
size
-
1
)
{
for
(
i
in
0
until
vipList
.
size
)
{
if
(
vipList
[
i
].
activityType
==
1
)
{
if
(
vipList
[
i
].
activityType
==
1
)
{
myPos
=
i
myPos
=
i
break
break
...
@@ -105,13 +105,13 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
...
@@ -105,13 +105,13 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
// 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
.
price
==
0.0
)
{
if
(
vipBean
.
price
==
0.0
)
{
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
"0.01"
)
.
append
(
"0.01"
)
.
setFontSize
(
BubbleUtils
.
sp2px
(
34
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
34
))
.
append
(
"元"
)
.
append
(
"元"
)
.
create
()
.
create
()
}
else
{
}
else
{
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
vipBean
.
price
.
toString
())
.
append
(
vipBean
.
price
.
toString
())
.
setFontSize
(
BubbleUtils
.
sp2px
(
34
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
34
))
...
...
video/app/src/main/res/layout/activity_vip.xml
View file @
d809c8ce
...
@@ -47,11 +47,10 @@
...
@@ -47,11 +47,10 @@
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvVip"
android:id=
"@+id/rvVip"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
200dp
"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:background=
"@null"
android:background=
"@color/color_2F155E"
/>
android:overScrollMode=
"never"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
video/app/src/main/res/layout/item_rv_vip.xml
View file @
d809c8ce
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<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:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"
match_parent
"
android:layout_width=
"
200dp
"
android:layout_marginLeft=
"20dp"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
...
...
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