aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-07-31 16:49:05 -0700
committerdaneren2005 <daneren2005@gmail.com>2013-07-31 16:49:05 -0700
commitc0ef3af053930f9ece32b2bc2a82e68ee8d9c377 (patch)
tree0d4ea9c1b74b993018fdae7f099a2e7fd643ebd9 /src/github
parent3ab1b6e8c1a9aa61d84fe6c5055babdb6c4ec0b8 (diff)
downloaddsub-c0ef3af053930f9ece32b2bc2a82e68ee8d9c377.tar.gz
dsub-c0ef3af053930f9ece32b2bc2a82e68ee8d9c377.tar.bz2
dsub-c0ef3af053930f9ece32b2bc2a82e68ee8d9c377.zip
Use UpdateView abstraction
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/view/PodcastChannelView.java25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/github/daneren2005/dsub/view/PodcastChannelView.java b/src/github/daneren2005/dsub/view/PodcastChannelView.java
index 94eedf2c..911192f7 100644
--- a/src/github/daneren2005/dsub/view/PodcastChannelView.java
+++ b/src/github/daneren2005/dsub/view/PodcastChannelView.java
@@ -36,7 +36,6 @@ public class PodcastChannelView extends UpdateView {
private PodcastChannel channel;
private TextView titleView;
- private ImageView moreButton;
public PodcastChannelView(Context context) {
super(context);
@@ -45,8 +44,6 @@ public class PodcastChannelView extends UpdateView {
titleView = (TextView) findViewById(R.id.artist_name);
ImageButton starButton = (ImageButton) findViewById(R.id.artist_star);
- starButton.setVisibility(View.GONE);
- starButton.setFocusable(false);
moreButton = (ImageView) findViewById(R.id.artist_more);
moreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
@@ -55,22 +52,18 @@ public class PodcastChannelView extends UpdateView {
});
}
- public void setPodcastChannel(PodcastChannel podcastChannel) {
- channel = podcastChannel;
- if(podcastChannel.getName() != null) {
- titleView.setText(podcastChannel.getName());
+ public void setPodcastChannel(Object obj) {
+ channel = (PodcastChannel) obj;
+ if(channel.getName() != null) {
+ titleView.setText(channel.getName());
} else {
- titleView.setText(podcastChannel.getUrl());
+ titleView.setText(channel.getUrl());
}
+ file = FileUtil.getPodcastDirectory(context, channel);
}
@Override
- protected void update() {
- File file = FileUtil.getPodcastDirectory(context, channel);
- if(file.exists()) {
- moreButton.setImageResource(R.drawable.list_item_more_shaded);
- } else {
- moreButton.setImageResource(R.drawable.list_item_more);
- }
- }
+ protected void updateBackground() {
+ exists = file.exists();
+ }
}