/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/DepartureList.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/DepartureList.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1053 by torben, Tue Sep 14 16:00:57 2010 UTC revision 1057 by torben, Tue Sep 14 17:05:21 2010 UTC
# Line 39  public class DepartureList extends ListA Line 39  public class DepartureList extends ListA
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;
# Line 272  public class DepartureList extends ListA Line 273  public class DepartureList extends ListA
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          }          }
# Line 297  public class DepartureList extends ListA Line 302  public class DepartureList extends ListA
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                  }                  }
# Line 418  public class DepartureList extends ListA Line 428  public class DepartureList extends ListA
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                                    
# Line 439  public class DepartureList extends ListA Line 452  public class DepartureList extends ListA
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);

Legend:
Removed from v.1053  
changed lines
  Added in v.1057

  ViewVC Help
Powered by ViewVC 1.1.20