Removed imageview from channellist

This commit is contained in:
daniel oeh 2012-08-04 11:35:05 +02:00
parent ef7a20f056
commit b712ffee8f
4 changed files with 20 additions and 45 deletions

View File

@ -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" >
android:layout_height="match_parent" >
<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" />
<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
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>
</LinearLayout>

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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,