39 |
public static final int DLG_PROGRESS = 1; |
public static final int DLG_PROGRESS = 1; |
40 |
static final int MENU_MAP = 100; |
static final int MENU_MAP = 100; |
41 |
static final int MENU_NOTIFICATIONS = 101; |
static final int MENU_NOTIFICATIONS = 101; |
42 |
|
static final int MENU_METROMAP= 102; |
43 |
|
|
44 |
|
|
45 |
DepartureListAdapter adapter; |
DepartureListAdapter adapter; |
273 |
item.setIcon(android.R.drawable.ic_menu_mapmode); |
item.setIcon(android.R.drawable.ic_menu_mapmode); |
274 |
|
|
275 |
item = menu.add(0, MENU_NOTIFICATIONS, 0, getString(R.string.departurelist_notifications) ); |
item = menu.add(0, MENU_NOTIFICATIONS, 0, getString(R.string.departurelist_notifications) ); |
276 |
item.setIcon(android.R.drawable.ic_menu_info_details); |
item.setIcon(android.R.drawable.ic_menu_info_details); |
|
|
|
277 |
|
|
278 |
boolean notifEnabled = hasNotifications(); |
boolean notifEnabled = hasNotifications(); |
279 |
item.setEnabled(notifEnabled); |
item.setEnabled(notifEnabled); |
280 |
|
|
281 |
|
if (station.isMetro()) { |
282 |
|
item = menu.add(0, MENU_METROMAP, 0, "Metro" ); //TODO:translate!?! |
283 |
|
item.setIcon(android.R.drawable.ic_menu_mapmode); |
284 |
|
} |
285 |
|
|
286 |
|
|
287 |
return true; |
return true; |
288 |
} |
} |
302 |
startActivity(i); |
startActivity(i); |
303 |
res = true; |
res = true; |
304 |
break; |
break; |
305 |
|
case MENU_METROMAP: |
306 |
|
Intent metroMap = new Intent(this,dk.thoerup.traininfo.MetroMap.class); |
307 |
|
startActivity(metroMap); |
308 |
|
res = true; |
309 |
|
break; |
310 |
default: |
default: |
311 |
res = super.onOptionsItemSelected(item); |
res = super.onOptionsItemSelected(item); |
312 |
} |
} |
428 |
params.span = 2; |
params.span = 2; |
429 |
head.addView(h1, params); |
head.addView(h1, params); |
430 |
|
|
431 |
|
|
432 |
|
|
433 |
TextView h2 = new TextView(this); |
TextView h2 = new TextView(this); |
|
h2.setText("Om minutte"); |
|
434 |
h2.setTypeface( Typeface.defaultFromStyle(Typeface.BOLD)); |
h2.setTypeface( Typeface.defaultFromStyle(Typeface.BOLD)); |
435 |
head.addView(h2); |
h2.setText("Om minutter"); |
436 |
|
|
437 |
|
head.addView(h2,params); |
438 |
|
|
439 |
|
|
440 |
|
|
452 |
TextView v2 = new TextView(this); |
TextView v2 = new TextView(this); |
453 |
v2.setText( entry.destination ); |
v2.setText( entry.destination ); |
454 |
row.addView(v2); |
row.addView(v2); |
455 |
|
|
456 |
TextView v3 = new TextView(this); |
TextView v3 = new TextView(this); |
457 |
v3.setText( entry.minutes ); |
v3.setText( entry.minutes ); |
458 |
row.addView(v3); |
row.addView(v3); |