summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2013-07-24 11:47:02 +0200
committerlado <herrlado@gmail.com>2013-07-24 11:47:02 +0200
commitc4ba2bc1e9e9e074d741915018eb8dac06d92822 (patch)
tree3c559395c337c24cf0e3d5ce659baa0c93caf4d1 /vdrmanager/src
parenta307c2c08043b5e2d0c7ae54b566794afbbefa4b (diff)
downloadvdr-manager-c4ba2bc1e9e9e074d741915018eb8dac06d92822.tar.gz
vdr-manager-c4ba2bc1e9e9e074d741915018eb8dac06d92822.tar.bz2
add over menu
Diffstat (limited to 'vdrmanager/src')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java
index 85dbe8f..a499d00 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java
@@ -29,8 +29,8 @@ import de.bjusystems.vdrmanager.data.Preferences;
import de.bjusystems.vdrmanager.data.Vdr;
import de.bjusystems.vdrmanager.data.db.DBAccess;
-public class VdrListActivity extends ListActivity
- implements OnItemClickListener, OnItemLongClickListener {
+public class VdrListActivity extends ListActivity implements
+ OnItemClickListener, OnItemLongClickListener {
private static final String TAG = VdrListActivity.class.getName();
@@ -78,13 +78,6 @@ public class VdrListActivity extends ListActivity
setContentView(R.layout.vdr_list_add_delete);
- findViewById(R.id.add_item).setOnClickListener(
- new View.OnClickListener() {
- public void onClick(View v) {
- editVdr(null);
- }
- });
-
// initCursor();
final Vdr cur = Preferences.get().getCurrentVdr();
adapter = new ArrayAdapter<Vdr>(this,
@@ -245,8 +238,12 @@ public class VdrListActivity extends ListActivity
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
- if (DBAccess.get(VdrListActivity.this).getVdrDAO().deleteById(
- adapter.getItem(position).getId()) > 0) {
+ if (DBAccess
+ .get(VdrListActivity.this)
+ .getVdrDAO()
+ .deleteById(
+ adapter.getItem(position)
+ .getId()) > 0) {
if (Preferences.get().getCurrentVdrContext(
VdrListActivity.this) == id) {
Preferences.setCurrentVdr(
@@ -281,6 +278,9 @@ public class VdrListActivity extends ListActivity
BackupSettingsActivity.class);
startActivity(intent);
return true;
+ } else if (item.getItemId() == R.id.main_menu_vdrlist_add) {
+ editVdr(null);
+ return true;
}
return super.onOptionsItemSelected(item);
}