uil: bitmap may be null
This commit is contained in:
parent
a57fcc63d9
commit
fc459363bd
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="366"
|
android:versionCode="367"
|
||||||
android:versionName="1.139" >
|
android:versionName="1.140" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="15"
|
android:minSdkVersion="15"
|
||||||
|
@ -797,6 +797,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
imgSrc = "http:" + imgSrc;
|
imgSrc = "http:" + imgSrc;
|
||||||
|
|
||||||
if (!imgSrc.equals(holder.textImage.getTag())) {
|
if (!imgSrc.equals(holder.textImage.getTag())) {
|
||||||
|
|
||||||
|
holder.textImage.setTag("LOADING:" + imgSrc);
|
||||||
ImageAware imageAware = new ImageViewAware(holder.textImage, false);
|
ImageAware imageAware = new ImageViewAware(holder.textImage, false);
|
||||||
|
|
||||||
DisplayImageOptions options = new DisplayImageOptions.Builder()
|
DisplayImageOptions options = new DisplayImageOptions.Builder()
|
||||||
@ -822,12 +824,14 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingComplete(String s, View view, Bitmap bitmap) {
|
public void onLoadingComplete(String imageUri, View view, Bitmap bitmap) {
|
||||||
if (bitmap.getWidth() < THUMB_IMG_MIN_SIZE || bitmap.getHeight() < THUMB_IMG_MIN_SIZE) {
|
if (("LOADING:" + imageUri).equals(view.getTag()) && bitmap != null) {
|
||||||
holder.textImage.setImageDrawable(textDrawable);
|
holder.textImage.setTag(finalImgSrc);
|
||||||
}
|
|
||||||
|
|
||||||
holder.textImage.setTag(finalImgSrc);
|
if (bitmap.getWidth() < THUMB_IMG_MIN_SIZE || bitmap.getHeight() < THUMB_IMG_MIN_SIZE) {
|
||||||
|
holder.textImage.setImageDrawable(textDrawable);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1163,7 +1167,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingComplete(String imageUri, View view, Bitmap bitmap) {
|
public void onLoadingComplete(String imageUri, View view, Bitmap bitmap) {
|
||||||
if (("LOADING:" + imageUri).equals(view.getTag())) {
|
if (("LOADING:" + imageUri).equals(view.getTag()) && bitmap != null) {
|
||||||
|
|
||||||
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
||||||
holder.flavorImageView.setTag(posterUri);
|
holder.flavorImageView.setTag(posterUri);
|
||||||
@ -1272,7 +1276,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingComplete(String imageUri, View view, Bitmap bitmap) {
|
public void onLoadingComplete(String imageUri, View view, Bitmap bitmap) {
|
||||||
if (("LOADING:" + imageUri).equals(view.getTag())) {
|
if (("LOADING:" + imageUri).equals(view.getTag()) && bitmap != null) {
|
||||||
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
||||||
holder.flavorImageView.setTag(thumbUri);
|
holder.flavorImageView.setTag(thumbUri);
|
||||||
holder.flavorImageView.setVisibility(View.VISIBLE);
|
holder.flavorImageView.setVisibility(View.VISIBLE);
|
||||||
@ -1391,7 +1395,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
public void onLoadingComplete(String imageUri,
|
public void onLoadingComplete(String imageUri,
|
||||||
View view, Bitmap bitmap) {
|
View view, Bitmap bitmap) {
|
||||||
|
|
||||||
if (("LOADING:" + imageUri).equals(view.getTag())) {
|
if (("LOADING:" + imageUri).equals(view.getTag()) && bitmap != null) {
|
||||||
|
|
||||||
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
||||||
holder.flavorImageView.setTag(finalImgSrc);
|
holder.flavorImageView.setTag(finalImgSrc);
|
||||||
|
Loading…
Reference in New Issue
Block a user