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
fc914911
Commit
fc914911
authored
Jul 19, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化首页图片样式
parent
d7b47a52
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
NewHotStyleAdapter.kt
...java/com/xinfu/helivideo/ui/adapter/NewHotStyleAdapter.kt
+1
-1
TopAdapter.kt
...rc/main/java/com/xinfu/helivideo/ui/adapter/TopAdapter.kt
+1
-1
MainFragment.kt
...main/java/com/xinfu/helivideo/ui/fragment/MainFragment.kt
+2
-1
GlideUtils.kt
...o/app/src/main/java/com/xinfu/library/utils/GlideUtils.kt
+14
-0
No files found.
video/app/src/main/java/com/xinfu/helivideo/ui/adapter/NewHotStyleAdapter.kt
View file @
fc914911
...
...
@@ -21,7 +21,7 @@ class NewHotStyleAdapter : BaseQuickAdapter<VedioBean, BaseViewHolder>(R.layout.
R
.
id
.
tvVedioItemText
,
"${it.vedioDesc}"
)
GlideUtils
.
loadImageViewGifFor
FitCenter
(
GlideUtils
.
loadImageViewGifFor
CenterCrop
(
context
,
it
.
coverImage
,
holder
.
getView
(
R
.
id
.
ivVedioItem
)
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/adapter/TopAdapter.kt
View file @
fc914911
...
...
@@ -49,7 +49,7 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
holder
.
tvTopItemText
.
text
=
"${sb}"
}
GlideUtils
.
loadImageViewGifFor
FitCenter
(
GlideUtils
.
loadImageViewGifFor
CenterCrop
(
context
,
topBean
.
coverImage
,
holder
.
ivTopItem
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/fragment/MainFragment.kt
View file @
fc914911
...
...
@@ -205,9 +205,10 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
fun
setWatchingStatus
()
{
if
(
LocalVedioManager
.
isCacheVedio
())
{
ll_main_watching_root
.
visibility
=
View
.
VISIBLE
ll_main_watching_root
.
setOnClickListener
{
}
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
GlideUtils
.
loadImageViewGifFor
FitCenter
(
GlideUtils
.
loadImageViewGifFor
CenterCrop
(
requireContext
(),
cacheVedio
.
coverImage
,
iv_main_watching_pic
...
...
video/app/src/main/java/com/xinfu/library/utils/GlideUtils.kt
View file @
fc914911
...
...
@@ -9,6 +9,7 @@ import com.bumptech.glide.Glide
import
com.bumptech.glide.Priority
import
com.bumptech.glide.load.engine.DiskCacheStrategy
import
com.bumptech.glide.load.resource.bitmap.CenterCrop
import
com.bumptech.glide.load.resource.bitmap.CenterInside
import
com.bumptech.glide.load.resource.bitmap.FitCenter
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
import
com.bumptech.glide.load.resource.gif.GifDrawable
...
...
@@ -105,6 +106,19 @@ object GlideUtils {
.
into
(
imageView
)
}
fun
loadImageViewGifForCenterInside
(
mContext
:
Context
,
drawable
:
String
,
imageView
:
ImageView
)
{
val
options
=
RequestOptions
()
.
transform
(
CenterInside
(),
RoundedCorners
(
BubbleUtils
.
dp2px
(
5
))
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
DATA
)
Glide
.
with
(
mContext
)
.
load
(
drawable
)
.
apply
(
options
)
.
into
(
imageView
)
}
//设置加载中图片
fun
loadImageViewLoding
(
mContext
:
Context
?,
...
...
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