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
bfb86a41
Commit
bfb86a41
authored
Jan 08, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a6ebd3d5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
155 deletions
+35
-155
AppConfig.java
...src/main/java/com/duben/xixiplaylet/common/AppConfig.java
+1
-0
DetailAdDialog.kt
...n/java/com/duben/xixiplaylet/ui/widgets/DetailAdDialog.kt
+8
-7
DramaApiDetailActivity.kt
...com/duben/xixiplaylet/video/csj/DramaApiDetailActivity.kt
+3
-3
TxVideoActivity.kt
...in/java/com/duben/xixiplaylet/video/tx/TxVideoActivity.kt
+0
-2
TxVideoAdapter.kt
.../com/duben/xixiplaylet/video/tx/adapter/TxVideoAdapter.kt
+8
-0
NewTxVideoAdapter.kt
...en/xixiplaylet/video/tx/newrecommend/NewTxVideoAdapter.kt
+14
-3
dialog_detail_ad.xml
video/app/src/main/res/layout/dialog_detail_ad.xml
+1
-140
No files found.
video/app/src/main/java/com/duben/xixiplaylet/common/AppConfig.java
View file @
bfb86a41
...
...
@@ -26,6 +26,7 @@ public class AppConfig {
public
static
boolean
enterAlipay
=
false
;
public
static
boolean
showVipVedio
=
false
;
public
static
boolean
showVipAdDialog
=
false
;
public
static
String
detailDialogUnlockText
=
""
;
public
static
long
splashTime
=
0L
;
public
static
double
firstVipPrice
=
0.0
;
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/widgets/DetailAdDialog.kt
View file @
bfb86a41
...
...
@@ -2,28 +2,27 @@ package com.duben.xixiplaylet.ui.widgets
import
android.app.Dialog
import
android.content.Context
import
android.
os.Handl
er
import
android.
location.GnssAntennaInfo.Listen
er
import
android.view.Gravity
import
android.view.KeyEvent
import
android.view.View
import
android.view.WindowManager
import
android.widget.ImageView
import
android.widget.TextView
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.duben.xixiplaylet.R
import
com.duben.xixiplaylet.
ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.xixiplaylet.
ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.xixiplaylet.
common.AppConfig
import
com.duben.xixiplaylet.
mvp.model.VedioBean
import
com.duben.xixiplaylet.utils.SpanUtils
import
com.duben.xixiplaylet.utils.TimeRender
import
java.util.*
class
DetailAdDialog
(
private
val
context
:
Context
,
private
val
listener
:
DialogListener
)
:
class
DetailAdDialog
(
private
val
context
:
Context
,
private
val
listener
:
DialogListener
?
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
private
val
lp
:
WindowManager
.
LayoutParams
private
val
iv_detail_ad_next
:
ImageView
private
val
tv_detail_ad_unlocktext
:
TextView
init
{
setContentView
(
R
.
layout
.
dialog_detail_ad
)
...
...
@@ -45,7 +44,9 @@ class DetailAdDialog(private val context: Context, private val listener: DialogL
// 查找View
iv_detail_ad_next
=
findViewById
<
View
>(
R
.
id
.
iv_detail_ad_next
)
as
ImageView
tv_detail_ad_unlocktext
=
findViewById
<
View
>(
R
.
id
.
tv_detail_ad_unlocktext
)
as
TextView
tv_detail_ad_unlocktext
.
text
=
AppConfig
.
detailDialogUnlockText
iv_detail_ad_next
.
setOnClickListener
(
listener
)
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/xixiplaylet/video/csj/DramaApiDetailActivity.kt
View file @
bfb86a41
...
...
@@ -49,7 +49,6 @@ import kotlinx.android.synthetic.main.drama_activity_api_detail.*
import
kotlinx.android.synthetic.main.drama_activity_api_detail.iv_lucky_gif
import
kotlinx.android.synthetic.main.drama_activity_api_detail.ll_lucky
import
kotlinx.android.synthetic.main.drama_activity_api_detail.tv_lucky_status
import
kotlinx.android.synthetic.main.fragment_main.*
/**
* @author Assen
...
...
@@ -442,13 +441,14 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
if
(!
UserManager
.
getInstance
().
newFlag
)
{
tv_title
.
text
=
String
.
format
(
val
unlockText
=
String
.
format
(
"解锁%s·第%d-%d集"
,
drama
.
title
,
mInitUnlockIndex
+
1
,
mInitUnlockIndex
+
lockSet
)
AppConfig
.
detailDialogUnlockText
=
unlockText
tv_title
.
text
=
unlockText
}
else
{
tv_title
.
text
=
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/TxVideoActivity.kt
View file @
bfb86a41
...
...
@@ -4,7 +4,6 @@ import android.app.Dialog
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.view.View
import
com.google.gson.Gson
import
com.duben.xixiplaylet.R
...
...
@@ -31,7 +30,6 @@ import com.duben.library.utils.GlideUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.xixiplaylet.common.AppConfig
import
com.duben.xixiplaylet.ui.widgets.*
import
kotlinx.android.synthetic.main.activity_new_vip.*
import
kotlinx.android.synthetic.main.activity_tx_video.*
class
TxVideoActivity
:
BaseActivity
(),
View
.
OnClickListener
,
VideoView
,
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/adapter/TxVideoAdapter.kt
View file @
bfb86a41
...
...
@@ -92,6 +92,14 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
val
unlockText
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
it
.
unlockIndex
+
1
,
it
.
unlockIndex
+
it
.
adGiveVedioNum
)
AppConfig
.
detailDialogUnlockText
=
unlockText
}
else
{
// 开通会员解锁
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/newrecommend/NewTxVideoAdapter.kt
View file @
bfb86a41
...
...
@@ -62,18 +62,29 @@ class NewTxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity4, BaseV
VEDIO3DOS_AD
->
{
// 观看激励视频解锁
vipBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
val
unlockText
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
it
.
unlockIndex
+
1
,
it
.
unlockIndex
+
it
.
adGiveVedioNum
)
AppConfig
.
detailDialogUnlockText
=
unlockText
}
VEDIO3DOS_PAY
->
{
// 开通会员解锁
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
else
->
{
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
}
...
...
video/app/src/main/res/layout/dialog_detail_ad.xml
View file @
bfb86a41
...
...
@@ -15,6 +15,7 @@
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_detail_ad_unlocktext"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
...
...
@@ -35,146 +36,6 @@
</RelativeLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1px"
android:layout_marginTop=
"8dp"
android:background=
"#E1E1E1"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginLeft=
"4dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"4dp"
android:background=
"@drawable/shape_bg_agreement"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_rule_date1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:text=
"试用订阅规则说明"
android:textColor=
"@color/black"
android:textSize=
"14sp"
></TextView>
</FrameLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/ic_arrow_bottom"
></ImageView>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginLeft=
"4dp"
android:layout_marginTop=
"4dp"
android:layout_marginRight=
"4dp"
android:background=
"@drawable/shape_bg_agreement"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:text=
"续费提醒"
android:textColor=
"@color/black"
android:textSize=
"14sp"
></TextView>
</FrameLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/ic_arrow_bottom"
></ImageView>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginLeft=
"4dp"
android:layout_marginTop=
"4dp"
android:layout_marginRight=
"4dp"
android:background=
"@drawable/shape_bg_agreement"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:text=
"试用到期后进行自动续费扣款"
android:textColor=
"@color/black"
android:textSize=
"14sp"
></TextView>
</FrameLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/ic_arrow_bottom"
></ImageView>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginLeft=
"4dp"
android:layout_marginTop=
"4dp"
android:layout_marginRight=
"4dp"
android:background=
"@drawable/shape_bg_agreement"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_rule_date2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"14sp"
></TextView>
</FrameLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"4dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"10dp"
android:text=
"支付方式"
android:textColor=
"@color/black"
android:textSize=
"16sp"
android:textStyle=
"bold"
></TextView>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"40dp"
android:layout_gravity=
"right"
android:layout_marginRight=
"20dp"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableLeft=
"@mipmap/ic_alipay"
android:drawablePadding=
"6dp"
android:gravity=
"center_vertical"
android:text=
"支付宝"
android:textColor=
"@color/black"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:scaleType=
"center"
android:src=
"@mipmap/ic_vip_enable_blue"
/>
</LinearLayout>
</FrameLayout>
<TextView
android:id=
"@+id/tv_detail_ad_next"
android:layout_width=
"match_parent"
...
...
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