Added Button to FeedItemlist item
This commit is contained in:
parent
c2054be460
commit
d539786af6
@ -13,5 +13,13 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/txtvItemname"
|
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>
|
</RelativeLayout>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<!-- Activitiy titles-->
|
<!-- Activitiy titles-->
|
||||||
<string name="app_name">Podfetcher</string>
|
<string name="app_name">Podfetcher</string>
|
||||||
<string name="feeds_label">Feeds</string>
|
<string name="feeds_label">Feeds</string>
|
||||||
|
<string name="new_label">New</string>
|
||||||
<string name="settings_label">Settings</string>
|
<string name="settings_label">Settings</string>
|
||||||
<string name="add_new_feed_label">Add a new Feed</string>
|
<string name="add_new_feed_label">Add a new Feed</string>
|
||||||
<string name="downloads_label">Downloads</string>
|
<string name="downloads_label">Downloads</string>
|
||||||
|
@ -45,4 +45,8 @@ public class FeedItemlistActivity extends SherlockListActivity {
|
|||||||
|
|
||||||
startActivity(showItem);
|
startActivity(showItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onButActionClicked(View v) {
|
||||||
|
Log.d(TAG, "Button clicked");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,9 @@ public class PodfetcherActivity extends SherlockFragmentActivity {
|
|||||||
|
|
||||||
actionBar.addTab(tab);
|
actionBar.addTab(tab);
|
||||||
tab = actionBar.newTab()
|
tab = actionBar.newTab()
|
||||||
.setText("Playlist")
|
.setText(getText(R.string.new_label).toString())
|
||||||
.setTabListener(new TabListener<FeedlistFragment>(
|
.setTabListener(new TabListener<FeedlistFragment>(
|
||||||
this, "Playlist", FeedlistFragment.class));
|
this, getText(R.string.new_label).toString(), FeedlistFragment.class));
|
||||||
actionBar.addTab(tab);
|
actionBar.addTab(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class FeedItem extends FeedComponent{
|
|||||||
private boolean read;
|
private boolean read;
|
||||||
|
|
||||||
public FeedItem() {
|
public FeedItem() {
|
||||||
this.read = false;
|
this.read = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FeedItem(String title, String description, String link,
|
public FeedItem(String title, String description, String link,
|
||||||
@ -30,7 +30,7 @@ public class FeedItem extends FeedComponent{
|
|||||||
this.pubDate = pubDate;
|
this.pubDate = pubDate;
|
||||||
this.media = media;
|
this.media = media;
|
||||||
this.feed = feed;
|
this.feed = feed;
|
||||||
this.read = false;
|
this.read = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
|
@ -95,6 +95,7 @@ public class FeedManager {
|
|||||||
"Found no existing Feed with title " + newFeed.getTitle()
|
"Found no existing Feed with title " + newFeed.getTitle()
|
||||||
+ ". Adding as new one.");
|
+ ". Adding as new one.");
|
||||||
// Add a new Feed
|
// Add a new Feed
|
||||||
|
newFeed.getItems().get(0).setRead(false);
|
||||||
addNewFeed(context, newFeed);
|
addNewFeed(context, newFeed);
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, "Feed with title " + newFeed.getTitle()
|
Log.d(TAG, "Feed with title " + newFeed.getTitle()
|
||||||
|
@ -239,7 +239,7 @@ public class PodDBAdapter {
|
|||||||
setFeed(item.getFeed());
|
setFeed(item.getFeed());
|
||||||
}
|
}
|
||||||
values.put(KEY_FEED, item.getFeed().getId());
|
values.put(KEY_FEED, item.getFeed().getId());
|
||||||
values.put(KEY_READ, (item.isRead()) ? 1 : 0);
|
values.put(KEY_READ, item.isRead());
|
||||||
|
|
||||||
open();
|
open();
|
||||||
if (item.getId() == 0) {
|
if (item.getId() == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user