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
3530b849
Commit
3530b849
authored
Jul 18, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
ace01246
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
27 deletions
+20
-27
MainFragment.kt
...main/java/com/xinfu/helivideo/ui/fragment/MainFragment.kt
+4
-12
RecommendFragment.kt
...java/com/xinfu/helivideo/ui/fragment/RecommendFragment.kt
+4
-3
JzvdStdTikTok.kt
.../src/main/java/com/xinfu/helivideo/video/JzvdStdTikTok.kt
+1
-1
RecommendVideoAdapter.kt
...n/java/com/xinfu/helivideo/video/RecommendVideoAdapter.kt
+2
-2
VideoAdapter.kt
...p/src/main/java/com/xinfu/helivideo/video/VideoAdapter.kt
+2
-2
gradle.properties
video/gradle.properties
+5
-5
ShareSDK.xml
video/tmpmob/ShareSDK/assets/ShareSDK.xml
+2
-2
No files found.
video/app/src/main/java/com/xinfu/helivideo/ui/fragment/MainFragment.kt
View file @
3530b849
...
@@ -3,15 +3,13 @@ package com.xinfu.helivideo.ui.fragment
...
@@ -3,15 +3,13 @@ package com.xinfu.helivideo.ui.fragment
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.widget.ImageView
import
android.widget.TextView
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.bumptech.glide.Glide
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
com.google.android.material.tabs.TabLayoutMediator
import
com.
xinfu.library.utils.GlideUtils
import
com.
scwang.smartrefresh.layout.api.RefreshLayout
import
com.
xinfu.library.utils.nodoubleclick.AntiShake
import
com.
scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.xinfu.helivideo.R
import
com.xinfu.helivideo.R
import
com.xinfu.helivideo.common.AppConfig
import
com.xinfu.helivideo.common.AppConfig
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.common.Constant
...
@@ -24,15 +22,9 @@ import com.xinfu.helivideo.mvp.views.HomeView
...
@@ -24,15 +22,9 @@ import com.xinfu.helivideo.mvp.views.HomeView
import
com.xinfu.helivideo.ui.adapter.HomeVideoPageAdapter
import
com.xinfu.helivideo.ui.adapter.HomeVideoPageAdapter
import
com.xinfu.helivideo.ui.adapter.ImageTitleAdapter
import
com.xinfu.helivideo.ui.adapter.ImageTitleAdapter
import
com.xinfu.helivideo.ui.adapter.TopAdapter
import
com.xinfu.helivideo.ui.adapter.TopAdapter
import
com.xinfu.helivideo.ui.fragment.base.BaseFragment
import
com.xinfu.helivideo.ui.fragment.base.LazyLoadBaseFragment
import
com.xinfu.helivideo.ui.fragment.base.LazyLoadBaseFragment
import
com.xinfu.helivideo.video.VideoActivity
import
com.xinfu.library.utils.GlideUtils
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.xinfu.library.utils.nodoubleclick.AntiShake
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.youth.banner.Banner
import
com.youth.banner.adapter.BannerImageAdapter
import
com.youth.banner.holder.BannerImageHolder
import
com.youth.banner.indicator.CircleIndicator
import
kotlinx.android.synthetic.main.fragment_main.*
import
kotlinx.android.synthetic.main.fragment_main.*
import
java.util.*
import
java.util.*
import
kotlin.concurrent.schedule
import
kotlin.concurrent.schedule
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/fragment/RecommendFragment.kt
View file @
3530b849
...
@@ -92,6 +92,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
...
@@ -92,6 +92,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
vp2_recommend
.
setCurrentItem
(
1
,
false
)
vp2_recommend
.
setCurrentItem
(
1
,
false
)
vp2_recommend
.
offscreenPageLimit
=
1
vp2_recommend
.
offscreenPageLimit
=
1
vp2_recommend
.
isUserInputEnabled
=
false
vp2_recommend
.
isUserInputEnabled
=
false
}
}
private
fun
getTabView
(
position
:
Int
):
View
{
private
fun
getTabView
(
position
:
Int
):
View
{
...
@@ -167,15 +168,12 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
...
@@ -167,15 +168,12 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
fun
handleEditStyle
(
isEdit
:
Boolean
)
{
fun
handleEditStyle
(
isEdit
:
Boolean
)
{
if
(
isEdit
)
{
if
(
isEdit
)
{
// 禁止滑动
// vp2_recommend.isUserInputEnabled = false
iv_edit
.
visibility
=
View
.
GONE
iv_edit
.
visibility
=
View
.
GONE
iv_edit_close
.
visibility
=
View
.
VISIBLE
iv_edit_close
.
visibility
=
View
.
VISIBLE
tab_recommend
.
visibility
=
View
.
GONE
tab_recommend
.
visibility
=
View
.
GONE
tv_edit_text
.
visibility
=
View
.
VISIBLE
tv_edit_text
.
visibility
=
View
.
VISIBLE
}
else
{
}
else
{
// 允许滑动
// 允许滑动
// vp2_recommend.isUserInputEnabled = true
iv_edit
.
visibility
=
View
.
VISIBLE
iv_edit
.
visibility
=
View
.
VISIBLE
iv_edit_close
.
visibility
=
View
.
GONE
iv_edit_close
.
visibility
=
View
.
GONE
tab_recommend
.
visibility
=
View
.
VISIBLE
tab_recommend
.
visibility
=
View
.
VISIBLE
...
@@ -228,4 +226,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
...
@@ -228,4 +226,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
}
}
}
}
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/video/JzvdStdTikTok.kt
View file @
3530b849
...
@@ -38,7 +38,7 @@ class JzvdStdTikTok : JzvdStd {
...
@@ -38,7 +38,7 @@ class JzvdStdTikTok : JzvdStd {
topContainer
.
visibility
=
View
.
GONE
topContainer
.
visibility
=
View
.
GONE
loadingProgressBar
.
visibility
=
View
.
GONE
//加载loaing
loadingProgressBar
.
visibility
=
View
.
GONE
//加载loaing
progressBar
.
visibility
=
View
.
VISIBLE
//控制的
progressBar
.
visibility
=
View
.
VISIBLE
//控制的
posterImageView
.
scaleType
=
ImageView
.
ScaleType
.
FIT_
CENTER
posterImageView
.
scaleType
=
ImageView
.
ScaleType
.
CENTER
bottomProgressBar
.
visibility
=
View
.
GONE
//最底部的进度
bottomProgressBar
.
visibility
=
View
.
GONE
//最底部的进度
...
...
video/app/src/main/java/com/xinfu/helivideo/video/RecommendVideoAdapter.kt
View file @
3530b849
...
@@ -38,7 +38,7 @@ class RecommendVideoAdapter(var activity: Activity) :
...
@@ -38,7 +38,7 @@ class RecommendVideoAdapter(var activity: Activity) :
holder
.
setText
(
R
.
id
.
usertitle_tv
,
"第"
+
item
.
recommendIndex
+
"集"
)
holder
.
setText
(
R
.
id
.
usertitle_tv
,
"第"
+
item
.
recommendIndex
+
"集"
)
//缩略图
//缩略图
val
posterImageView
=
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
val
posterImageView
=
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
posterImageView
.
scaleType
=
ImageView
.
ScaleType
.
FIT_XY
//
posterImageView.scaleType= ImageView.ScaleType.FIT_XY
Glide
.
with
(
context
).
load
(
item
.
coverImage
)
Glide
.
with
(
context
).
load
(
item
.
coverImage
)
.
into
(
posterImageView
)
.
into
(
posterImageView
)
...
@@ -91,7 +91,7 @@ class RecommendVideoAdapter(var activity: Activity) :
...
@@ -91,7 +91,7 @@ class RecommendVideoAdapter(var activity: Activity) :
jzvdStdTikTok
.
setUp
(
path
,
""
,
JzvdStd
.
SCREEN_NORMAL
)
jzvdStdTikTok
.
setUp
(
path
,
""
,
JzvdStd
.
SCREEN_NORMAL
)
// 设置全屏拉伸
// 设置全屏拉伸
Jzvd
.
setVideoImageDisplayType
(
Jzvd
.
VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT
)
//
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT)
jzvdStdTikTok
.
setOnVideoCompletion
(
onVideoCompletion
)
jzvdStdTikTok
.
setOnVideoCompletion
(
onVideoCompletion
)
}
}
...
...
video/app/src/main/java/com/xinfu/helivideo/video/VideoAdapter.kt
View file @
3530b849
...
@@ -67,7 +67,7 @@ class VideoAdapter(private var vedioBean: VedioBean) :
...
@@ -67,7 +67,7 @@ class VideoAdapter(private var vedioBean: VedioBean) :
holder
.
setText
(
R
.
id
.
zan_num_tv
,
""
+
vedioBean
.
hot
)
holder
.
setText
(
R
.
id
.
zan_num_tv
,
""
+
vedioBean
.
hot
)
//缩略图
//缩略图
val
posterImageView
=
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
val
posterImageView
=
holder
.
getView
<
JzvdStdTikTok
>(
R
.
id
.
jz_video
).
posterImageView
posterImageView
.
scaleType
=
ImageView
.
ScaleType
.
FIT_XY
//
posterImageView.scaleType=ImageView.ScaleType.FIT_XY
Glide
.
with
(
context
).
load
(
vedioBean
.
coverImage
)
Glide
.
with
(
context
).
load
(
vedioBean
.
coverImage
)
.
into
(
posterImageView
)
.
into
(
posterImageView
)
...
@@ -119,7 +119,7 @@ class VideoAdapter(private var vedioBean: VedioBean) :
...
@@ -119,7 +119,7 @@ class VideoAdapter(private var vedioBean: VedioBean) :
jzvdStdTikTok
.
setUp
(
path
,
""
,
JzvdStd
.
SCREEN_NORMAL
)
jzvdStdTikTok
.
setUp
(
path
,
""
,
JzvdStd
.
SCREEN_NORMAL
)
// 设置全屏拉伸
// 设置全屏拉伸
Jzvd
.
setVideoImageDisplayType
(
Jzvd
.
VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT
)
//
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT)
jzvdStdTikTok
.
setOnVideoCompletion
(
onVideoCompletion
)
jzvdStdTikTok
.
setOnVideoCompletion
(
onVideoCompletion
)
}
}
...
...
video/gradle.properties
View file @
3530b849
...
@@ -31,13 +31,13 @@ RELEASE_STORE_PASSWORD=mintshelivideo
...
@@ -31,13 +31,13 @@ RELEASE_STORE_PASSWORD=mintshelivideo
RELEASE_STORE_FILE
=
mints_helivideo.jks
RELEASE_STORE_FILE
=
mints_helivideo.jks
#ShareSDK
#ShareSDK
RELEASE_SHARESDK_KEY
=
38
1ca97ef616d
RELEASE_SHARESDK_KEY
=
38
45c0fde1969
RELEASE_SHARESDK_SECRET
=
de4c99c606d4e1895673e3682666c0a8
RELEASE_SHARESDK_SECRET
=
8e1f2a0e4b0ec6ec8404edfabe0cdf61
#weixin
#weixin
WEIXIN_APP_PAY_ID
=
"wx
6830d86ba20be254
"
WEIXIN_APP_PAY_ID
=
"wx
f1d2f4fe2f3e7e4e
"
WEIXIN_APP_ID =wx
6830d86ba20be254
WEIXIN_APP_ID =wx
f1d2f4fe2f3e7e4e
WEIXIN_APP_SECRET
=
91f91c0721bd989cf8b9c9b8dc8a5e9c
WEIXIN_APP_SECRET
=
73b068bd35f147ba29b648c157ea28a8
#umeng
#umeng
RELEASE_UMENG_KEY
=
64a67d4fa1a164591b44f0e8
RELEASE_UMENG_KEY
=
64a67d4fa1a164591b44f0e8
...
...
video/tmpmob/ShareSDK/assets/ShareSDK.xml
View file @
3530b849
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
<Tumblr
Enable=
"false"
/>
<Tumblr
Enable=
"false"
/>
<Email
Enable=
"false"
/>
<Email
Enable=
"false"
/>
<ShortMessage
Enable=
"false"
/>
<ShortMessage
Enable=
"false"
/>
<Wechat
AppId=
"wx
6830d86ba20be254"
AppSecret=
"91f91c0721bd989cf8b9c9b8dc8a5e9c
"
userName=
"gh_afb25ac019c9"
path=
"pages/index/index.html?id=1"
WithShareTicket=
"true"
MiniprogramType=
"0"
/>
<Wechat
AppId=
"wx
f1d2f4fe2f3e7e4e"
AppSecret=
"73b068bd35f147ba29b648c157ea28a8
"
userName=
"gh_afb25ac019c9"
path=
"pages/index/index.html?id=1"
WithShareTicket=
"true"
MiniprogramType=
"0"
/>
<WechatMoments
AppId=
"wx
6830d86ba20be254"
AppSecret=
"91f91c0721bd989cf8b9c9b8dc8a5e9c
"
/>
<WechatMoments
AppId=
"wx
f1d2f4fe2f3e7e4e"
AppSecret=
"73b068bd35f147ba29b648c157ea28a8
"
/>
<QQ
Enable=
"false"
/>
<QQ
Enable=
"false"
/>
<Instapaper
Enable=
"false"
/>
<Instapaper
Enable=
"false"
/>
<Pocket
Enable=
"false"
/>
<Pocket
Enable=
"false"
/>
...
...
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