Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
ImageVideoBanner
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
ImageVideoBanner
Commits
907a99ee
Commit
907a99ee
authored
Feb 24, 2021
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步主分支改动到androidx分支
parent
90f4d8a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
ImageVideoFragment.java
.../java/com/widget/imagebanner/view/ImageVideoFragment.java
+9
-6
No files found.
banner/src/main/java/com/widget/imagebanner/view/ImageVideoFragment.java
View file @
907a99ee
...
...
@@ -359,12 +359,15 @@ public class ImageVideoFragment extends Fragment {
@Override
public
void
onDestroyView
()
{
Drawable
drawable
=
ivWaitLoading
.
getDrawable
();
ivWaitLoading
.
setImageDrawable
(
null
);
if
(
drawable
instanceof
BitmapDrawable
)
{
Bitmap
bm
=
((
BitmapDrawable
)
drawable
).
getBitmap
();
if
(!
bm
.
isRecycled
())
{
bm
.
recycle
();
//2021/2/24 记录:这里要判断LoadingImage的存在,否则会回收本地Resource,造成加载错误.本地id标识的图片也会处理为BitmapDrawable
if
(
bannerBean
.
getLoadingImage
()
!=
null
&&
ivWaitLoading
!=
null
)
{
Drawable
drawable
=
ivWaitLoading
.
getDrawable
();
ivWaitLoading
.
setImageDrawable
(
null
);
if
(
drawable
instanceof
BitmapDrawable
)
{
Bitmap
bm
=
((
BitmapDrawable
)
drawable
).
getBitmap
();
if
(!
bm
.
isRecycled
())
{
bm
.
recycle
();
}
}
}
super
.
onDestroyView
();
...
...
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