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
accced25
Commit
accced25
authored
Jan 08, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
66c6cada
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
32 deletions
+54
-32
build.gradle
video/app/build.gradle
+2
-2
MainFragment.kt
...in/java/com/duben/xixiplaylet/ui/fragment/MainFragment.kt
+3
-2
TxVideoAdapter.kt
.../com/duben/xixiplaylet/video/tx/adapter/TxVideoAdapter.kt
+3
-3
drama_activity_api_detail.xml
video/app/src/main/res/layout/drama_activity_api_detail.xml
+35
-19
item_block_view.xml
video/app/src/main/res/layout/item_block_view.xml
+11
-6
bg_detail_bottom.png
video/app/src/main/res/mipmap-xhdpi/bg_detail_bottom.png
+0
-0
No files found.
video/app/build.gradle
View file @
accced25
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.xixiplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
2
2
versionName
"2.0.
1
"
versionCode
2
3
versionName
"2.0.
2
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/fragment/MainFragment.kt
View file @
accced25
...
...
@@ -331,8 +331,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
override
fun
getSoltVedioSuc
(
data
:
IndexList
?)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
true
)
if
(
data
!=
null
&&
data
.
vedioMsg
!=
null
)
{
val
firstVedio
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VEDIO
,
true
)
if
(
data
!=
null
&&
data
.
vedioMsg
!=
null
&&
firstVedio
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
false
)
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
data
.
vedioMsg
)
}
else
{
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/adapter/TxVideoAdapter.kt
View file @
accced25
...
...
@@ -91,12 +91,12 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
vipBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集
1
"
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}元解锁后续剧集
2
"
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
}
else
{
...
...
@@ -104,7 +104,7 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集
3
"
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
holder
.
getView
<
TextView
>(
R
.
id
.
unlock
).
text
=
String
.
format
(
"查看激励视频"
)
...
...
video/app/src/main/res/layout/drama_activity_api_detail.xml
View file @
accced25
...
...
@@ -179,7 +179,6 @@
android:layout_gravity=
"center"
android:layout_marginStart=
"30dp"
android:layout_marginEnd=
"30dp"
android:background=
"@drawable/shape_bg_write"
android:gravity=
"center"
android:orientation=
"vertical"
>
...
...
@@ -189,37 +188,54 @@
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_bg_write"
/>
<TextView
android:id=
"@+id/tv_title"
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@mipmap/bg_detail_top2"
android:layout_gravity=
"center_horizontal"
></FrameLayout>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:background=
"@mipmap/bg_detail_center"
android:layout_gravity=
"center"
>
<TextView
android:layout_marginTop=
"10dp"
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"试看已结束"
android:layout_gravity=
"center"
android:textColor=
"@color/color_815136"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
</FrameLayout>
<Button
android:id=
"@+id/vip"
android:layout_width=
"280dp"
android:layout_height=
"46dp"
android:layout_marginTop=
"20dp"
android:visibility=
"gone"
android:layout_marginBottom=
"10dp"
android:text=
"试看已结束"
android:textColor=
"@color/black"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
android:background=
"@mipmap/bg_detail_bottom"
android:textColor=
"@color/white"
/>
<Button
android:id=
"@+id/unlock"
android:layout_width=
"2
3
0dp"
android:layout_height=
"4
0
dp"
android:layout_width=
"2
8
0dp"
android:layout_height=
"4
6
dp"
android:layout_marginBottom=
"10dp"
android:layout_marginTop=
"10dp"
android:background=
"@mipmap/bg_detail_top"
android:paddingStart=
"30dp"
android:text=
"看广告解锁1集"
android:textColor=
"@color/color_815136"
/>
<Button
android:id=
"@+id/vip"
android:layout_width=
"230dp"
android:layout_height=
"40dp"
android:layout_marginBottom=
"10dp"
android:background=
"@mipmap/bg_detail_bottom"
android:textColor=
"@color/white"
android:visibility=
"gone"
/>
</LinearLayout>
</FrameLayout>
...
...
video/app/src/main/res/layout/item_block_view.xml
View file @
accced25
...
...
@@ -34,33 +34,38 @@
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:background=
"@mipmap/bg_detail_center"
android:layout_gravity=
"center"
>
<TextView
android:layout_marginTop=
"10dp"
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"试看已结束"
android:layout_gravity=
"center"
android:textColor=
"@color/color_815136"
android:textSize=
"2
0
sp"
android:textSize=
"2
2
sp"
android:textStyle=
"bold"
/>
</FrameLayout>
<Button
android:id=
"@+id/vip"
android:layout_width=
"240dp"
android:layout_height=
"56dp"
android:layout_width=
"280dp"
android:layout_height=
"46dp"
android:layout_marginTop=
"20dp"
android:visibility=
"gone"
android:layout_marginBottom=
"10dp"
android:background=
"@mipmap/bg_detail_bottom"
android:textColor=
"@color/white"
android:visibility=
"gone"
/>
/>
<Button
android:id=
"@+id/unlock"
android:layout_width=
"2
3
0dp"
android:layout_height=
"4
0
dp"
android:layout_width=
"2
8
0dp"
android:layout_height=
"4
6
dp"
android:layout_marginBottom=
"10dp"
android:background=
"@mipmap/bg_detail_top"
android:paddingStart=
"30dp"
...
...
video/app/src/main/res/mipmap-xhdpi/bg_detail_bottom.png
View replaced file @
66c6cada
View file @
accced25
30.2 KB
|
W:
|
H:
35.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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