new interface implementation
This commit is contained in:
parent
32941504d9
commit
22e56d6618
@ -49,25 +49,23 @@ containing a value of this type.
|
||||
public static final int divisionButton=0x7f090011;
|
||||
public static final int editText=0x7f090006;
|
||||
public static final int eigthDigitButton=0x7f090014;
|
||||
public static final int equalsButton=0x7f090016;
|
||||
public static final int equalsButton=0x7f09001d;
|
||||
public static final int fiveDigitButton=0x7f09000f;
|
||||
public static final int fourDigitButton=0x7f09000e;
|
||||
public static final int historyButton=0x7f090020;
|
||||
public static final int menu_item_help=0x7f090022;
|
||||
public static final int menu_item_settings=0x7f090021;
|
||||
public static final int historyButton=0x7f09001e;
|
||||
public static final int menu_item_help=0x7f090020;
|
||||
public static final int menu_item_settings=0x7f09001f;
|
||||
public static final int muliplicationButton=0x7f09000c;
|
||||
public static final int nineDigitButton=0x7f090015;
|
||||
public static final int numericButton=0x7f09001e;
|
||||
public static final int oneDigitButton=0x7f090009;
|
||||
public static final int panelswitch=0x7f090008;
|
||||
public static final int piButton=0x7f09001c;
|
||||
public static final int plusButton=0x7f09000d;
|
||||
public static final int pointDigitButton=0x7f09001d;
|
||||
public static final int pointDigitButton=0x7f090016;
|
||||
public static final int resultEditText=0x7f090007;
|
||||
public static final int roundBracketsButton=0x7f090019;
|
||||
public static final int sevenDigitButton=0x7f090013;
|
||||
public static final int simplePad=0x7f090000;
|
||||
public static final int simplifyButton=0x7f09001f;
|
||||
public static final int sixDigitButton=0x7f090010;
|
||||
public static final int sqrtButton=0x7f090017;
|
||||
public static final int squareBracketsButton=0x7f09001a;
|
||||
|
@ -101,22 +101,26 @@
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/sevenDigitButton" a:text="7" calc:textUp=""
|
||||
calc:textDown="" style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/eigthDigitButton" a:text="8" calc:textUp=""
|
||||
calc:textDown="" style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/nineDigitButton" a:text="9" calc:textUp=""
|
||||
calc:textDown="" style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/equalsButton" a:text="="
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/pointDigitButton" a:text="." calc:textDown=","
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/sqrtButton" a:text="sqrt"
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/sqrtButton" a:text="√"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/zeroDigitButton" a:text="0"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
@ -136,7 +140,7 @@
|
||||
calc:textDown="}" style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/piButton" a:text="pi" calc:textUp="e"
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/piButton" a:text="π" calc:textUp="e"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
|
||||
@ -145,17 +149,19 @@
|
||||
|
||||
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/pointDigitButton" a:text="." calc:textDown=","
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="digitButtonClickHandler"/>
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/numericButton" a:text="numeric"
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/equalsButton"
|
||||
a:text="="
|
||||
a:layout_width="fill_parent"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="numericButtonClickHandler"/>
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/simplifyButton" a:text="simplify"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="simplifyButtonClickHandler"/>
|
||||
<!-- <org.solovyev.android.view.DirectionDragButton a:id="@+id/numericButton" a:text="numeric"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="numericButtonClickHandler"/>
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/simplifyButton" a:text="simplify"
|
||||
style="@style/digitButtonStyle"
|
||||
a:onClick="simplifyButtonClickHandler"/>-->
|
||||
|
||||
<org.solovyev.android.view.DirectionDragButton a:id="@+id/historyButton" calc:textUp="undo"
|
||||
calc:textDown="redo" style="@style/digitButtonStyle"/>
|
||||
|
@ -15,8 +15,12 @@ public class Preprocessor {
|
||||
sb.append('(');
|
||||
} else if (ch == ']' || ch == '}') {
|
||||
sb.append(')');
|
||||
} else if ( ch == ',' ) {
|
||||
} else if (ch == ',') {
|
||||
sb.append('.');
|
||||
} else if (ch == 'π') {
|
||||
sb.append("pi");
|
||||
} else if (ch == '√') {
|
||||
sb.append("sqrt");
|
||||
} else {
|
||||
sb.append(ch);
|
||||
}
|
||||
@ -25,7 +29,7 @@ public class Preprocessor {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String wrap (@NotNull JsclOperation operation, @NotNull String s) {
|
||||
public static String wrap(@NotNull JsclOperation operation, @NotNull String s) {
|
||||
return operation.name() + "(\"" + s + "\");";
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public enum MathEntityType {
|
||||
|
||||
private static final List<Character> binaryOperations = Arrays.asList('-', '+', '*', '/', '^' );
|
||||
|
||||
private static final List<String> functions = Arrays.asList("sin", "asin", "cos", "acos", "tg", "atg", "exp", "log", "ln", "mod", "sqrt");
|
||||
private static final List<String> functions = Arrays.asList("sin", "asin", "cos", "acos", "tg", "atg", "exp", "log", "ln", "mod", "√");
|
||||
|
||||
private static final List<String> groupSymbols = Arrays.asList("[]", "()", "{}");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user