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
44a41227
Commit
44a41227
authored
Jul 14, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
70b918eb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
49 additions
and
29 deletions
+49
-29
compiler.xml
video/.idea/compiler.xml
+1
-1
SplashActivity.kt
...java/com/mints/wisdomclean/ui/activitys/SplashActivity.kt
+8
-8
RecommendFragment.kt
...va/com/mints/wisdomclean/ui/fragment/RecommendFragment.kt
+3
-2
VideoEpisodeDialog.kt
...va/com/mints/wisdomclean/ui/widgets/VideoEpisodeDialog.kt
+5
-2
RecommendVideoAdapter.kt
...java/com/mints/wisdomclean/video/RecommendVideoAdapter.kt
+5
-2
VideoAdapter.kt
...src/main/java/com/mints/wisdomclean/video/VideoAdapter.kt
+4
-1
drama_activity_api_detail.xml
video/app/src/main/res/layout/drama_activity_api_detail.xml
+4
-1
fragment_main_my.xml
video/app/src/main/res/layout/fragment_main_my.xml
+12
-10
item_video.xml
video/app/src/main/res/layout/item_video.xml
+4
-1
item_video_recommend.xml
video/app/src/main/res/layout/item_video_recommend.xml
+3
-1
No files found.
video/.idea/compiler.xml
View file @
44a41227
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"1
5
"
/>
<bytecodeTargetLevel
target=
"1
1
"
/>
</component>
</project>
\ No newline at end of file
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SplashActivity.kt
View file @
44a41227
...
...
@@ -144,15 +144,15 @@ class SplashActivity : BaseActivity() {
private
fun
goToMainActivity
()
{
// val vipEnter = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VIP_BTN, false)
// if ((UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) || !vipEnter) {
//
if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
//
//
AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
//
// 匹配用户 且 不是vip
//
val bundle = Bundle()
//
bundle.putBoolean(VipActivity.IS_GUIDE, true)
//
readyGoThenKill(VipActivity::class.java, bundle)
//
} else {
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
//
}
}
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/RecommendFragment.kt
View file @
44a41227
...
...
@@ -91,6 +91,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
tab_recommend
.
getTabAt
(
1
)
?.
select
()
vp2_recommend
.
setCurrentItem
(
1
,
false
)
vp2_recommend
.
offscreenPageLimit
=
1
vp2_recommend
.
isUserInputEnabled
=
false
}
private
fun
getTabView
(
position
:
Int
):
View
{
...
...
@@ -167,14 +168,14 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
fun
handleEditStyle
(
isEdit
:
Boolean
)
{
if
(
isEdit
)
{
// 禁止滑动
vp2_recommend
.
isUserInputEnabled
=
false
//
vp2_recommend.isUserInputEnabled = false
iv_edit
.
visibility
=
View
.
GONE
iv_edit_close
.
visibility
=
View
.
VISIBLE
tab_recommend
.
visibility
=
View
.
GONE
tv_edit_text
.
visibility
=
View
.
VISIBLE
}
else
{
// 允许滑动
vp2_recommend
.
isUserInputEnabled
=
true
//
vp2_recommend.isUserInputEnabled = true
iv_edit
.
visibility
=
View
.
VISIBLE
iv_edit_close
.
visibility
=
View
.
GONE
tab_recommend
.
visibility
=
View
.
VISIBLE
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/widgets/VideoEpisodeDialog.kt
View file @
44a41227
...
...
@@ -140,8 +140,11 @@ class VideoEpisodeDialog(
for
(
mDatum
in
mData
)
{
mDatum
.
playing
=
false
}
mData
[
position
].
playing
=
true
adapter
?.
notifyDataSetChanged
()
if
(
mData
.
size
>
position
)
{
mData
[
position
].
playing
=
true
adapter
?.
notifyDataSetChanged
()
}
}
private
var
mOnEpisodeClickListener
:
VideoEpisodeAdapter
.
OnEpisodeClickListener
?
=
null
...
...
video/app/src/main/java/com/mints/wisdomclean/video/RecommendVideoAdapter.kt
View file @
44a41227
...
...
@@ -3,6 +3,7 @@ package com.mints.wisdomclean.video
import
android.app.Activity
import
android.util.Log
import
android.view.View
import
android.widget.ImageView
import
cn.jzvd.Jzvd
import
cn.jzvd.JzvdStd
import
com.airbnb.lottie.LottieAnimationView
...
...
@@ -36,8 +37,10 @@ class RecommendVideoAdapter(var activity: Activity) :
//标题
holder
.
setText
(
R
.
id
.
usertitle_tv
,
"第"
+
item
.
recommendIndex
+
"集"
)
//缩略图
Glide
.
with
(
activity
).
load
(
item
.
coverImage
)
.
into
(
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
)
val
posterImageView
=
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
posterImageView
.
scaleType
=
ImageView
.
ScaleType
.
FIT_XY
Glide
.
with
(
context
).
load
(
item
.
coverImage
)
.
into
(
posterImageView
)
if
(
item
.
collect
==
0
)
{
// 未收藏
...
...
video/app/src/main/java/com/mints/wisdomclean/video/VideoAdapter.kt
View file @
44a41227
...
...
@@ -3,6 +3,7 @@ package com.mints.wisdomclean.video
import
android.util.Log
import
android.view.View
import
android.widget.Button
import
android.widget.ImageView
import
android.widget.LinearLayout
import
android.widget.TextView
import
cn.jzvd.Jzvd
...
...
@@ -65,8 +66,10 @@ class VideoAdapter(private var vedioBean: VedioBean) :
//收藏数量
holder
.
setText
(
R
.
id
.
zan_num_tv
,
""
+
vedioBean
.
hot
)
//缩略图
val
posterImageView
=
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
posterImageView
.
scaleType
=
ImageView
.
ScaleType
.
FIT_XY
Glide
.
with
(
context
).
load
(
vedioBean
.
coverImage
)
.
into
(
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
)
.
into
(
posterImageView
)
holder
.
getView
<
LinearLayout
>(
R
.
id
.
ll_collect
).
setOnClickListener
{
mOnCustomChildClickListener
?.
onCustomChildClick
(
it
,
holder
.
adapterPosition
)
...
...
video/app/src/main/res/layout/drama_activity_api_detail.xml
View file @
44a41227
...
...
@@ -37,6 +37,7 @@
android:ellipsize=
"end"
android:gravity=
"center"
android:maxEms=
"9"
android:textStyle=
"bold"
android:maxLines=
"1"
android:text=
"-"
android:textColor=
"#fff"
...
...
@@ -63,7 +64,8 @@
android:layout_marginEnd=
"15dp"
android:gravity=
"center"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"@id/ll"
android:layout_marginBottom=
"110dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
>
<com.airbnb.lottie.LottieAnimationView
...
...
@@ -78,6 +80,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_marginTop=
"6dp"
android:text=
"-"
android:textColor=
"#fff"
android:textSize=
"14sp"
/>
...
...
video/app/src/main/res/layout/fragment_main_my.xml
View file @
44a41227
...
...
@@ -33,8 +33,8 @@
android:layout_marginStart=
"10dp"
android:text=
"登录/注册"
android:textColor=
"#000000"
android:textS
tyle=
"bold
"
android:textS
ize=
"20sp
"
/>
android:textS
ize=
"20sp
"
android:textS
tyle=
"bold
"
/>
<ImageView
android:id=
"@+id/iv_my_bind"
...
...
@@ -197,8 +197,9 @@
android:layout_height=
"1dp"
android:background=
"@color/my_color_gray"
/>
<LinearLayout
android:id=
"@+id/ll_
contactus
"
android:id=
"@+id/ll_
my_setting
"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:gravity=
"center_vertical"
...
...
@@ -207,12 +208,12 @@
android:paddingEnd=
"15dp"
>
<TextView
android:id=
"@+id/tv_contact"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"如有问题,请直接联系在线客服\n"
android:textColor=
"@color/black"
/>
android:text=
"功能设置"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
<ImageView
android:layout_width=
"30dp"
...
...
@@ -229,7 +230,7 @@
android:background=
"@color/my_color_gray"
/>
<LinearLayout
android:id=
"@+id/ll_
my_setting
"
android:id=
"@+id/ll_
contactus
"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:gravity=
"center_vertical"
...
...
@@ -238,12 +239,12 @@
android:paddingEnd=
"15dp"
>
<TextView
android:id=
"@+id/tv_contact"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"设置"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
android:text=
"如有问题,请直接联系在线客服\n"
android:textColor=
"@color/black"
/>
<ImageView
android:layout_width=
"30dp"
...
...
@@ -253,6 +254,7 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
...
video/app/src/main/res/layout/item_video.xml
View file @
44a41227
...
...
@@ -33,6 +33,7 @@
android:gravity=
"center"
android:maxEms=
"9"
android:maxLines=
"1"
android:textStyle=
"bold"
android:text=
"-"
android:textColor=
"#fff"
android:textSize=
"16sp"
/>
...
...
@@ -62,7 +63,8 @@
android:layout_marginEnd=
"15dp"
android:gravity=
"center"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"@id/ll"
android:layout_marginBottom=
"40dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
>
<com.airbnb.lottie.LottieAnimationView
...
...
@@ -77,6 +79,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_marginTop=
"6dp"
android:text=
"-"
android:textColor=
"#fff"
android:textSize=
"14sp"
/>
...
...
video/app/src/main/res/layout/item_video_recommend.xml
View file @
44a41227
...
...
@@ -32,6 +32,7 @@
android:gravity=
"center"
android:maxEms=
"9"
android:maxLines=
"1"
android:textStyle=
"bold"
android:text=
"飞翔的企鹅"
android:textColor=
"#fff"
android:textSize=
"16sp"
/>
...
...
@@ -99,7 +100,8 @@
android:layout_marginEnd=
"15dp"
android:gravity=
"center"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"@id/ll"
app:layout_constraintBottom_toBottomOf=
"parent"
android:layout_marginBottom=
"90dp"
app:layout_constraintRight_toRightOf=
"parent"
>
<com.airbnb.lottie.LottieAnimationView
...
...
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