summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2011-11-11 14:49:05 +0100
committerlado <herrlado@gmail.com>2011-11-11 14:49:05 +0100
commit7a5c721bfa1968d92ee76f9632dde0dc8a6ae9f9 (patch)
treece30ece98173d3fc6e5f89f824ad72c321e2f617 /vdrmanager
parent73a6f1a9d8e6ca92028fe6b3b6761d597d13a065 (diff)
downloadvdr-manager-7a5c721bfa1968d92ee76f9632dde0dc8a6ae9f9.tar.gz
vdr-manager-7a5c721bfa1968d92ee76f9632dde0dc8a6ae9f9.tar.bz2
npe from market
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
index 454ae17..52be349 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
@@ -61,6 +61,7 @@ public abstract class BaseEventListActivity<T extends Event> extends
protected List<Event> results = new ArrayList<Event>();
+
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -185,7 +186,7 @@ public abstract class BaseEventListActivity<T extends Event> extends
final EventListItem item = adapter.getItem(info.position);
MenuItem mi = menu.findItem(R.id.epg_item_menu_live_tv);
- if (item.isLive()) {
+ if (item.isLive() && item.getStreamId() != null) {
mi.setVisible(true);
} else {
mi.setVisible(false);
@@ -207,6 +208,10 @@ public abstract class BaseEventListActivity<T extends Event> extends
// find and remember item
final EventListItem item = adapter.getItem(position);
+ if(item.isHeader()){
+ return;
+ }
+
prepareDetailsViewData(item);
// show details
@@ -308,12 +313,17 @@ public abstract class BaseEventListActivity<T extends Event> extends
}
protected void sortItemsByTime(List<Event> result) {
+ sortItemsByTime(result, false);
+ }
+ protected void sortItemsByTime(List<Event> result, final boolean reverse) {
final Comparator<Event> comparator = new Comparator<Event>() {
public int compare(final Event item1, final Event item2) {
int c = item1.getStart().compareTo(item2.getStart());
if (c != 0) {
- return c;
+ if(reverse == false)
+ return c;
+ return -1 * c;
}
if (item1.getChannelNumber() == null
&& item2.getChannelNumber() == null) {