39
39
40
40
@ SuppressWarnings ("serial" )
41
41
public 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 ;
44
45
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 ;
51
53
52
54
53
55
private AndroidEditor aEditor ;
@@ -61,25 +63,14 @@ public AndroidToolbar(Editor editor, Base base) {
61
63
}
62
64
63
65
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 ) {
75
67
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" );
83
74
case EXPORT_PACKAGE : return AndroidMode .getTextString ("menu.file.export_signed_package" );
84
75
case EXPORT_BUNDLE : return AndroidMode .getTextString ("menu.file.export_signed_bundle" );
85
76
case EXPORT_PROJECT : return AndroidMode .getTextString ("menu.file.export_android_project" );
0 commit comments