summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java40
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java3
2 files changed, 23 insertions, 20 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
index f240aa3..e8dd66b 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
@@ -38,12 +38,13 @@ import de.bjusystems.vdrmanager.utils.svdrp.SvdrpException;
*
*/
public abstract class BaseEventListActivity<T extends Event> extends
- BaseActivity implements OnItemClickListener,SvdrpAsyncListener<T>,
+ BaseActivity implements OnItemClickListener, SvdrpAsyncListener<T>,
SimpleGestureListener {
public static final int MENU_GROUP_SHARE = 90;
-
+
public static final int MENU_SHARE = 90;
+
private SimpleGestureFilter detector;
protected EpgClient epgClient;
@@ -66,7 +67,6 @@ 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);
@@ -82,8 +82,6 @@ public abstract class BaseEventListActivity<T extends Event> extends
.getParcelableExtra(Intents.CURRENT_CHANNEL);
}
-
-
/*
* (non-Javadoc)
*
@@ -104,7 +102,6 @@ public abstract class BaseEventListActivity<T extends Event> extends
}
-
/*
* (non-Javadoc)
*
@@ -117,18 +114,23 @@ public abstract class BaseEventListActivity<T extends Event> extends
.getMenuInfo();
final EventListItem event = adapter.getItem(info.position);
+ int itemId = item.getItemId();
+
+ switch (itemId) {
- switch (item.getItemId()) {
case R.id.epg_item_menu_live_tv: {
Utils.stream(this, event);
break;
}
- case MENU_REFRESH:
+ case MENU_SHARE: {
Utils.shareEvent(this, event);
break;
}
+ default:
+ return super.onContextItemSelected(item);
+ }
- return true;
+ return true;
}
/*
@@ -167,18 +169,18 @@ public abstract class BaseEventListActivity<T extends Event> extends
final ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
- //if (v.getId() == R.id.whatson_list) {
- final AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
+ // if (v.getId() == R.id.whatson_list) {
+ final AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
- // set menu title
- final EventListItem item = adapter.getItem(info.position);
-
- if (item.isLive()) {
- menu.findItem(R.id.epg_item_menu_live_tv).setVisible(true);
- }
+ // set menu title
+ final EventListItem item = adapter.getItem(info.position);
+
+ if (item.isLive()) {
+ menu.findItem(R.id.epg_item_menu_live_tv).setVisible(true);
+ }
menu.add(MENU_GROUP_SHARE, MENU_SHARE, 0, R.string.share);
- //}
+ // }
}
@@ -349,7 +351,6 @@ public abstract class BaseEventListActivity<T extends Event> extends
}
}
-
protected void say(int res) {
Toast.makeText(this, res, Toast.LENGTH_SHORT).show();
}
@@ -358,5 +359,4 @@ public abstract class BaseEventListActivity<T extends Event> extends
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
}
-
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java
index 6c5cb66..b194b22 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java
@@ -115,6 +115,9 @@ public class RecordingListActivity extends BaseEventListActivity<Recording>
say("Sorry, not yet. It would be. File -> "+ rec.getFileName());
break;
}
+
+ default:
+ return super.onContextItemSelected(item);
}
return true;
}