summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-08-11 17:34:17 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-08-11 17:34:17 +0200
commit0044e0f91fcd60ee1ecef8aee175660161e867ad (patch)
tree535bdbbabd9a53a5f8a36aa005240cc320471e1b
parent522d61577b1c8eedf07d7690cee04e447cec51ed (diff)
downloadAntennaPod-0044e0f91fcd60ee1ecef8aee175660161e867ad.zip
Fixed imageview size
-rw-r--r--res/layout/cover_fragment.xml13
-rw-r--r--res/layout/feedlist_item_grid.xml4
-rw-r--r--src/de/danoeh/antennapod/adapter/FeedlistAdapter.java7
-rw-r--r--src/de/danoeh/antennapod/asynctask/BitmapDecodeWorkerTask.java3
-rw-r--r--src/de/danoeh/antennapod/asynctask/FeedImageLoader.java4
5 files changed, 19 insertions, 12 deletions
diff --git a/res/layout/cover_fragment.xml b/res/layout/cover_fragment.xml
index 8e4c15ae8..e449b44f4 100644
--- a/res/layout/cover_fragment.xml
+++ b/res/layout/cover_fragment.xml
@@ -23,12 +23,11 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/txtvTitle"
- android:layout_marginBottom="8dp"
android:gravity="center_horizontal" />
<LinearLayout
android:id="@+id/cover_layout"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
@@ -39,12 +38,16 @@
<ImageView
android:id="@+id/imgvCover"
- android:layout_margin="8dp"
- android:layout_width="wrap_content"
+ android:layout_marginLeft="55dp"
+ android:layout_marginRight="55dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
- android:scaleType="centerInside" />
+ android:adjustViewBounds="true"
+ android:scaleType="centerCrop" />
</LinearLayout>
diff --git a/res/layout/feedlist_item_grid.xml b/res/layout/feedlist_item_grid.xml
index 5e0b72e1a..53e9eeb10 100644
--- a/res/layout/feedlist_item_grid.xml
+++ b/res/layout/feedlist_item_grid.xml
@@ -5,8 +5,8 @@
<ImageView
android:id="@+id/imgvFeedimage"
- android:layout_width="160dip"
- android:layout_height="160dip"
+ android:layout_width="200dip"
+ android:layout_height="200dip"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_margin="8dp"
diff --git a/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java b/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java
index ba1ce2864..266dfe3a2 100644
--- a/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java
+++ b/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java
@@ -94,11 +94,12 @@ public class FeedlistAdapter extends ArrayAdapter<Feed> {
holder.newEpisodes.setVisibility(View.INVISIBLE);
}
holder.image.setTag(feed.getImage());
- if (PodcastApp.getInstance().isLargeScreen()) {
+ /*if (PodcastApp.getInstance().isLargeScreen()) {
imageLoader.loadCoverBitmap(feed.getImage(), holder.image);
- } else {
+
+ } else {*/
imageLoader.loadThumbnailBitmap(feed.getImage(), holder.image);
- }
+ //}
return convertView;
}
diff --git a/src/de/danoeh/antennapod/asynctask/BitmapDecodeWorkerTask.java b/src/de/danoeh/antennapod/asynctask/BitmapDecodeWorkerTask.java
index 5e99c52af..c18763d48 100644
--- a/src/de/danoeh/antennapod/asynctask/BitmapDecodeWorkerTask.java
+++ b/src/de/danoeh/antennapod/asynctask/BitmapDecodeWorkerTask.java
@@ -40,6 +40,9 @@ public abstract class BitmapDecodeWorkerTask extends Thread {
this.fileUrl = fileUrl;
this.baseLength = length;
this.PREFERRED_LENGTH = (int) (length * PodcastApp.getLogicalDensity() + 0.5f);
+ if (PodcastApp.getInstance().isLargeScreen()) {
+ this.PREFERRED_LENGTH *= 2.0;
+ }
}
/**
diff --git a/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java b/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java
index 76e44c443..4b6855a18 100644
--- a/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java
+++ b/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java
@@ -25,7 +25,7 @@ public class FeedImageLoader {
private static final String TAG = "FeedImageLoader";
private static FeedImageLoader singleton;
- public static final int LENGTH_BASE_COVER = 200;
+ public static final int LENGTH_BASE_COVER = 300;
public static final int LENGTH_BASE_THUMBNAIL = 100;
private static final String CACHE_DIR = "miroguide_thumbnails";
@@ -44,7 +44,7 @@ public class FeedImageLoader {
.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryClass();
// Use 1/8th of the available memory for this memory cache.
- final int coverCacheSize = 1024 * 1024 * memClass / 10;
+ final int coverCacheSize = 1024 * 1024 * memClass / 8;
final int thumbnailCacheSize = 1024 * 1024 * memClass / 6;
private LruCache<String, Bitmap> coverCache;