diff options
4 files changed, 22 insertions, 47 deletions
diff --git a/res/layout/miroguide_channellist_item.xml b/res/layout/miroguide_channellist_item.xml index 2122b4866..8e89cabf7 100644 --- a/res/layout/miroguide_channellist_item.xml +++ b/res/layout/miroguide_channellist_item.xml @@ -1,35 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="8dp" > - - <ImageView - android:id="@+id/imgvChannelimage" - android:layout_width="40dip" - android:layout_height="40dip" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_marginLeft="1dip" - android:layout_marginRight="4dip" - android:scaleType="fitXY" - android:adjustViewBounds="true" - android:src="@drawable/default_cover" /> - - <LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_centerVertical="true" - android:layout_toRightOf="@id/imgvChannelimage" - android:orientation="vertical" > - - <TextView - android:id="@+id/txtvTitle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:maxLines="2" - android:textStyle="bold" /> - </LinearLayout> - -</RelativeLayout>
\ No newline at end of file + android:layout_height="match_parent" > + + <TextView + android:id="@+id/txtvTitle" + android:layout_width="match_parent" + android:layout_height="32dp" + android:gravity="center_vertical" + android:maxLines="1" + android:layout_margin="8dp" + android:textStyle="bold" /> + +</LinearLayout>
\ No newline at end of file diff --git a/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java b/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java index 4c097c00c..3275ea9d1 100644 --- a/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java +++ b/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java @@ -33,9 +33,6 @@ public class MiroGuideChannelListAdapter extends ArrayAdapter<MiroChannel> { convertView = inflater.inflate(R.layout.miroguide_channellist_item, null); holder.title = (TextView) convertView.findViewById(R.id.txtvTitle); - holder.cover = (ImageView) convertView - .findViewById(R.id.imgvChannelimage); - convertView.setTag(holder); } else { @@ -43,13 +40,10 @@ public class MiroGuideChannelListAdapter extends ArrayAdapter<MiroChannel> { } holder.title.setText(channel.getName()); - holder.cover.setTag(channel); - FeedImageLoader.getInstance().loadMiroGuideThumbnail(channel, holder.cover); return convertView; } static class Holder { - ImageView cover; TextView title; } diff --git a/src/de/danoeh/antennapod/fragment/MiroGuideChannellistFragment.java b/src/de/danoeh/antennapod/fragment/MiroGuideChannellistFragment.java index a2a48f2e2..76ecb1aa1 100644 --- a/src/de/danoeh/antennapod/fragment/MiroGuideChannellistFragment.java +++ b/src/de/danoeh/antennapod/fragment/MiroGuideChannellistFragment.java @@ -27,9 +27,9 @@ import de.danoeh.antennapod.miroguide.model.MiroChannel; /** * Displays a list of MiroChannel objects that were results of a certain - * MiroGuideService query. If the user reaches the bottom of the list, more entries - * will be loaded until all entries have been loaded or the maximum number of - * channels has been reached. + * MiroGuideService query. If the user reaches the bottom of the list, more + * entries will be loaded until all entries have been loaded or the maximum + * number of channels has been reached. * */ public class MiroGuideChannellistFragment extends SherlockListFragment { private static final String TAG = "MiroGuideChannellistFragment"; @@ -105,7 +105,8 @@ public class MiroGuideChannellistFragment extends SherlockListFragment { LayoutInflater inflater = (LayoutInflater) getActivity() .getSystemService(Context.LAYOUT_INFLATER_SERVICE); footer = inflater.inflate(R.layout.loading_footer, null); - listAdapter = new MiroGuideChannelListAdapter(getActivity(), 0, channels); + listAdapter = new MiroGuideChannelListAdapter(getActivity(), 0, + channels); } @Override @@ -123,14 +124,14 @@ public class MiroGuideChannellistFragment extends SherlockListFragment { if (channelLoader != null) { channelLoader.cancel(true); } - FeedImageLoader.getInstance().clearExecutorQueue(); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - getListView().addFooterView(footer); // footer has to be added before the adapter has been set + getListView().addFooterView(footer); // footer has to be added before + // the adapter has been set getListView().setAdapter(listAdapter); getListView().removeFooterView(footer); @@ -230,7 +231,7 @@ public class MiroGuideChannellistFragment extends SherlockListFragment { exception = e; e.printStackTrace(); } finally { - //service.close(); + // service.close(); } return null; } diff --git a/src/de/danoeh/antennapod/util/BitmapDecoder.java b/src/de/danoeh/antennapod/util/BitmapDecoder.java index d9975a0bb..65664ddd9 100644 --- a/src/de/danoeh/antennapod/util/BitmapDecoder.java +++ b/src/de/danoeh/antennapod/util/BitmapDecoder.java @@ -41,7 +41,7 @@ public class BitmapDecoder { options.inJustDecodeBounds = false; options.inSampleSize = sampleSize; options.inPreferredConfig = Bitmap.Config.ARGB_8888; - + Bitmap decodedBitmap = BitmapFactory.decodeFile(fileUrl, options); if (decodedBitmap == null) { Log.i(TAG, |