Feedlistitem now shows whether it is refreshing or not

This commit is contained in:
daniel oeh 2012-07-11 12:52:55 +02:00
parent e7f7838a9c
commit fae73dfe2f
2 changed files with 10 additions and 5 deletions

View File

@ -97,5 +97,6 @@
<string name="share_link_label">Share link...</string>
<string name="share_source_label">Share source link...</string>
<string name="clear_queue_label">Clear queue</string>
<string name="refreshing_label">Refreshing...</string>
</resources>

View File

@ -62,7 +62,7 @@ public class FeedlistAdapter extends ArrayAdapter<Feed> {
convertView.setTag(holder);
} else {
holder = (Holder) convertView.getTag();
}
if (position == selectedItemIndex) {
@ -73,10 +73,14 @@ public class FeedlistAdapter extends ArrayAdapter<Feed> {
}
holder.title.setText(feed.getTitle());
holder.lastUpdate.setText("Last Update: "
+ DateUtils.formatSameDayTime(feed.getLastUpdate().getTime(),
System.currentTimeMillis(), DateFormat.SHORT,
DateFormat.SHORT));
if (DownloadRequester.getInstance().isDownloadingFile(feed)) {
holder.lastUpdate.setText(R.string.refreshing_label);
} else {
holder.lastUpdate.setText("Last Update: "
+ DateUtils.formatSameDayTime(feed.getLastUpdate()
.getTime(), System.currentTimeMillis(),
DateFormat.SHORT, DateFormat.SHORT));
}
holder.numberOfEpisodes.setText(feed.getItems().size() + " Episodes");
int newItems = feed.getNumOfNewItems();
if (newItems > 0) {