diff options
author | lado <herrlado@gmail.com> | 2011-11-11 14:49:05 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-11-11 14:49:05 +0100 |
commit | 7a5c721bfa1968d92ee76f9632dde0dc8a6ae9f9 (patch) | |
tree | ce30ece98173d3fc6e5f89f824ad72c321e2f617 /vdrmanager/src | |
parent | 73a6f1a9d8e6ca92028fe6b3b6761d597d13a065 (diff) | |
download | vdr-manager-7a5c721bfa1968d92ee76f9632dde0dc8a6ae9f9.tar.gz vdr-manager-7a5c721bfa1968d92ee76f9632dde0dc8a6ae9f9.tar.bz2 |
npe from market
Diffstat (limited to 'vdrmanager/src')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java | 14 |
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) { |