Enabled auto-scaling of bitmaps
This commit is contained in:
parent
0b62b06cdf
commit
8bde0e0fe2
|
@ -19,7 +19,7 @@
|
|||
android:largeScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:smallScreens="false"
|
||||
android:xlargeScreens="true" />
|
||||
android:xlargeScreens="true" android:anyDensity="true"/>
|
||||
|
||||
<application
|
||||
android:name="de.danoeh.antennapod.PodcastApp"
|
||||
|
|
|
@ -120,7 +120,7 @@ public class FeedImageLoader {
|
|||
}
|
||||
|
||||
public void loadThumbnailBitmap(FeedImage image, ImageView target) {
|
||||
if (image.getFile_url() != null) {
|
||||
if (image != null && image.getFile_url() != null) {
|
||||
Bitmap bitmap = getBitmapFromThumbnailCache(image.getFile_url());
|
||||
if (bitmap != null) {
|
||||
target.setImageBitmap(bitmap);
|
||||
|
|
|
@ -41,6 +41,7 @@ public class BitmapDecoder {
|
|||
options.inJustDecodeBounds = false;
|
||||
options.inSampleSize = sampleSize;
|
||||
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
|
||||
options.inScaled = false;
|
||||
|
||||
Bitmap decodedBitmap = BitmapFactory.decodeFile(fileUrl, options);
|
||||
if (decodedBitmap == null) {
|
||||
|
@ -50,10 +51,11 @@ public class BitmapDecoder {
|
|||
decodedBitmap = BitmapFactory.decodeFile(fileUrl);
|
||||
}
|
||||
if (decodedBitmap != null) {
|
||||
|
||||
return decodedBitmap;
|
||||
/*
|
||||
return Bitmap.createScaledBitmap(decodedBitmap,
|
||||
preferredLength, preferredLength, false);
|
||||
|
||||
*/
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue