3939
4040@ SuppressWarnings ("serial" )
4141public class AndroidToolbar extends EditorToolbar {
42- static protected final int RUN = 0 ;
43- static protected final int STOP = 1 ;
42+ static protected final int RUN_ON_DEVICE = 0 ;
43+ static protected final int RUN_IN_EMULATOR = 1 ;
44+ static protected final int STOP = 2 ;
4445
45- static protected final int NEW = 2 ;
46- static protected final int OPEN = 3 ;
47- static protected final int SAVE = 4 ;
48- static protected final int EXPORT_PACKAGE = 5 ;
49- static protected final int EXPORT_BUNDLE = 6 ;
50- static protected final int EXPORT_PROJECT = 7 ;
46+ static protected final int NEW = 3 ;
47+ static protected final int OPEN = 4 ;
48+ static protected final int SAVE = 5 ;
49+
50+ static protected final int EXPORT_PACKAGE = 6 ;
51+ static protected final int EXPORT_BUNDLE = 7 ;
52+ static protected final int EXPORT_PROJECT = 8 ;
5153
5254
5355 private AndroidEditor aEditor ;
@@ -61,25 +63,14 @@ public AndroidToolbar(Editor editor, Base base) {
6163 }
6264
6365
64- // TODO:
65- // Buttons are initialized in createButtons, see code of EditorToolbar.rebuild()
66- // public void init() {
67- // Image[][] images = loadImages();
68- // for (int i = 0; i < 6; i++) {
69- // addButton(getTitle(i, false), getTitle(i, true), images[i], i == NEW);
70- // }
71- // }
72-
73-
74- static public String getTitle (int index , boolean shift ) {
66+ static public String getTitle (int index ) {
7567 switch (index ) {
76- case RUN : return !shift ? "Run on Device" : "Run in Emulator" ;
77- case STOP : return "Stop" ;
78- case NEW : return "New" ;
79- case OPEN : return "Open" ;
80- case SAVE : return "Save" ;
81-
82-
68+ case RUN_ON_DEVICE : return AndroidMode .getTextString ("menu.sketch.run_on_device" );
69+ case RUN_IN_EMULATOR : return AndroidMode .getTextString ("menu.sketch.run_in_emulator" );
70+ case STOP : return AndroidMode .getTextString ("menu.sketch.stop" );
71+ case NEW : return AndroidMode .getTextString ("menu.file.new" );
72+ case OPEN : return AndroidMode .getTextString ("menu.file.open" );
73+ case SAVE : return AndroidMode .getTextString ("menu.file.save" );
8374 case EXPORT_PACKAGE : return AndroidMode .getTextString ("menu.file.export_signed_package" );
8475 case EXPORT_BUNDLE : return AndroidMode .getTextString ("menu.file.export_signed_bundle" );
8576 case EXPORT_PROJECT : return AndroidMode .getTextString ("menu.file.export_android_project" );
0 commit comments