Added Button to FeedItemlist item

This commit is contained in:
daniel oeh 2012-06-16 16:51:25 +02:00
parent c2054be460
commit d539786af6
7 changed files with 19 additions and 5 deletions

View File

@ -13,5 +13,13 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtvItemname"
/>
<Button
android:id="@+id/butActions"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="More"
android:layout_alignParentRight="true"
android:focusable="false"
android:onClick="onButActionClicked"/>
</RelativeLayout>

View File

@ -4,6 +4,7 @@
<!-- Activitiy titles-->
<string name="app_name">Podfetcher</string>
<string name="feeds_label">Feeds</string>
<string name="new_label">New</string>
<string name="settings_label">Settings</string>
<string name="add_new_feed_label">Add a new Feed</string>
<string name="downloads_label">Downloads</string>

View File

@ -45,4 +45,8 @@ public class FeedItemlistActivity extends SherlockListActivity {
startActivity(showItem);
}
public void onButActionClicked(View v) {
Log.d(TAG, "Button clicked");
}
}

View File

@ -48,9 +48,9 @@ public class PodfetcherActivity extends SherlockFragmentActivity {
actionBar.addTab(tab);
tab = actionBar.newTab()
.setText("Playlist")
.setText(getText(R.string.new_label).toString())
.setTabListener(new TabListener<FeedlistFragment>(
this, "Playlist", FeedlistFragment.class));
this, getText(R.string.new_label).toString(), FeedlistFragment.class));
actionBar.addTab(tab);
}

View File

@ -18,7 +18,7 @@ public class FeedItem extends FeedComponent{
private boolean read;
public FeedItem() {
this.read = false;
this.read = true;
}
public FeedItem(String title, String description, String link,
@ -30,7 +30,7 @@ public class FeedItem extends FeedComponent{
this.pubDate = pubDate;
this.media = media;
this.feed = feed;
this.read = false;
this.read = true;
}
public String getTitle() {

View File

@ -95,6 +95,7 @@ public class FeedManager {
"Found no existing Feed with title " + newFeed.getTitle()
+ ". Adding as new one.");
// Add a new Feed
newFeed.getItems().get(0).setRead(false);
addNewFeed(context, newFeed);
} else {
Log.d(TAG, "Feed with title " + newFeed.getTitle()

View File

@ -239,7 +239,7 @@ public class PodDBAdapter {
setFeed(item.getFeed());
}
values.put(KEY_FEED, item.getFeed().getId());
values.put(KEY_READ, (item.isRead()) ? 1 : 0);
values.put(KEY_READ, item.isRead());
open();
if (item.getId() == 0) {