From f04b065ab54eea26ec3af3dbcead56b044a410e1 Mon Sep 17 00:00:00 2001 From: lado Date: Thu, 2 Feb 2012 15:19:34 +0100 Subject: new timer initial --- .../vdrmanager/gui/TimerListActivity.java | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'vdrmanager/src') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java index cc2c431..00535d5 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java @@ -2,8 +2,11 @@ package de.bjusystems.vdrmanager.gui; import java.util.Calendar; +import android.content.Intent; import android.os.Bundle; import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; import de.bjusystems.vdrmanager.R; @@ -144,6 +147,10 @@ public class TimerListActivity extends BaseTimerEditActivity implements return results.isEmpty() == false; } + @Override + protected boolean refreshOnResume() { + return false; + } @Override protected String getWindowTitle() { return getString(R.string.action_menu_timers); @@ -164,11 +171,43 @@ public class TimerListActivity extends BaseTimerEditActivity implements refresh(); } + /* + * (non-Javadoc) + * + * @see + * de.bjusystems.vdrmanager.gui.BaseActivity#onOptionsItemSelected(android + * .view.MenuItem) + */ + public boolean onOptionsItemSelected(final MenuItem item) { + + switch(item.getItemId()){ + case R.id.timer_menu_add: + say("Comming soon..."); + return true; + } + + // switch (item.getItemId()) { + // case R.id.epg_menu_search: + // startSearchManager(); + // super.onSearchRequested(); + // break; + // case R.id.epg_menu_times: + // intent = new Intent(); + // /intent.setClass(this, EpgSearchTimesListActivity.class); + // startActivity(intent); + // break; + // } + return super.onOptionsItemSelected(item); + } + public boolean onCreateOptionsMenu(final Menu menu) { // MenuItem item; //item = menu.add(MENU_GROUP_NEW_TIMER, MENU_NEW_TIMER, 0, R.string.new_timer); //item.setIcon(android.R.drawable.ic_menu_add);; // /item.setAlphabeticShortcut('r'); + + final MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.timer_list_menu, menu); return super.onCreateOptionsMenu(menu); } -- cgit v1.2.3