diff options
author | lado <herrlado@gmail.com> | 2011-11-12 01:49:58 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-11-12 01:49:58 +0100 |
commit | 399df917723ddce2813a714b2c81c694183aa616 (patch) | |
tree | 9056b6c00bfd5865c06f34838c27ddd5f9e3c8f2 /vdrmanager | |
parent | 95f563b8be908a023b49d9e9415021b29a5311af (diff) | |
download | vdr-manager-399df917723ddce2813a714b2c81c694183aa616.tar.gz vdr-manager-399df917723ddce2813a714b2c81c694183aa616.tar.bz2 |
correct imdb button handling
Diffstat (limited to 'vdrmanager')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java index 0c37e72..73768ea 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java @@ -189,7 +189,7 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, pager.setAdapter(adapter); cEvent = epgs.get(counter); pager.setCurrentItem(counter); - + current = counter; // indicator.setViewPager(pager); // publishEPG(epg); @@ -203,7 +203,7 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, view.setImageResource(res); } - public void publishEPG(View view, int position) { + public void publishEPG(final View view, int position) { Event event = epgs.get(position); @@ -286,7 +286,19 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, b.setVisibility(View.GONE); } else { b.setVisibility(View.VISIBLE); - setThisAsOnClickListener(b); + b.setOnClickListener(new OnClickListener() { + + public void onClick(View v) { + final TextView title = (TextView) view.findViewById(R.id.epg_detail_title); + String url = String.format(IMDB_URL, + Preferences.get().getImdbUrl(), + String.valueOf(title.getText())); + Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(url)); + startActivity(i); + } + }); + //setThisAsOnClickListener(b); } b = view.findViewById(R.id.epg_event_livetv); @@ -431,15 +443,9 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, .show();// break; - case R.id.epg_event_imdb: - final TextView title = (TextView) findViewById(R.id.epg_detail_title); - String url = String.format(IMDB_URL, - Preferences.get().getImdbUrl(), - String.valueOf(title.getText())); - Intent i = new Intent(Intent.ACTION_VIEW); - i.setData(Uri.parse(url)); - startActivity(i); - break; + //case R.id.epg_event_imdb: + +// break; // case R.id.epg_event_share: // shareEvent(cEvent); @@ -447,6 +453,7 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, } } + protected void toggleTimer(final Timer timer) { final ToggleTimerTask task = new ToggleTimerTask(this, timer) { @Override |