This commit is contained in:
Sergey Solovyev 2012-10-10 00:32:33 +04:00
parent 4fd6e94e96
commit ac411a549f
37 changed files with 988 additions and 1032 deletions

View File

@ -13,10 +13,7 @@ import static org.solovyev.android.calculator.CalculatorEventType.*;
public class CalculatorDisplayImpl implements CalculatorDisplay { public class CalculatorDisplayImpl implements CalculatorDisplay {
@NotNull @NotNull
private volatile CalculatorEventData lastCalculatorEventData; private final CalculatorEventHolder lastEvent;
@NotNull
private final Object lastCalculatorEventDataLock = new Object();
@Nullable @Nullable
private CalculatorDisplayView view; private CalculatorDisplayView view;
@ -32,7 +29,7 @@ public class CalculatorDisplayImpl implements CalculatorDisplay {
public CalculatorDisplayImpl(@NotNull Calculator calculator) { public CalculatorDisplayImpl(@NotNull Calculator calculator) {
this.calculator = calculator; this.calculator = calculator;
this.lastCalculatorEventData = CalculatorUtils.createFirstEventDataId(); this.lastEvent = new CalculatorEventHolder(CalculatorUtils.createFirstEventDataId());
this.calculator.addCalculatorEventListener(this); this.calculator.addCalculatorEventListener(this);
} }
@ -91,9 +88,7 @@ public class CalculatorDisplayImpl implements CalculatorDisplay {
@Override @Override
@NotNull @NotNull
public CalculatorEventData getLastEventData() { public CalculatorEventData getLastEventData() {
synchronized (lastCalculatorEventDataLock) { return lastEvent.getLastEventData();
return lastCalculatorEventData;
}
} }
@Override @Override
@ -102,18 +97,9 @@ public class CalculatorDisplayImpl implements CalculatorDisplay {
@Nullable Object data) { @Nullable Object data) {
if (calculatorEventType.isOfType(calculation_result, calculation_failed, calculation_cancelled, conversion_result, conversion_failed)) { if (calculatorEventType.isOfType(calculation_result, calculation_failed, calculation_cancelled, conversion_result, conversion_failed)) {
boolean processEvent = false; final CalculatorEventHolder.Result result = lastEvent.apply(calculatorEventData);
boolean sameSequence = false;
synchronized (lastCalculatorEventDataLock) { if (result.isNewAfter()) {
if (calculatorEventData.isAfter(lastCalculatorEventData)) {
sameSequence = calculatorEventData.isSameSequence(lastCalculatorEventData);
lastCalculatorEventData = calculatorEventData;
processEvent = true;
}
}
if (processEvent) {
switch (calculatorEventType) { switch (calculatorEventType) {
case conversion_failed: case conversion_failed:
processConversationFailed((CalculatorConversionEventData) calculatorEventData, (ConversionFailure) data); processConversationFailed((CalculatorConversionEventData) calculatorEventData, (ConversionFailure) data);

View File

@ -26,12 +26,16 @@ public class CalculatorEditorImpl implements CalculatorEditor {
@NotNull @NotNull
private final Calculator calculator; private final Calculator calculator;
@NotNull
private final CalculatorEventHolder lastEventHolder;
@NotNull @NotNull
private final CursorControlAdapter cursorControlAdapter = new CursorControlAdapter(this); private final CursorControlAdapter cursorControlAdapter = new CursorControlAdapter(this);
public CalculatorEditorImpl(@NotNull Calculator calculator) { public CalculatorEditorImpl(@NotNull Calculator calculator) {
this.calculator = calculator; this.calculator = calculator;
this.calculator.addCalculatorEventListener(this); this.calculator.addCalculatorEventListener(this);
this.lastEventHolder = new CalculatorEventHolder(CalculatorUtils.createFirstEventDataId());
} }
@Override @Override
@ -80,12 +84,16 @@ public class CalculatorEditorImpl implements CalculatorEditor {
public void onCalculatorEvent(@NotNull CalculatorEventData calculatorEventData, public void onCalculatorEvent(@NotNull CalculatorEventData calculatorEventData,
@NotNull CalculatorEventType calculatorEventType, @NotNull CalculatorEventType calculatorEventType,
@Nullable Object data) { @Nullable Object data) {
switch (calculatorEventType) { final CalculatorEventHolder.Result result = lastEventHolder.apply(calculatorEventData);
case use_history_state:
final CalculatorHistoryState calculatorHistoryState = (CalculatorHistoryState)data; if (result.isNewAfter()) {
final EditorHistoryState editorState = calculatorHistoryState.getEditorState(); switch (calculatorEventType) {
this.setText(StringUtils.getNotEmpty(editorState.getText(), ""), editorState.getCursorPosition()); case use_history_state:
break; final CalculatorHistoryState calculatorHistoryState = (CalculatorHistoryState)data;
final EditorHistoryState editorState = calculatorHistoryState.getEditorState();
this.setText(StringUtils.getNotEmpty(editorState.getText(), ""), editorState.getCursorPosition());
break;
}
} }
} }

View File

@ -0,0 +1,70 @@
package org.solovyev.android.calculator;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* User: serso
* Date: 10/9/12
* Time: 9:59 PM
*/
public class CalculatorEventHolder {
@NotNull
private volatile CalculatorEventData lastEventData;
public CalculatorEventHolder(@NotNull CalculatorEventData lastEventData) {
this.lastEventData = lastEventData;
}
@NotNull
public synchronized CalculatorEventData getLastEventData() {
return lastEventData;
}
@NotNull
public synchronized Result apply(@NotNull CalculatorEventData newEventData) {
final Result result = new Result(lastEventData, newEventData);
if (result.isNewAfter()) {
this.lastEventData = newEventData;
}
return result;
}
public static class Result {
@NotNull
private final CalculatorEventData lastEventData;
@NotNull
private final CalculatorEventData newEventData;
@Nullable
private Boolean after = null;
@Nullable
private Boolean sameSequence = null;
public Result(@NotNull CalculatorEventData lastEventData,
@NotNull CalculatorEventData newEventData) {
this.lastEventData = lastEventData;
this.newEventData = newEventData;
}
public boolean isNewAfter() {
if (after == null) {
after = newEventData.isAfter(lastEventData);
}
return after;
}
public boolean isSameSequence() {
if (sameSequence == null) {
sameSequence = newEventData.isSameSequence(lastEventData);
}
return sameSequence;
}
}
}

View File

@ -1,138 +1,144 @@
package org.solovyev.android.calculator; package org.solovyev.android.calculator;
import jscl.JsclMathEngine; import jscl.JsclMathEngine;
import junit.framework.Assert; import junit.framework.Assert;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.solovyev.android.calculator.history.CalculatorHistory; import org.solovyev.android.calculator.history.CalculatorHistory;
import org.solovyev.android.calculator.jscl.JsclOperation; import org.solovyev.android.calculator.jscl.JsclOperation;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
* User: serso * User: serso
* Date: 10/7/12 * Date: 10/7/12
* Time: 8:40 PM * Time: 8:40 PM
*/ */
public class CalculatorTestUtils { public class CalculatorTestUtils {
// in seconds // in seconds
public static final int TIMEOUT = 1000; public static final int TIMEOUT = 1;
public static void staticSetUp() throws Exception { public static void staticSetUp() throws Exception {
CalculatorLocatorImpl.getInstance().init(new CalculatorImpl(), newCalculatorEngine(), Mockito.mock(CalculatorClipboard.class), Mockito.mock(CalculatorNotifier.class), Mockito.mock(CalculatorHistory.class)); CalculatorLocatorImpl.getInstance().init(new CalculatorImpl(), newCalculatorEngine(), Mockito.mock(CalculatorClipboard.class), Mockito.mock(CalculatorNotifier.class), Mockito.mock(CalculatorHistory.class));
CalculatorLocatorImpl.getInstance().getEngine().init(); CalculatorLocatorImpl.getInstance().getEngine().init();
} }
@NotNull @NotNull
static CalculatorEngineImpl newCalculatorEngine() { static CalculatorEngineImpl newCalculatorEngine() {
final MathEntityDao mathEntityDao = Mockito.mock(MathEntityDao.class); final MathEntityDao mathEntityDao = Mockito.mock(MathEntityDao.class);
final JsclMathEngine jsclEngine = JsclMathEngine.getInstance(); final JsclMathEngine jsclEngine = JsclMathEngine.getInstance();
final CalculatorVarsRegistry varsRegistry = new CalculatorVarsRegistry(jsclEngine.getConstantsRegistry(), mathEntityDao); final CalculatorVarsRegistry varsRegistry = new CalculatorVarsRegistry(jsclEngine.getConstantsRegistry(), mathEntityDao);
final CalculatorFunctionsMathRegistry functionsRegistry = new CalculatorFunctionsMathRegistry(jsclEngine.getFunctionsRegistry(), mathEntityDao); final CalculatorFunctionsMathRegistry functionsRegistry = new CalculatorFunctionsMathRegistry(jsclEngine.getFunctionsRegistry(), mathEntityDao);
final CalculatorOperatorsMathRegistry operatorsRegistry = new CalculatorOperatorsMathRegistry(jsclEngine.getOperatorsRegistry(), mathEntityDao); final CalculatorOperatorsMathRegistry operatorsRegistry = new CalculatorOperatorsMathRegistry(jsclEngine.getOperatorsRegistry(), mathEntityDao);
final CalculatorPostfixFunctionsRegistry postfixFunctionsRegistry = new CalculatorPostfixFunctionsRegistry(jsclEngine.getPostfixFunctionsRegistry(), mathEntityDao); final CalculatorPostfixFunctionsRegistry postfixFunctionsRegistry = new CalculatorPostfixFunctionsRegistry(jsclEngine.getPostfixFunctionsRegistry(), mathEntityDao);
return new CalculatorEngineImpl(jsclEngine, varsRegistry, functionsRegistry, operatorsRegistry, postfixFunctionsRegistry, null); return new CalculatorEngineImpl(jsclEngine, varsRegistry, functionsRegistry, operatorsRegistry, postfixFunctionsRegistry, null);
} }
public static void assertEval(@NotNull String expected, @NotNull String expression) { public static void assertEval(@NotNull String expected, @NotNull String expression) {
assertEval(expected, expression, JsclOperation.numeric); assertEval(expected, expression, JsclOperation.numeric);
} }
public static void assertEval(@NotNull String expected, @NotNull String expression, @NotNull JsclOperation operation) { public static void assertEval(@NotNull String expected, @NotNull String expression, @NotNull JsclOperation operation) {
final Calculator calculator = CalculatorLocatorImpl.getInstance().getCalculator(); final Calculator calculator = CalculatorLocatorImpl.getInstance().getCalculator();
CalculatorLocatorImpl.getInstance().getDisplay().setViewState(CalculatorDisplayViewStateImpl.newDefaultInstance()); CalculatorLocatorImpl.getInstance().getDisplay().setViewState(CalculatorDisplayViewStateImpl.newDefaultInstance());
final CountDownLatch latch = new CountDownLatch(1); final CountDownLatch latch = new CountDownLatch(1);
final TestCalculatorEventListener calculatorEventListener = new TestCalculatorEventListener(latch); final TestCalculatorEventListener calculatorEventListener = new TestCalculatorEventListener(latch);
try { try {
calculator.addCalculatorEventListener(calculatorEventListener); calculator.addCalculatorEventListener(calculatorEventListener);
calculatorEventListener.setCalculatorEventData(calculator.evaluate(operation, expression));
calculatorEventListener.setCalculatorEventData(calculator.evaluate(operation, expression));
if (latch.await(TIMEOUT, TimeUnit.SECONDS)) {
Assert.assertNotNull(calculatorEventListener.getResult()); if (latch.await(TIMEOUT, TimeUnit.SECONDS)) {
Assert.assertEquals(expected, calculatorEventListener.getResult().getText()); Assert.assertNotNull(calculatorEventListener.getResult());
} else { Assert.assertEquals(expected, calculatorEventListener.getResult().getText());
Assert.fail("Too long wait for: " + expression); } else {
} Assert.fail("Too long wait for: " + expression);
}
} catch (InterruptedException e) {
throw new RuntimeException(e); } catch (InterruptedException e) {
} finally { throw new RuntimeException(e);
calculator.removeCalculatorEventListener(calculatorEventListener); } finally {
} calculator.removeCalculatorEventListener(calculatorEventListener);
} }
}
public static void assertError(@NotNull String expression) {
assertError(expression, JsclOperation.numeric); public static void assertError(@NotNull String expression) {
} assertError(expression, JsclOperation.numeric);
}
private static final class TestCalculatorEventListener implements CalculatorEventListener {
private static final class TestCalculatorEventListener implements CalculatorEventListener {
@Nullable
private CalculatorEventData calculatorEventData; @Nullable
private CalculatorEventData calculatorEventData;
@NotNull
private final CountDownLatch latch; @NotNull
private final CountDownLatch latch;
@Nullable
private volatile CalculatorDisplayViewState result = null; @Nullable
private volatile CalculatorDisplayViewState result = null;
public TestCalculatorEventListener(@NotNull CountDownLatch latch) {
this.latch = latch; public TestCalculatorEventListener(@NotNull CountDownLatch latch) {
} this.latch = latch;
}
public void setCalculatorEventData(@Nullable CalculatorEventData calculatorEventData) {
this.calculatorEventData = calculatorEventData; public void setCalculatorEventData(@Nullable CalculatorEventData calculatorEventData) {
} this.calculatorEventData = calculatorEventData;
}
@Override
public void onCalculatorEvent(@NotNull CalculatorEventData calculatorEventData, @NotNull CalculatorEventType calculatorEventType, @Nullable Object data) { @Override
if ( this.calculatorEventData != null && calculatorEventData.isSameSequence(this.calculatorEventData) ) { public void onCalculatorEvent(@NotNull CalculatorEventData calculatorEventData, @NotNull CalculatorEventType calculatorEventType, @Nullable Object data) {
if ( calculatorEventType == CalculatorEventType.display_state_changed ) { if ( this.calculatorEventData != null && calculatorEventData.isSameSequence(this.calculatorEventData) ) {
final CalculatorDisplayChangeEventData displayChange = (CalculatorDisplayChangeEventData)data; if (calculatorEventType == CalculatorEventType.display_state_changed) {
final CalculatorDisplayChangeEventData displayChange = (CalculatorDisplayChangeEventData) data;
result = displayChange.getNewValue();
result = displayChange.getNewValue();
latch.countDown();
} try {
} // need to sleep a little bit as await
} new CountDownLatch(1).await(100, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
@Nullable }
public CalculatorDisplayViewState getResult() { latch.countDown();
return result; }
} }
} }
public static void assertError(@NotNull String expression, @NotNull JsclOperation operation) { @Nullable
final Calculator calculator = CalculatorLocatorImpl.getInstance().getCalculator(); public CalculatorDisplayViewState getResult() {
return result;
CalculatorLocatorImpl.getInstance().getDisplay().setViewState(CalculatorDisplayViewStateImpl.newDefaultInstance()); }
}
final CountDownLatch latch = new CountDownLatch(1);
final TestCalculatorEventListener calculatorEventListener = new TestCalculatorEventListener(latch); public static void assertError(@NotNull String expression, @NotNull JsclOperation operation) {
try { final Calculator calculator = CalculatorLocatorImpl.getInstance().getCalculator();
calculator.addCalculatorEventListener(calculatorEventListener);
calculatorEventListener.setCalculatorEventData(calculator.evaluate(operation, expression)); CalculatorLocatorImpl.getInstance().getDisplay().setViewState(CalculatorDisplayViewStateImpl.newDefaultInstance());
if (latch.await(TIMEOUT, TimeUnit.SECONDS)) { final CountDownLatch latch = new CountDownLatch(1);
Assert.assertNotNull(calculatorEventListener.getResult()); final TestCalculatorEventListener calculatorEventListener = new TestCalculatorEventListener(latch);
Assert.assertFalse(calculatorEventListener.getResult().isValid()); try {
} else { calculator.addCalculatorEventListener(calculatorEventListener);
Assert.fail("Too long wait for: " + expression); calculatorEventListener.setCalculatorEventData(calculator.evaluate(operation, expression));
}
if (latch.await(TIMEOUT, TimeUnit.SECONDS)) {
} catch (InterruptedException e) { Assert.assertNotNull(calculatorEventListener.getResult());
throw new RuntimeException(e); Assert.assertFalse(calculatorEventListener.getResult().isValid());
} finally { } else {
calculator.removeCalculatorEventListener(calculatorEventListener); Assert.fail("Too long wait for: " + expression);
} }
}
} } catch (InterruptedException e) {
throw new RuntimeException(e);
} finally {
calculator.removeCalculatorEventListener(calculatorEventListener);
}
}
}

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionCode="81" android:versionName="1.3.2" <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionCode="87" android:versionName="1.3.2" package="org.solovyev.android.calculator">
package="org.solovyev.android.calculator">
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
@ -9,7 +8,7 @@
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8"/> <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8"/>
<application android:debuggable="true" android:hardwareAccelerated="false" android:icon="@drawable/icon" android:label="@string/c_app_name" android:name=".CalculatorApplication" android:theme="@style/metro_blue_theme"> <application android:debuggable="false" android:hardwareAccelerated="false" android:icon="@drawable/icon" android:label="@string/c_app_name" android:name=".CalculatorApplication" android:theme="@style/metro_blue_theme">
<activity android:label="@string/c_app_name" android:name=".CalculatorActivity" android:windowSoftInputMode="adjustPan"> <activity android:label="@string/c_app_name" android:name=".CalculatorActivity" android:windowSoftInputMode="adjustPan">
@ -21,7 +20,7 @@
</activity> </activity>
<!-- settings must use action bar icon--> <!-- settings must use action bar icon-->
<activity android:label="@string/c_app_settings" android:icon="@drawable/icon_action_bar" android:name=".CalculatorPreferencesActivity"/> <activity android:icon="@drawable/icon_action_bar" android:label="@string/c_app_settings" android:name=".CalculatorPreferencesActivity"/>
<activity android:label="@string/c_history" android:name=".history.CalculatorHistoryActivity"/> <activity android:label="@string/c_history" android:name=".history.CalculatorHistoryActivity"/>
@ -38,7 +37,7 @@
<activity android:label="@string/c_plot_graph" android:name=".plot.CalculatorPlotActivity"/> <activity android:label="@string/c_plot_graph" android:name=".plot.CalculatorPlotActivity"/>
<!-- settings must use action bar icon--> <!-- settings must use action bar icon-->
<activity android:label="@string/c_settings" android:icon="@drawable/icon_action_bar" android:name=".plot.CalculatorPlotPreferenceActivity"/> <activity android:icon="@drawable/icon_action_bar" android:label="@string/c_settings" android:name=".plot.CalculatorPlotPreferenceActivity"/>
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.ads.AdActivity"/> <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.ads.AdActivity"/>
@ -51,11 +50,7 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<activity android:name="org.acra.CrashReportDialog" <activity android:excludeFromRecents="true" android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:name="org.acra.CrashReportDialog" android:theme="@style/Theme.Sherlock.Dialog"/>
android:theme="@style/Theme.Sherlock.Dialog"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
</application> </application>
</manifest> </manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

View File

@ -295,7 +295,7 @@
</manifest> </manifest>
<proguard> <proguard>
<skip>true</skip> <skip>false</skip>
</proguard> </proguard>
</configuration> </configuration>

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev. ~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com ~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org ~ or visit http://se.solovyev.org
--> -->
<org.solovyev.android.view.ColorButton xmlns:a="http://schemas.android.com/apk/res/android" <org.solovyev.android.view.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/pasteButton" a:id="@+id/likeButton"
a:drawableTop="@drawable/kb_heart" a:drawableTop="@drawable/kb_facebook"
style="?controlImageButtonStyle" style="?controlImageButtonStyle"
a:onClick="donateButtonClickHandler"/> a:onClick="likeButtonClickHandler"/>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="fill_parent"
a:layout_height="fill_parent">
<TextView a:id="@+id/donateText"
style="@style/about_style"
a:layout_width="fill_parent"
a:text="@string/c_donate_text"
a:layout_height="fill_parent"/>
</LinearLayout>

View File

@ -12,7 +12,7 @@
Este programa es Open Source:\nTodo el código fuente puede encontrarse en\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n Este programa es Open Source:\nTodo el código fuente puede encontrarse en\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
Para más información, por favor,\ncontacte con el autor al mail\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n Para más información, por favor,\ncontacte con el autor al mail\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n
o visite\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n o visite\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n
Si desea apoyar el proyecto,\npuede hacer una donación vía\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">\nhttp://paypal.com</a>\n\n Si desea apoyar el proyecto\n\n
Si le gusta la aplicación\nvalórela con 5 estrellas en\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n Si le gusta la aplicación\nvalórela con 5 estrellas en\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n
Gracias a las personas que han traducido Calculadora++ a los diferentes idiomas:\n Gracias a las personas que han traducido Calculadora++ a los diferentes idiomas:\n
Español - Jordi Luna\n Español - Jordi Luna\n

View File

@ -1,17 +0,0 @@
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<resources>
<string name="c_donate">Donar</string>
<string name="c_donate_text" formatted="false">Puede dar las gracias por mail al autor de este programa\n\n
<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n\n
donar dinero a través de\n\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
o evaluar el programa con 5 estrellas en\n\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n
</string>
</resources>

View File

@ -12,7 +12,7 @@
Questo programma è open source:\ntutto il codice può essere trovato su\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n Questo programma è open source:\ntutto il codice può essere trovato su\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
Per ulteriori informazioni contatta\nl\'autore via email\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a> Per ulteriori informazioni contatta\nl\'autore via email\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>
\no visita\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n \no visita\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n
Se vuoi aiutare il progetto\npuoi effettuare una donazione via\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n Se vuoi aiutare il progetto\n\n
Se ti piace l\'applicazione\nvota 5 stelle nel\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n Se ti piace l\'applicazione\nvota 5 stelle nel\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n
Grazie a persone che traducono Calculator++ in diverse lingue:\n Grazie a persone che traducono Calculator++ in diverse lingue:\n
Italiano - Gabriele Ravanetti\n Italiano - Gabriele Ravanetti\n

View File

@ -1,17 +0,0 @@
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<resources>
<string name="c_donate">Dona</string>
<string name="c_donate_text">Puoi ringraziare l\'autore di questo programma per email\n\n
<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n\n
o donando su\n\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
oppure votando l\'applicazione con 5 stelle nell\'\n\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>
</string>
</resources>

View File

@ -9,12 +9,11 @@
<string name="c_about">О программе</string> <string name="c_about">О программе</string>
<string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Программа создана\nserso aka se.solovyev</b>\n\n <string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Программа создана\nserso aka se.solovyev</b>\n\n
Сайт приложения: <a href="http://calculatorpp.com/forum/">http://calculatorpp.com/forum/</a>\n\n Сайт приложения: <a href="http://facebook.com/calculatorpp">http://facebook.com/calculatorpp</a>\n\n
Эта программа с открытыми исходным кодом:\nон может быть найден на \n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n Эта программа с открытыми исходным кодом:\nон может быть найден на \n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
За подробной информацией, пожалуйста,\nобращайтесь на почту\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n За подробной информацией, пожалуйста,\nобращайтесь на почту\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n
или посетите сайт \n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n или посетите сайт \n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n
Если вы хотите поддержать проект материально\nвы можете купить специальную опцию из настроек приложения\n Если вы хотите поддержать проект материально\nвы можете купить специальную опцию из настроек приложения\n\n
перевести средства через \n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
Если вам понравилось приложение -\nпоставьте 5 звёздочек в\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n Если вам понравилось приложение -\nпоставьте 5 звёздочек в\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n
Спасибо тем, кто переводил Калькулятор++:\n Спасибо тем, кто переводил Калькулятор++:\n
на итальянский - Gabriele Ravanetti\n на итальянский - Gabriele Ravanetti\n
@ -169,7 +168,7 @@
<string name="c_release_notes_for_27"> <string name="c_release_notes_for_27">
От разработчика:\n\n От разработчика:\n\n
Я рад сообщить, что у Калькулятора++ появился собственный форум: http://calculatorpp.com/forum/.\n Я рад сообщить, что у Калькулятора++ появился собственный форум: http://facebook.com/calculatorpp.\n
Здесь вы можете найти всю последнюю информацию о приложении, узнать об известных проблемах и внести свои предложения.\n Здесь вы можете найти всю последнюю информацию о приложении, узнать об известных проблемах и внести свои предложения.\n
Для входа вы можете использовать аккаунт социальной сети (Facebook, Twitter или Google).\n\n Для входа вы можете использовать аккаунт социальной сети (Facebook, Twitter или Google).\n\n
1. Добавлены кнопки управления масштаб на графике\n 1. Добавлены кнопки управления масштаб на графике\n

View File

@ -1,18 +0,0 @@
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<resources>
<string name="c_donate">Пожертвовать</string>
<string name="c_donate_text">Вы можете отблагодарить автора по почте\n\n
<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n\n
купить специальную опцию из настроек приложения\n\n
пожертвовать денег через\n\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
или поставить 5 звёздочек в\n\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>
</string>
</resources>

View File

@ -1,229 +1,229 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev. ~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com ~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org ~ or visit http://se.solovyev.org
--> -->
<resources> <resources>
<string name="c_app_name">Калькулятор++</string> <string name="c_app_name">Калькулятор++</string>
<string name="c_app_name_free">Калькулятор++ Free</string> <string name="c_app_name_free">Калькулятор++ Free</string>
<string name="c_app_icon_name">Кальк++</string> <string name="c_app_icon_name">Кальк++</string>
<string name="c_app_settings">Настройки</string> <string name="c_app_settings">Настройки</string>
<string name="c_syntax_error">Ошибка</string> <string name="c_syntax_error">Ошибка</string>
<string name="c_result_copied">Результат скопирован в буфер!</string> <string name="c_result_copied">Результат скопирован в буфер!</string>
<string name="c_settings">Настройки</string> <string name="c_settings">Настройки</string>
<string name="c_help">Помощь</string> <string name="c_help">Помощь</string>
<string name="c_vars_and_constants">Переменные и константы</string> <string name="c_vars_and_constants">Переменные и константы</string>
<!--PREFERENCE ACTIVITY--> <!--PREFERENCE ACTIVITY-->
<string name="c_prefs_main_category">Основные настройки</string> <string name="c_prefs_main_category">Основные настройки</string>
<string name="c_prefs_calculations_category">Настройки вычислений</string> <string name="c_prefs_calculations_category">Настройки вычислений</string>
<string name="c_prefs_appearance_category">Настройки внешнего вида</string> <string name="c_prefs_appearance_category">Настройки внешнего вида</string>
<string name="c_prefs_other_category">Другие настройки</string> <string name="c_prefs_other_category">Другие настройки</string>
<string name="c_prefs_drag_button_category">Настройки кнопок</string> <string name="c_prefs_drag_button_category">Настройки кнопок</string>
<string name="c_down">Вниз</string> <string name="c_down">Вниз</string>
<string name="c_up">Вверх</string> <string name="c_up">Вверх</string>
<string name="c_restart">Перезапуск</string> <string name="c_restart">Перезапуск</string>
<string name="c_undo">назад</string> <string name="c_undo">назад</string>
<string name="c_redo">вперёд</string> <string name="c_redo">вперёд</string>
<string name="c_paste">вставить</string> <string name="c_paste">вставить</string>
<string name="c_vars">переменные</string> <string name="c_vars">переменные</string>
<string name="c_copy">Копировать</string> <string name="c_copy">Копировать</string>
<string name="c_plot">Построить график</string> <string name="c_plot">Построить график</string>
<string name="c_graph">График</string> <string name="c_graph">График</string>
<string name="c_calc_color_display_title">Подсветка выражений</string> <string name="c_calc_color_display_title">Подсветка выражений</string>
<string name="c_calc_round_result_title">Округление результата</string> <string name="c_calc_round_result_title">Округление результата</string>
<string name="c_calc_round_result_summary">Включает/выключает округление результата</string> <string name="c_calc_round_result_summary">Включает/выключает округление результата</string>
<string name="c_calc_science_notation_title">Результат в научной форме</string> <string name="c_calc_science_notation_title">Результат в научной форме</string>
<string name="c_calc_science_notation_summary">Если включено - результат будет всегда записан в научной форме (12.34E-12)</string> <string name="c_calc_science_notation_summary">Если включено - результат будет всегда записан в научной форме (12.34E-12)</string>
<string name="p_calc_result_precision_title">Точность результата</string> <string name="p_calc_result_precision_title">Точность результата</string>
<string name="p_calc_max_calculation_time_title">Максимальное время вычисления</string> <string name="p_calc_max_calculation_time_title">Максимальное время вычисления</string>
<string name="p_calc_max_calculation_time_summary">Если вычисления превысят установленный предел - калькулятор остановится с ошибкой</string> <string name="p_calc_max_calculation_time_summary">Если вычисления превысят установленный предел - калькулятор остановится с ошибкой</string>
<string name="c_exit">Выход</string> <string name="c_exit">Выход</string>
<string name="c_add">Добавить</string> <string name="c_add">Добавить</string>
<string name="c_cancel">Отмена</string> <string name="c_cancel">Отмена</string>
<string name="c_save">Сохранить</string> <string name="c_save">Сохранить</string>
<string name="c_remove">Удалить</string> <string name="c_remove">Удалить</string>
<string name="c_yes">Да</string> <string name="c_yes">Да</string>
<string name="c_no">Нет</string> <string name="c_no">Нет</string>
<string name="c_var_removal_confirmation">Подтверждение удаления</string> <string name="c_var_removal_confirmation">Подтверждение удаления</string>
<string name="c_var_removal_confirmation_question">Вы действительно хотите удалить переменную \'%s\'?</string> <string name="c_var_removal_confirmation_question">Вы действительно хотите удалить переменную \'%s\'?</string>
<string name="c_var_name">Имя</string> <string name="c_var_name">Имя</string>
<string name="c_var_value">Значение</string> <string name="c_var_value">Значение</string>
<string name="c_var_description">Описание</string> <string name="c_var_description">Описание</string>
<string name="c_var_create_var">Создать переменную</string> <string name="c_var_create_var">Создать переменную</string>
<string name="c_var_edit_var">Редактировать переменную</string> <string name="c_var_edit_var">Редактировать переменную</string>
<string name="c_value.is.not.a.number">Значение должно либо оставаться пустым либо быть числом!</string> <string name="c_value.is.not.a.number">Значение должно либо оставаться пустым либо быть числом!</string>
<string name="c_var.name.clashes">Имя переменной не может быть зарезервированным системным именем!</string> <string name="c_var.name.clashes">Имя переменной не может быть зарезервированным системным именем!</string>
<string name="c_var.already.exists">Переменная с таким именем уже существует!</string> <string name="c_var.already.exists">Переменная с таким именем уже существует!</string>
<string name="c_name.is.not.valid">Имя переменной не валидно: им ядолжно начинаться с буквы, может содержать буквы, цифры и знак подчёркивания.</string> <string name="c_name.is.not.valid">Имя переменной не валидно: им ядолжно начинаться с буквы, может содержать буквы, цифры и знак подчёркивания.</string>
<string name="c_sys.var.cannot.be.changed">Системная переменная не может быть изменена!</string> <string name="c_sys.var.cannot.be.changed">Системная переменная не может быть изменена!</string>
<string name="c_calc_editor_hint">Введите новое выражение</string> <string name="c_calc_editor_hint">Введите новое выражение</string>
<string name="c_press_to_copy">Нажмите для копирования</string> <string name="c_press_to_copy">Нажмите для копирования</string>
<string name="c_continue">Продолжить</string> <string name="c_continue">Продолжить</string>
<string name="c_history">История</string> <string name="c_history">История</string>
<string name="c_history_button">M</string> <string name="c_history_button">M</string>
<string name="c_history_is_empty">История пуста!</string> <string name="c_history_is_empty">История пуста!</string>
<string name="c_app_history">История</string> <string name="c_app_history">История</string>
<string name="c_char_is_not_accepted">Символ \'%s\' не допустим в названии переменной!</string> <string name="c_char_is_not_accepted">Символ \'%s\' не допустим в названии переменной!</string>
<string name="c_calc_angle_units">Единицы измерения углов</string> <string name="c_calc_angle_units">Единицы измерения углов</string>
<string name="p_deg">Градусы</string> <string name="p_deg">Градусы</string>
<string name="p_rad">Радианы</string> <string name="p_rad">Радианы</string>
<string name="p_grad">Грады</string> <string name="p_grad">Грады</string>
<string name="p_turns">Обороты</string> <string name="p_turns">Обороты</string>
<string name="c_angle_units_summary">Устанавливает единицы измерения углов.</string> <string name="c_angle_units_summary">Устанавливает единицы измерения углов.</string>
<string name="c_calc_numeral_bases">Системы счисления</string> <string name="c_calc_numeral_bases">Системы счисления</string>
<string name="c_numeral_bases_summary">Устанавливает систему счисления для всех вводимых чисел.</string> <string name="c_numeral_bases_summary">Устанавливает систему счисления для всех вводимых чисел.</string>
<string name="p_dec">Десятичная</string> <string name="p_dec">Десятичная</string>
<string name="p_hex">Шестнадцатеричная</string> <string name="p_hex">Шестнадцатеричная</string>
<string name="p_oct">Восьмиричная</string> <string name="p_oct">Восьмиричная</string>
<string name="p_bin">Бинарная</string> <string name="p_bin">Бинарная</string>
<string name="c_calc_theme">Тема оформления</string> <string name="c_calc_theme">Тема оформления</string>
<string name="p_default_theme">Серая</string> <string name="p_default_theme">Серая</string>
<string name="p_violet_theme">Фиолетовая</string> <string name="p_violet_theme">Фиолетовая</string>
<string name="p_light_blue_theme">Голубая</string> <string name="p_light_blue_theme">Голубая</string>
<string name="p_metro_blue_theme">Метро Синяя (По умолчанию)</string> <string name="p_metro_blue_theme">Метро Синяя (По умолчанию)</string>
<string name="p_metro_green_theme">Метро Зелёная</string> <string name="p_metro_green_theme">Метро Зелёная</string>
<string name="p_metro_purple_theme">Метро Фиолетовая</string> <string name="p_metro_purple_theme">Метро Фиолетовая</string>
<string name="c_calc_result_precision_summary">Точность результата(все вычисления производятся максимально точно)</string> <string name="c_calc_result_precision_summary">Точность результата(все вычисления производятся максимально точно)</string>
<string name="c_calc_color_display_summary">Включает/выключает подсветку синтаксиса в поле редактирования калькулятора</string> <string name="c_calc_color_display_summary">Включает/выключает подсветку синтаксиса в поле редактирования калькулятора</string>
<string name="c_calc_theme_summary">Устанавливает тему оформления приложения</string> <string name="c_calc_theme_summary">Устанавливает тему оформления приложения</string>
<string name="c_clear_history">Очистить историю</string> <string name="c_clear_history">Очистить историю</string>
<string name="c_simplify_instead_of_numeric">Следующие константы не определены: {0}!</string> <string name="c_simplify_instead_of_numeric">Следующие константы не определены: {0}!</string>
<string name="p_grouping_separator_no">Не использовать разделитель разрядов</string> <string name="p_grouping_separator_no">Не использовать разделитель разрядов</string>
<string name="p_grouping_separator_apostrophe">Апостроф (\')</string> <string name="p_grouping_separator_apostrophe">Апостроф (\')</string>
<string name="p_grouping_separator_space">Пробел ( )</string> <string name="p_grouping_separator_space">Пробел ( )</string>
<string name="c_calc_grouping_separator">Разделитель разрядов</string> <string name="c_calc_grouping_separator">Разделитель разрядов</string>
<string name="c_calc_grouping_separator_summary">Устанавливает разделитель разрядов числа</string> <string name="c_calc_grouping_separator_summary">Устанавливает разделитель разрядов числа</string>
<string name="c_calc_multiplication_sign">Знак произведения</string> <string name="c_calc_multiplication_sign">Знак произведения</string>
<string name="c_calc_multiplication_sign_summary">Устанавливает знак произведения</string> <string name="c_calc_multiplication_sign_summary">Устанавливает знак произведения</string>
<string name="c_calc_layout">Раскладка</string> <string name="c_calc_layout">Раскладка</string>
<string name="p_layout_cellphone">Научная (телефон)</string> <string name="p_layout_cellphone">Научная (телефон)</string>
<string name="p_layout_calculator">Научная</string> <string name="p_layout_calculator">Научная</string>
<string name="p_layout_simple">Простая</string> <string name="p_layout_simple">Простая</string>
<string name="c_calc_layout_summary">Устанавливает раскладку кнопок</string> <string name="c_calc_layout_summary">Устанавливает раскладку кнопок</string>
<string name="c_calc_haptic_feedback_title">Отклик на нажатие</string> <string name="c_calc_haptic_feedback_title">Отклик на нажатие</string>
<string name="c_calc_haptic_feedback_summary">Включает/выключает вибрацию по нажатию клавиши</string> <string name="c_calc_haptic_feedback_summary">Включает/выключает вибрацию по нажатию клавиши</string>
<string name="p_calc_haptic_feedback_strength_short">Маленькая</string> <string name="p_calc_haptic_feedback_strength_short">Маленькая</string>
<string name="p_calc_haptic_feedback_strength_middle">Средняя</string> <string name="p_calc_haptic_feedback_strength_middle">Средняя</string>
<string name="p_calc_haptic_feedback_strength_long">Большая</string> <string name="p_calc_haptic_feedback_strength_long">Большая</string>
<string name="p_calc_haptic_feedback_duration_title">Длительность отклика</string> <string name="p_calc_haptic_feedback_duration_title">Длительность отклика</string>
<string name="p_calc_haptic_feedback_duration_summary">Длительность вибрации по нажатию клавиши</string> <string name="p_calc_haptic_feedback_duration_summary">Длительность вибрации по нажатию клавиши</string>
<string name="c_empty_var_error">Невозможно создать пустую константу!</string> <string name="c_empty_var_error">Невозможно создать пустую константу!</string>
<string name="c_not_valid_result">Результат не допустим!</string> <string name="c_not_valid_result">Результат не допустим!</string>
<string name="c_plot_graph">График</string> <string name="c_plot_graph">График</string>
<string name="c_min_x_value">От</string> <string name="c_min_x_value">От</string>
<string name="c_max_x_value">До</string> <string name="c_max_x_value">До</string>
<string name="c_swipe_distance">Длина свайпа для клавиш</string> <string name="c_swipe_distance">Длина свайпа для клавиш</string>
<string name="c_swipe_distance_summary">Устанавливает длину свайпа для клавиш которые поддерживают дополнительные действия по свайпу</string> <string name="c_swipe_distance_summary">Устанавливает длину свайпа для клавиш которые поддерживают дополнительные действия по свайпу</string>
<string name="c_comment">Комментарий</string> <string name="c_comment">Комментарий</string>
<string name="c_history_item_saved">Сохранено</string> <string name="c_history_item_saved">Сохранено</string>
<string name="c_history_item_not_saved">Не сохранено</string> <string name="c_history_item_not_saved">Не сохранено</string>
<string name="c_expression_copied">Выражение скопировано в буфер!</string> <string name="c_expression_copied">Выражение скопировано в буфер!</string>
<string name="c_history_item_status">Статус: </string> <string name="c_history_item_status">Статус: </string>
<string name="c_history_item_comment">Комментарий: </string> <string name="c_history_item_comment">Комментарий: </string>
<string name="c_use">Использовать</string> <string name="c_use">Использовать</string>
<string name="c_use_short">Исп.</string> <string name="c_use_short">Исп.</string>
<string name="c_copy_expression">Копировать выражение</string> <string name="c_copy_expression">Копировать выражение</string>
<string name="c_copy_result">Копировать результат</string> <string name="c_copy_result">Копировать результат</string>
<string name="c_history_expression">Значение</string> <string name="c_history_expression">Значение</string>
<string name="c_history_item_already_saved">Сохранено (см. вкладку \'Сохранённая история\')</string> <string name="c_history_item_already_saved">Сохранено (см. вкладку \'Сохранённая история\')</string>
<string name="c_history_comment">Комментарий</string> <string name="c_history_comment">Комментарий</string>
<string name="c_save_history">Сохранить</string> <string name="c_save_history">Сохранить</string>
<string name="c_edit_history">Изменить</string> <string name="c_edit_history">Изменить</string>
<string name="c_edit">Изменить</string> <string name="c_edit">Изменить</string>
<string name="c_saved_history">Сохранённая история</string> <string name="c_saved_history">Сохранённая история</string>
<string name="c_history_already_saved">История уже была сохранена!</string> <string name="c_history_already_saved">История уже была сохранена!</string>
<string name="c_history_must_be_saved">История должна быть сохранена перед редактированием!</string> <string name="c_history_must_be_saved">История должна быть сохранена перед редактированием!</string>
<string name="c_history_was_removed">История успешно удалена!</string> <string name="c_history_was_removed">История успешно удалена!</string>
<string name="c_history_saved">История успешно сохранена!</string> <string name="c_history_saved">История успешно сохранена!</string>
<string name="c_copy_description">Копировать описание</string> <string name="c_copy_description">Копировать описание</string>
<string name="c_copy_value">Копировать значение</string> <string name="c_copy_value">Копировать значение</string>
<string name="c_first_start_text_title">Приветствие</string> <string name="c_first_start_text_title">Приветствие</string>
<string name="c_first_start_text">Спасибо за выбор Калькулятора++!\n\nКалькулятор++ - это мощный инструмент для проведения ежедневных расчётов.\n\nДля избавление от рекламы и поддержки проекта вы можете воспользоваться специальной опцией доступной из настроек приложения.\n\nПеред началом работы рекомендуется прочитать FAQ и подсказки для использования всех возможностей программы (нажмите Меню, затем Помощь)</string> <string name="c_first_start_text">Спасибо за выбор Калькулятора++!\n\nКалькулятор++ - это мощный инструмент для проведения ежедневных расчётов.\n\nДля избавление от рекламы и поддержки проекта вы можете воспользоваться специальной опцией доступной из настроек приложения.\n\nПеред началом работы рекомендуется прочитать FAQ и подсказки для использования всех возможностей программы (нажмите Меню, затем Помощь)</string>
<string name="c_calc_show_release_notes_title">Показывать примечания к выпуску</string> <string name="c_calc_show_release_notes_title">Показывать примечания к выпуску</string>
<string name="c_calc_show_release_notes_summary">Определяет показывать или нет всплывающее окно с примечаниями к выпуску после обновления новой версии</string> <string name="c_calc_show_release_notes_summary">Определяет показывать или нет всплывающее окно с примечаниями к выпуску после обновления новой версии</string>
<string name="c_calc_use_back_button_as_prev_summary">Устанавливает поведение по нажатию на кнопку Назад</string> <string name="c_calc_use_back_button_as_prev_summary">Устанавливает поведение по нажатию на кнопку Назад</string>
<string name="c_calc_use_back_button_as_prev_title">Использовать кнопку назад как назад по истории</string> <string name="c_calc_use_back_button_as_prev_title">Использовать кнопку назад как назад по истории</string>
<string name="c_clear_billing_info_summary">Информация о покупках будет обновлена с сервера</string> <string name="c_clear_billing_info_summary">Информация о покупках будет обновлена с сервера</string>
<string name="c_clear_billing_info_title">Очистить информация о покупках</string> <string name="c_clear_billing_info_title">Очистить информация о покупках</string>
<string name="c_warning">Внимание</string> <string name="c_warning">Внимание</string>
<string name="c_error">Ошибка</string> <string name="c_error">Ошибка</string>
<string name="c_billing_error">Биллинг не поддерживается: вы должны иметь Google Checkout аккаунт привязанный в вашему Google аккаунту и должны быть подключены к интернету.</string> <string name="c_billing_error">Биллинг не поддерживается: вы должны иметь Google Checkout аккаунт привязанный в вашему Google аккаунту и должны быть подключены к интернету.</string>
<string name="c_calc_ad_free_title">Поддержать проект</string> <string name="c_calc_ad_free_title">Поддержать проект</string>
<string name="c_calc_ad_free_summary">И убрать рекламу</string> <string name="c_calc_ad_free_summary">И убрать рекламу</string>
<string name="c_calc_already_purchased">Опция уже была куплена!</string> <string name="c_calc_already_purchased">Опция уже была куплена!</string>
<string name="c_calc_purchasing">Покупаем…</string> <string name="c_calc_purchasing">Покупаем…</string>
<string name="c_calc_clearing">Очищаем…</string> <string name="c_calc_clearing">Очищаем…</string>
<string name="c_feedback_title">Отзыв</string> <string name="c_feedback_title">Отзыв</string>
<string name="c_feedback_text">Вы используете Калькулятор++ некоторое время\n <string name="c_feedback_text">Вы используете Калькулятор++ некоторое время\n
и для нас важно узнать ваше мнение о приложении.\n\n и для нас важно узнать ваше мнение о приложении.\n\n
Пожалуйста, оцените Калькулятор++ \nна <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>,\n оставьте комментарий или \nобсудите приложение \nна нашем <a href="http://calculatorpp.com/forum/">форуме</a> Пожалуйста, оцените Калькулятор++ \nна <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>,\n оставьте комментарий или \nобсудите приложение \nв <a href="http://facebook.com/calculatorpp">Facebook</a>
</string> </string>
<string name="c_notespp_announce_text">Хорошие новости - я только что выпустил новое приложение под Андроид под названием <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">Заметки++</a>.\n <string name="c_notespp_announce_text">Хорошие новости - я только что выпустил новое приложение под Андроид под названием <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">Заметки++</a>.\n
Если вы заинтересованы в быстром и удобном способе оставлять заметки пройдите по <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">ссылке</a> и попробуйте Заметки++! Если вы заинтересованы в быстром и удобном способе оставлять заметки пройдите по <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">ссылке</a> и попробуйте Заметки++!
</string> </string>
<string name="c_angle_units_changed_to">Единицы измерения углов изменены на \'%s\'!</string> <string name="c_angle_units_changed_to">Единицы измерения углов изменены на \'%s\'!</string>
<string name="c_numeral_base_changed_to">Система счисления изменена на \'%s\'!</string> <string name="c_numeral_base_changed_to">Система счисления изменена на \'%s\'!</string>
<string name="c_conversion_tool">Перевод величин</string> <string name="c_conversion_tool">Перевод величин</string>
<string name="c_convert">Перевести в…</string> <string name="c_convert">Перевести в…</string>
<string name="convert_to_hex">Перевести в hex</string> <string name="convert_to_hex">Перевести в hex</string>
<string name="convert_to_bin">Перевести в bin</string> <string name="convert_to_bin">Перевести в bin</string>
<string name="convert_to_dec">Перевести в dec</string> <string name="convert_to_dec">Перевести в dec</string>
<string name="editor">Редактор</string> <string name="editor">Редактор</string>
<string name="result">Результат</string> <string name="result">Результат</string>
<string name="other">Другие</string> <string name="other">Другие</string>
<string name="derivatives">Производные/Интегралы</string> <string name="derivatives">Производные/Интегралы</string>
<string name="crashed">Калькулятор++ обнаружил ошибку…</string> <string name="crashed">Калькулятор++ обнаружил ошибку…</string>
<string name="crash_dialog_title">Отчёт об ошибке в Калькуляторе++</string> <string name="crash_dialog_title">Отчёт об ошибке в Калькуляторе++</string>
<string name="crash_dialog_text"> <string name="crash_dialog_text">
К сожалению, Калькулятор++ был остановлен ошибкой.\n\n К сожалению, Калькулятор++ был остановлен ошибкой.\n\n
Для того чтобы исправить, её нам необходима некоторая информация. Мы рекомендуем вам послать этот отчёт об ошибке (после нажатия кнопки \'Да\' вы увидите всю передаваемую информацию в новом окне).\n\n Для того чтобы исправить, её нам необходима некоторая информация. Мы рекомендуем вам послать этот отчёт об ошибке (после нажатия кнопки \'Да\' вы увидите всю передаваемую информацию в новом окне).\n\n
Хотите лы вы послать отчёт об ошибке? Хотите лы вы послать отчёт об ошибке?
</string> </string>
<string name="prefs_graph_scren_title">Настройки графика</string> <string name="prefs_graph_scren_title">Настройки графика</string>
<string name="prefs_graph_interpolate_function">Интерполировать график</string> <string name="prefs_graph_interpolate_function">Интерполировать график</string>
<string name="prefs_graph_interpolate_function_summary">Если включено - при построении графика будет использована интерполяция</string> <string name="prefs_graph_interpolate_function_summary">Если включено - при построении графика будет использована интерполяция</string>
<string name="prefs_graph_real_color_title">Цвет вещественной части графика</string> <string name="prefs_graph_real_color_title">Цвет вещественной части графика</string>
<string name="prefs_graph_real_color_summary">Устанавливает цвет вещественной части графика</string> <string name="prefs_graph_real_color_summary">Устанавливает цвет вещественной части графика</string>
<string name="prefs_graph_imag_color_title">Цвет мнимой части графика</string> <string name="prefs_graph_imag_color_title">Цвет мнимой части графика</string>
<string name="prefs_graph_imag_color_summary">Устанавливает цвет мнимой части графика</string> <string name="prefs_graph_imag_color_summary">Устанавливает цвет мнимой части графика</string>
</resources> </resources>

View File

@ -9,12 +9,11 @@
<string name="c_about">Про програму</string> <string name="c_about">Про програму</string>
<string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Створено serso aka se.solovyev</b>\n\n <string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Створено serso aka se.solovyev</b>\n\n
Сайт програми: <a href="http://calculatorpp.com/forum/">http://calculatorpp.com/forum/</a>\n\n Сайт програми: <a href="http://facebook.com/calculatorpp">http://facebook.com/calculatorpp</a>\n\n
Ця програма з відкритим вихідним кодом:\nйого можна знайти на \n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n Ця програма з відкритим вихідним кодом:\nйого можна знайти на \n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
За детальною інформацією, будь ласка, звертайтеся до автора на пошту\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a> За детальною інформацією, будь ласка, звертайтеся до автора на пошту\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>
\nабо відвідайте сайт\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n \nабо відвідайте сайт\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n
Якщо хочете підтримати проект фінансово,\nто ви можете купити спеціальну опцію у налаштуваннях програми\n Якщо хочете підтримати проект фінансово,\nто ви можете купити спеціальну опцію у налаштуваннях програми\n\n
переказати гроші через \n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
Якщо вам сподобалася програма,\n то оцініть її у 5 зірочок на\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n Якщо вам сподобалася програма,\n то оцініть її у 5 зірочок на\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n
Дякую усім, хто переклав Калькулятор++ на інші мови:\n Дякую усім, хто переклав Калькулятор++ на інші мови:\n
італійську - Gabriele Ravanetti\n італійську - Gabriele Ravanetti\n
@ -168,7 +167,7 @@
<string name="c_release_notes_for_27"> <string name="c_release_notes_for_27">
Від розробника:\n\n Від розробника:\n\n
Я радий повідомити Вас, що запустив форум для Калькулятор++: http://calculatorpp.com/forum/.\n Я радий повідомити Вас, що запустив форум для Калькулятор++: http://facebook.com/calculatorpp.\n
Тут ви можете знайти усю останню інформацію про програму, дізнатися про відомі проблеми та внести свої пропозиції.\n Тут ви можете знайти усю останню інформацію про програму, дізнатися про відомі проблеми та внести свої пропозиції.\n
Для входу ви можете скористатися обліковим записом соціальної мережі (Facebook, Twitter or Google are supported).\n\n Для входу ви можете скористатися обліковим записом соціальної мережі (Facebook, Twitter or Google are supported).\n\n
1. Додано кнопки управління масштабом на графіку\n 1. Додано кнопки управління масштабом на графіку\n

View File

@ -1,18 +0,0 @@
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<resources>
<string name="c_donate">Пожертви</string>
<string name="c_donate_text">Ви можете подякувати автору цієї програми по пошті\n\n
<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n\n
купити спеціальну опцію у налаштуваннях програми\n\n
пожертвувати гроші через \n\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
або оцінити її у 5 зірочок на \n\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>
</string>
</resources>

View File

@ -190,7 +190,7 @@
<string name="c_feedback_title">Зворотній зв’язок</string> <string name="c_feedback_title">Зворотній зв’язок</string>
<string name="c_feedback_text">Ви вже використовуєте Калькулятор++ деякий час \n <string name="c_feedback_text">Ви вже використовуєте Калькулятор++ деякий час \n
і для нас важливо знати вашу думку про програму.\n\n і для нас важливо знати вашу думку про програму.\n\n
Будь ласка, оцініть Калькулятор++ \nна <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>,\n залиште коментар або \nобговоріть програму \nна нашому <a href="http://calculatorpp.com/forum/">форумі</a> Будь ласка, оцініть Калькулятор++ \nна <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>,\n залиште коментар або \nобговоріть програму \nна <a href="http://facebook.com/calculatorpp">Facebook</a>
</string> </string>
<string name="c_angle_units_changed_to">Одиниці виміру кутів змінено на \'%s\'!</string> <string name="c_angle_units_changed_to">Одиниці виміру кутів змінено на \'%s\'!</string>

View File

@ -9,12 +9,11 @@
<string name="c_about">關於</string> <string name="c_about">關於</string>
<string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Created by serso aka se.solovyev</b>\n\n <string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Created by serso aka se.solovyev</b>\n\n
程式網站: <a href="http://calculatorpp.com/forum/">http://calculatorpp.com/forum/</a>\n\n 程式網站: <a href="http://facebook.com/calculatorpp">http://facebook.com/calculatorpp</a>\n\n
此程式為開放源碼軟體:\n原始碼位於\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n 此程式為開放源碼軟體:\n原始碼位於\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
如果您需要更多資訊\n請寄信至作者信箱\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a> 如果您需要更多資訊\n請寄信至作者信箱\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>
\n或是造訪\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n \n或是造訪\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n
如果您想要支持此專案\n\n您可以從程式設定頁面中購買一個特別的選項\n\n 如果您想要支持此專案\n\n您可以從程式設定頁面中購買一個特別的選項\n\n
捐款到\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
如果您喜歡這個程式\n請在 <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a> 中將它評等為五顆星\n\n 如果您喜歡這個程式\n請在 <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a> 中將它評等為五顆星\n\n
感謝以下 Calculator++ 的翻譯者:\n 感謝以下 Calculator++ 的翻譯者:\n
義大利文 - Gabriele Ravanetti\n 義大利文 - Gabriele Ravanetti\n
@ -166,7 +165,7 @@
<string name="c_release_notes_for_27"> <string name="c_release_notes_for_27">
來自開發者的訊息:\n\n 來自開發者的訊息:\n\n
我很高興可以通知您, 我創立了一個 Calculator++ 的論壇: http://calculatorpp.com/forum/.\n 我很高興可以通知您, 我創立了一個 Calculator++ 的論壇: http://facebook.com/calculatorpp.\n
您可以在這裡找到程式最新的資訊、檢查已知問題、提報錯誤和建議新功能.\n 您可以在這裡找到程式最新的資訊、檢查已知問題、提報錯誤和建議新功能.\n
您可以使用常用社群網站的帳號登入 (可用 Facebook, Twitter 和 Google).\n\n 您可以使用常用社群網站的帳號登入 (可用 Facebook, Twitter 和 Google).\n\n
1. 在繪圖介面上顯示縮放按鈕\n 1. 在繪圖介面上顯示縮放按鈕\n

View File

@ -1,18 +0,0 @@
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<resources>
<string name="c_donate">捐款</string>
<string name="c_donate_text">您可以向此程式的作者表達謝意, 透過 e-mail:\n\n
<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n\n
購買設定選單中的選項\n\n
透過以下連結捐款\n\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
或是將此程式評等為五顆星:\n\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>
</string>
</resources>

View File

@ -190,7 +190,7 @@
<string name="c_feedback_title">回饋</string> <string name="c_feedback_title">回饋</string>
<string name="c_feedback_text">您已使用 Calculator++ 一段時間了 \n <string name="c_feedback_text">您已使用 Calculator++ 一段時間了 \n
我們很希望可以瞭解您對這個軟體的意見.\n\n 我們很希望可以瞭解您對這個軟體的意見.\n\n
請在 <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a> 上評等 Calculator++,\n 留下評論訊息 \n或是在 <a href="http://calculatorpp.com/forum/">我們的論壇</a> 上討論. 請在 <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a> 上評等 Calculator++,\n 留下評論訊息 \n或是在 <a href="http://facebook.com/calculatorpp">Facebook</a> 上討論.
</string> </string>
<string name="c_notespp_announce_text">好消息 - 我剛發行了一個新的 Android 應用程式, 叫做 <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">Notes++</a>.\n <string name="c_notespp_announce_text">好消息 - 我剛發行了一個新的 Android 應用程式, 叫做 <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">Notes++</a>.\n

View File

@ -9,12 +9,11 @@
<string name="c_about">About</string> <string name="c_about">About</string>
<string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Created by serso aka se.solovyev</b>\n\n <string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Created by serso aka se.solovyev</b>\n\n
Application web site: <a href="http://calculatorpp.com/forum/">http://calculatorpp.com/forum/</a>\n\n Application web site: <a href="http://facebook.com/calculatorpp">http://facebook.com/calculatorpp</a>\n\n
This program is open source:\nall source code can be found on\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n This program is open source:\nall source code can be found on\n<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
For more information please\ncontact the author by email\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a> For more information please\ncontact the author by email\n<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>
\nor visit\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n \nor visit\n<a href="http://se.solovyev.org">http://se.solovyev.org</a>\n\n
If you want to support the project\n\nyou can buy a special option from application preferences\n\n If you want to support the project\n\nyou can buy a special option from application preferences\n\n
donate money via\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
If you like the application\nrank it with 5 stars in\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n If you like the application\nrank it with 5 stars in\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n
Thanks to people who translate Calculator++ in different languages:\n Thanks to people who translate Calculator++ in different languages:\n
Italian - Gabriele Ravanetti\n Italian - Gabriele Ravanetti\n
@ -168,7 +167,7 @@
<string name="c_release_notes_for_27"> <string name="c_release_notes_for_27">
Note from developer:\n\n Note from developer:\n\n
I\'m glad to inform you that I\'ve started a forum for Calculator++: http://calculatorpp.com/forum/.\n I\'m glad to inform you that I\'ve started a forum for Calculator++: http://facebook.com/calculatorpp.\n
Here you can find latest information about application, check for known issues, submit bugs or suggest new features.\n Here you can find latest information about application, check for known issues, submit bugs or suggest new features.\n
You can use your social account to login (Facebook, Twitter or Google are supported).\n\n You can use your social account to login (Facebook, Twitter or Google are supported).\n\n
1. Zoom buttons on graph plotter\n 1. Zoom buttons on graph plotter\n

View File

@ -1,18 +0,0 @@
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<resources>
<string name="c_donate">Donate</string>
<string name="c_donate_text">You can thank the author of this program by email\n\n
<a href="mailto:se.solovyev@gmail.com">se.solovyev@gmail.com</a>\n\n
buying a special option from application preferences\n\n
donating money via\n\n<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=se%2esolovyev%40gmail%2ecom&amp;lc=RU&amp;item_name=Android%20Calculator&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">http://paypal.com</a>\n\n
or setting 5 stars in\n\n<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>
</string>
</resources>

View File

@ -1,229 +1,229 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev. ~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com ~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org ~ or visit http://se.solovyev.org
--> -->
<resources> <resources>
<string name="c_app_name">Calculator++</string> <string name="c_app_name">Calculator++</string>
<string name="c_app_name_free">Calculator++ Free</string> <string name="c_app_name_free">Calculator++ Free</string>
<string name="c_app_icon_name">Calc++</string> <string name="c_app_icon_name">Calc++</string>
<string name="c_app_settings">Settings</string> <string name="c_app_settings">Settings</string>
<string name="c_syntax_error">Error</string> <string name="c_syntax_error">Error</string>
<string name="c_result_copied">Result copied to clipboard!</string> <string name="c_result_copied">Result copied to clipboard!</string>
<string name="c_settings">Settings</string> <string name="c_settings">Settings</string>
<string name="c_help">Help</string> <string name="c_help">Help</string>
<string name="c_vars_and_constants">Variables And Constants</string> <string name="c_vars_and_constants">Variables And Constants</string>
<!--PREFERENCE ACTIVITY--> <!--PREFERENCE ACTIVITY-->
<string name="c_prefs_main_category">Main settings</string> <string name="c_prefs_main_category">Main settings</string>
<string name="c_prefs_calculations_category">Calculation settings</string> <string name="c_prefs_calculations_category">Calculation settings</string>
<string name="c_prefs_appearance_category">Appearance settings</string> <string name="c_prefs_appearance_category">Appearance settings</string>
<string name="c_prefs_other_category">Other settings</string> <string name="c_prefs_other_category">Other settings</string>
<string name="c_prefs_drag_button_category">Drag buttons settings</string> <string name="c_prefs_drag_button_category">Drag buttons settings</string>
<string name="c_down">Down</string> <string name="c_down">Down</string>
<string name="c_up">Up</string> <string name="c_up">Up</string>
<string name="c_restart">Restart</string> <string name="c_restart">Restart</string>
<string name="c_undo">undo</string> <string name="c_undo">undo</string>
<string name="c_redo">redo</string> <string name="c_redo">redo</string>
<string name="c_clear">C</string> <string name="c_clear">C</string>
<string name="c_erase">clear</string> <string name="c_erase">clear</string>
<string name="c_paste">paste</string> <string name="c_paste">paste</string>
<string name="c_vars">vars</string> <string name="c_vars">vars</string>
<string name="c_copy">Copy</string> <string name="c_copy">Copy</string>
<string name="c_plot">Plot graph</string> <string name="c_plot">Plot graph</string>
<string name="c_graph">Graph</string> <string name="c_graph">Graph</string>
<string name="c_calc_color_display_title">Highlight expressions</string> <string name="c_calc_color_display_title">Highlight expressions</string>
<string name="c_calc_round_result_title">Round result</string> <string name="c_calc_round_result_title">Round result</string>
<string name="c_calc_round_result_summary">Toggles rounding of the result</string> <string name="c_calc_round_result_summary">Toggles rounding of the result</string>
<string name="c_calc_science_notation_title">Always scientific notation</string> <string name="c_calc_science_notation_title">Always scientific notation</string>
<string name="c_calc_science_notation_summary">If turned on forces to use only scientific notation of output (12.34E-12)</string> <string name="c_calc_science_notation_summary">If turned on forces to use only scientific notation of output (12.34E-12)</string>
<string name="p_calc_result_precision_title">Precision of result</string> <string name="p_calc_result_precision_title">Precision of result</string>
<string name="p_calc_max_calculation_time_title">Maximum calculation time</string> <string name="p_calc_max_calculation_time_title">Maximum calculation time</string>
<string name="p_calc_max_calculation_time_summary">If calculations exceed specified limit - calculator halts with error</string> <string name="p_calc_max_calculation_time_summary">If calculations exceed specified limit - calculator halts with error</string>
<string name="c_exit">Exit</string> <string name="c_exit">Exit</string>
<string name="c_add">Add</string> <string name="c_add">Add</string>
<string name="c_cancel">Cancel</string> <string name="c_cancel">Cancel</string>
<string name="c_save">Save</string> <string name="c_save">Save</string>
<string name="c_remove">Remove</string> <string name="c_remove">Remove</string>
<string name="c_yes">Yes</string> <string name="c_yes">Yes</string>
<string name="c_no">No</string> <string name="c_no">No</string>
<string name="c_var_removal_confirmation">Removal confirmation</string> <string name="c_var_removal_confirmation">Removal confirmation</string>
<string name="c_var_removal_confirmation_question">Do you really want to delete \'%s\' variable?</string> <string name="c_var_removal_confirmation_question">Do you really want to delete \'%s\' variable?</string>
<string name="c_var_name">Name</string> <string name="c_var_name">Name</string>
<string name="c_var_value">Value</string> <string name="c_var_value">Value</string>
<string name="c_var_description">Description</string> <string name="c_var_description">Description</string>
<string name="c_var_create_var">Create variable</string> <string name="c_var_create_var">Create variable</string>
<string name="c_var_edit_var">Edit variable</string> <string name="c_var_edit_var">Edit variable</string>
<string name="c_value.is.not.a.number">Value must be either number or empty!</string> <string name="c_value.is.not.a.number">Value must be either number or empty!</string>
<string name="c_var.name.clashes">Variable name clashes with function name!</string> <string name="c_var.name.clashes">Variable name clashes with function name!</string>
<string name="c_var.already.exists">Variable with same name already exists!</string> <string name="c_var.already.exists">Variable with same name already exists!</string>
<string name="c_name.is.not.valid">Name of constant is not valid: name must start with letter, can contain letters, digits and underscore.</string> <string name="c_name.is.not.valid">Name of constant is not valid: name must start with letter, can contain letters, digits and underscore.</string>
<string name="c_sys.var.cannot.be.changed">System variable cannot be changed!</string> <string name="c_sys.var.cannot.be.changed">System variable cannot be changed!</string>
<string name="c_calc_editor_hint">Enter new expression</string> <string name="c_calc_editor_hint">Enter new expression</string>
<string name="c_press_to_copy">Press to copy</string> <string name="c_press_to_copy">Press to copy</string>
<string name="c_continue">Continue</string> <string name="c_continue">Continue</string>
<string name="c_history">History</string> <string name="c_history">History</string>
<string name="c_history_button">M</string> <string name="c_history_button">M</string>
<string name="c_history_is_empty">History is empty!</string> <string name="c_history_is_empty">History is empty!</string>
<string name="c_app_history">History</string> <string name="c_app_history">History</string>
<string name="c_char_is_not_accepted">Character \'%s\' is not accepted in variable name!</string> <string name="c_char_is_not_accepted">Character \'%s\' is not accepted in variable name!</string>
<string name="c_calc_angle_units">Angle Units</string> <string name="c_calc_angle_units">Angle Units</string>
<string name="p_deg">Degrees</string> <string name="p_deg">Degrees</string>
<string name="p_rad">Radians</string> <string name="p_rad">Radians</string>
<string name="p_grad">Gradians</string> <string name="p_grad">Gradians</string>
<string name="p_turns">Turns</string> <string name="p_turns">Turns</string>
<string name="c_angle_units_summary">Defines the default units for angles.</string> <string name="c_angle_units_summary">Defines the default units for angles.</string>
<string name="c_calc_numeral_bases">Numeral systems</string> <string name="c_calc_numeral_bases">Numeral systems</string>
<string name="c_numeral_bases_summary">Defines the default numeral system for all input numbers.</string> <string name="c_numeral_bases_summary">Defines the default numeral system for all input numbers.</string>
<string name="p_dec">Decimal</string> <string name="p_dec">Decimal</string>
<string name="p_hex">Hexadecimal</string> <string name="p_hex">Hexadecimal</string>
<string name="p_oct">Octal</string> <string name="p_oct">Octal</string>
<string name="p_bin">Binary</string> <string name="p_bin">Binary</string>
<string name="c_calc_theme">Theme</string> <string name="c_calc_theme">Theme</string>
<string name="p_default_theme">Grey</string> <string name="p_default_theme">Grey</string>
<string name="p_violet_theme">Violet</string> <string name="p_violet_theme">Violet</string>
<string name="p_light_blue_theme">Light Blue</string> <string name="p_light_blue_theme">Light Blue</string>
<string name="p_metro_blue_theme">Metro Blue (Default)</string> <string name="p_metro_blue_theme">Metro Blue (Default)</string>
<string name="p_metro_green_theme">Metro Green</string> <string name="p_metro_green_theme">Metro Green</string>
<string name="p_metro_purple_theme">Metro Purple</string> <string name="p_metro_purple_theme">Metro Purple</string>
<string name="c_calc_result_precision_summary">Precision of result value (all calculations are done with maximum precision regardless of the value of this option)</string> <string name="c_calc_result_precision_summary">Precision of result value (all calculations are done with maximum precision regardless of the value of this option)</string>
<string name="c_calc_color_display_summary">Toggles colouring and styling in calculator editor</string> <string name="c_calc_color_display_summary">Toggles colouring and styling in calculator editor</string>
<string name="c_calc_theme_summary">Sets the theme for calculator</string> <string name="c_calc_theme_summary">Sets the theme for calculator</string>
<string name="c_clear_history">Clear history</string> <string name="c_clear_history">Clear history</string>
<string name="c_simplify_instead_of_numeric">Next constants are undefined: {0}!</string> <string name="c_simplify_instead_of_numeric">Next constants are undefined: {0}!</string>
<string name="p_grouping_separator_no">No grouping separator</string> <string name="p_grouping_separator_no">No grouping separator</string>
<string name="p_grouping_separator_apostrophe">Apostrophe (\')</string> <string name="p_grouping_separator_apostrophe">Apostrophe (\')</string>
<string name="p_grouping_separator_space">Space ( )</string> <string name="p_grouping_separator_space">Space ( )</string>
<string name="c_calc_grouping_separator">Grouping separator</string> <string name="c_calc_grouping_separator">Grouping separator</string>
<string name="c_calc_grouping_separator_summary">Sets grouping separator</string> <string name="c_calc_grouping_separator_summary">Sets grouping separator</string>
<string name="c_calc_multiplication_sign">Multiplication sign</string> <string name="c_calc_multiplication_sign">Multiplication sign</string>
<string name="c_calc_multiplication_sign_summary">Sets multiplication sign</string> <string name="c_calc_multiplication_sign_summary">Sets multiplication sign</string>
<string name="c_calc_layout">Layout</string> <string name="c_calc_layout">Layout</string>
<string name="p_layout_cellphone">Scientific (cellphone)</string> <string name="p_layout_cellphone">Scientific (cellphone)</string>
<string name="p_layout_calculator">Scientific</string> <string name="p_layout_calculator">Scientific</string>
<string name="p_layout_simple">Simple</string> <string name="p_layout_simple">Simple</string>
<string name="c_calc_layout_summary">Sets layout of buttons</string> <string name="c_calc_layout_summary">Sets layout of buttons</string>
<string name="c_calc_haptic_feedback_title">Haptic feedback</string> <string name="c_calc_haptic_feedback_title">Haptic feedback</string>
<string name="c_calc_haptic_feedback_summary">Toggles vibration on button click</string> <string name="c_calc_haptic_feedback_summary">Toggles vibration on button click</string>
<string name="p_calc_haptic_feedback_strength_short">Short</string> <string name="p_calc_haptic_feedback_strength_short">Short</string>
<string name="p_calc_haptic_feedback_strength_middle">Middle</string> <string name="p_calc_haptic_feedback_strength_middle">Middle</string>
<string name="p_calc_haptic_feedback_strength_long">Long</string> <string name="p_calc_haptic_feedback_strength_long">Long</string>
<string name="p_calc_haptic_feedback_duration_title">Haptic feedback duration</string> <string name="p_calc_haptic_feedback_duration_title">Haptic feedback duration</string>
<string name="p_calc_haptic_feedback_duration_summary">Duration vibration on button click</string> <string name="p_calc_haptic_feedback_duration_summary">Duration vibration on button click</string>
<string name="c_empty_var_error">Unable to create empty constant!</string> <string name="c_empty_var_error">Unable to create empty constant!</string>
<string name="c_not_valid_result">Current result is not valid!</string> <string name="c_not_valid_result">Current result is not valid!</string>
<string name="c_plot_graph">Graph</string> <string name="c_plot_graph">Graph</string>
<string name="c_min_x_value">From</string> <string name="c_min_x_value">From</string>
<string name="c_max_x_value">To</string> <string name="c_max_x_value">To</string>
<string name="c_swipe_distance">Swipe distance for buttons</string> <string name="c_swipe_distance">Swipe distance for buttons</string>
<string name="c_swipe_distance_summary">Sets swipe distance for buttons that support additional swipe actions</string> <string name="c_swipe_distance_summary">Sets swipe distance for buttons that support additional swipe actions</string>
<string name="c_comment">Comment</string> <string name="c_comment">Comment</string>
<string name="c_history_item_saved">Saved</string> <string name="c_history_item_saved">Saved</string>
<string name="c_history_item_not_saved">Not saved</string> <string name="c_history_item_not_saved">Not saved</string>
<string name="c_expression_copied">Expression copied to the clipboard!</string> <string name="c_expression_copied">Expression copied to the clipboard!</string>
<string name="c_history_item_status">Status: </string> <string name="c_history_item_status">Status: </string>
<string name="c_history_item_comment">Comment: </string> <string name="c_history_item_comment">Comment: </string>
<string name="c_use">Use</string> <string name="c_use">Use</string>
<string name="c_use_short">Use</string> <string name="c_use_short">Use</string>
<string name="c_copy_expression">Copy expression</string> <string name="c_copy_expression">Copy expression</string>
<string name="c_copy_result">Copy result</string> <string name="c_copy_result">Copy result</string>
<string name="c_history_expression">Value</string> <string name="c_history_expression">Value</string>
<string name="c_history_item_already_saved">Saved (see \'Saved history\' tab)</string> <string name="c_history_item_already_saved">Saved (see \'Saved history\' tab)</string>
<string name="c_history_comment">Comment</string> <string name="c_history_comment">Comment</string>
<string name="c_save_history">Save history</string> <string name="c_save_history">Save history</string>
<string name="c_edit_history">Modify history</string> <string name="c_edit_history">Modify history</string>
<string name="c_edit">Modify</string> <string name="c_edit">Modify</string>
<string name="c_saved_history">Saved history</string> <string name="c_saved_history">Saved history</string>
<string name="c_history_already_saved">History was already saved!</string> <string name="c_history_already_saved">History was already saved!</string>
<string name="c_history_must_be_saved">History must be saved before editing!</string> <string name="c_history_must_be_saved">History must be saved before editing!</string>
<string name="c_history_was_removed">History was successfully removed!</string> <string name="c_history_was_removed">History was successfully removed!</string>
<string name="c_history_saved">History was successfully saved!</string> <string name="c_history_saved">History was successfully saved!</string>
<string name="c_copy_description">Copy description</string> <string name="c_copy_description">Copy description</string>
<string name="c_copy_value">Copy value</string> <string name="c_copy_value">Copy value</string>
<string name="c_first_start_text">Thank you for choosing Calculator++!\n\nCalculator++ is a powerful tool for making everyday calculations.\n\nTo remove the ads and support the project you can use special option from application settings.\n\nIt\'s highly recommended to read the FAQ and hints before the work to use all the features of application (press Menu button and then Help)</string> <string name="c_first_start_text">Thank you for choosing Calculator++!\n\nCalculator++ is a powerful tool for making everyday calculations.\n\nTo remove the ads and support the project you can use special option from application settings.\n\nIt\'s highly recommended to read the FAQ and hints before the work to use all the features of application (press Menu button and then Help)</string>
<string name="c_first_start_text_title">Welcome</string> <string name="c_first_start_text_title">Welcome</string>
<string name="c_calc_show_release_notes_title">Show release notes</string> <string name="c_calc_show_release_notes_title">Show release notes</string>
<string name="c_calc_show_release_notes_summary">Defines if release notes popup window should appear after update to the new version</string> <string name="c_calc_show_release_notes_summary">Defines if release notes popup window should appear after update to the new version</string>
<string name="c_calc_use_back_button_as_prev_summary">Defines the behaviour of the Back button</string> <string name="c_calc_use_back_button_as_prev_summary">Defines the behaviour of the Back button</string>
<string name="c_calc_use_back_button_as_prev_title">Use Back button as history prev</string> <string name="c_calc_use_back_button_as_prev_title">Use Back button as history prev</string>
<string name="c_clear_billing_info_summary">Billing information will be reloaded from the server</string> <string name="c_clear_billing_info_summary">Billing information will be reloaded from the server</string>
<string name="c_clear_billing_info_title">Clear billing information</string> <string name="c_clear_billing_info_title">Clear billing information</string>
<string name="c_warning">Warning</string> <string name="c_warning">Warning</string>
<string name="c_error">Error</string> <string name="c_error">Error</string>
<string name="c_billing_error">Billing is not supported: you must have Google Checkout account linked to your Google account and must be connected to the internet.</string> <string name="c_billing_error">Billing is not supported: you must have Google Checkout account linked to your Google account and must be connected to the internet.</string>
<string name="c_calc_ad_free_title">Support the project</string> <string name="c_calc_ad_free_title">Support the project</string>
<string name="c_calc_ad_free_summary">And remove the advertisement</string> <string name="c_calc_ad_free_summary">And remove the advertisement</string>
<string name="c_calc_already_purchased">Ad free option has been already purchased!</string> <string name="c_calc_already_purchased">Ad free option has been already purchased!</string>
<string name="c_calc_purchasing">Purchasing…</string> <string name="c_calc_purchasing">Purchasing…</string>
<string name="c_calc_clearing">Clearing…</string> <string name="c_calc_clearing">Clearing…</string>
<string name="c_feedback_title">Feedback</string> <string name="c_feedback_title">Feedback</string>
<string name="c_feedback_text">You have been using Calculator++ for some time \n <string name="c_feedback_text">You have been using Calculator++ for some time \n
and it\'s important for us to know your opinion about application.\n\n and it\'s important for us to know your opinion about application.\n\n
Please rate Calculator++ \non <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>,\n leave a comment or \ndiscuss application \non our <a href="http://calculatorpp.com/forum/">forum</a> Please rate Calculator++ \non <a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>,\n leave a comment or \ndiscuss application \non <a href="http://facebook.com/calculatorpp">Facebook</a>
</string> </string>
<string name="c_notespp_announce_text">Good news - I just released new application for Android called <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">Notes++</a>.\n <string name="c_notespp_announce_text">Good news - I just released new application for Android called <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">Notes++</a>.\n
If you\'re interesting in fast and easy way of making notes please follow the <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">link</a> and try Notes++! If you\'re interesting in fast and easy way of making notes please follow the <a href="https://play.google.com/store/apps/details?id=org.solovyev.android.notes">link</a> and try Notes++!
</string> </string>
<string name="c_angle_units_changed_to">Angle units changed to \'%s\'!</string> <string name="c_angle_units_changed_to">Angle units changed to \'%s\'!</string>
<string name="c_numeral_base_changed_to">Numeral base changed to \'%s\'!</string> <string name="c_numeral_base_changed_to">Numeral base changed to \'%s\'!</string>
<string name="c_conversion_tool">Conversion tool</string> <string name="c_conversion_tool">Conversion tool</string>
<string name="c_convert">Convert to…</string> <string name="c_convert">Convert to…</string>
<string name="convert_to_hex">Convert to hex</string> <string name="convert_to_hex">Convert to hex</string>
<string name="convert_to_bin">Convert to bin</string> <string name="convert_to_bin">Convert to bin</string>
<string name="convert_to_dec">Convert to dec</string> <string name="convert_to_dec">Convert to dec</string>
<string name="editor">Editor</string> <string name="editor">Editor</string>
<string name="result">Result</string> <string name="result">Result</string>
<string name="other">Other</string> <string name="other">Other</string>
<string name="derivatives">Derivatives/Integrals</string> <string name="derivatives">Derivatives/Integrals</string>
<string name="crashed">Calculator++ has crashed…</string> <string name="crashed">Calculator++ has crashed…</string>
<string name="crash_dialog_title">Calculator++ crash report</string> <string name="crash_dialog_title">Calculator++ crash report</string>
<string name="crash_dialog_text"> <string name="crash_dialog_text">
Unfortunately, Calculator++ has crashed.\n\n Unfortunately, Calculator++ has crashed.\n\n
In order to fix the problem we need some information about it. It\'s highly recommended to send crash report via email (after pressing \'Ok\' button you will see all sent data in the new window).\n\n In order to fix the problem we need some information about it. It\'s highly recommended to send crash report via email (after pressing \'Ok\' button you will see all sent data in the new window).\n\n
Do you want to send crash report? Do you want to send crash report?
</string> </string>
<string name="prefs_graph_scren_title">Graph preferences</string> <string name="prefs_graph_scren_title">Graph preferences</string>
<string name="prefs_graph_interpolate_function">Interpolate function\'s graph</string> <string name="prefs_graph_interpolate_function">Interpolate function\'s graph</string>
<string name="prefs_graph_interpolate_function_summary">If checked cubic interpolation will be used in function graph drawing</string> <string name="prefs_graph_interpolate_function_summary">If checked cubic interpolation will be used in function graph drawing</string>
<string name="prefs_graph_real_color_title">Color of real part of functions graph</string> <string name="prefs_graph_real_color_title">Color of real part of functions graph</string>
<string name="prefs_graph_real_color_summary">Sets color of real part functions graph</string> <string name="prefs_graph_real_color_summary">Sets color of real part functions graph</string>
<string name="prefs_graph_imag_color_title">Color of imaginary part of functions graph</string> <string name="prefs_graph_imag_color_title">Color of imaginary part of functions graph</string>
<string name="prefs_graph_imag_color_summary">Sets color of imaginary part functions graph</string> <string name="prefs_graph_imag_color_summary">Sets color of imaginary part functions graph</string>
</resources> </resources>

View File

@ -1,200 +1,167 @@
/* /*
* Copyright (c) 2009-2011. Created by serso aka se.solovyev. * Copyright (c) 2009-2011. Created by serso aka se.solovyev.
* For more information, please, contact se.solovyev@gmail.com * For more information, please, contact se.solovyev@gmail.com
*/ */
package org.solovyev.android.calculator; package org.solovyev.android.calculator;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
import android.os.Handler; import android.os.Handler;
import android.text.Editable; import android.text.Html;
import android.text.Html; import android.util.AttributeSet;
import android.text.TextWatcher; import org.jetbrains.annotations.NotNull;
import android.util.AttributeSet; import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull; import org.solovyev.android.calculator.text.TextProcessor;
import org.jetbrains.annotations.Nullable; import org.solovyev.android.calculator.view.TextHighlighter;
import org.solovyev.android.calculator.text.TextProcessor; import org.solovyev.android.view.AutoResizeTextView;
import org.solovyev.android.calculator.view.TextHighlighter;
import org.solovyev.android.view.AutoResizeTextView; /**
import org.solovyev.common.text.StringUtils; * User: serso
* Date: 9/17/11
/** * Time: 10:58 PM
* User: serso */
* Date: 9/17/11 public class AndroidCalculatorDisplayView extends AutoResizeTextView implements CalculatorDisplayView {
* Time: 10:58 PM
*/ /*
public class AndroidCalculatorDisplayView extends AutoResizeTextView implements CalculatorDisplayView { **********************************************************************
*
/* * STATIC FIELDS
********************************************************************** *
* **********************************************************************
* STATIC FIELDS */
*
********************************************************************** @NotNull
*/ private final static TextProcessor<TextHighlighter.Result, String> textHighlighter = new TextHighlighter(Color.WHITE, false);
@NotNull /*
private final static TextProcessor<TextHighlighter.Result, String> textHighlighter = new TextHighlighter(Color.WHITE, false); **********************************************************************
*
/* * FIELDS
********************************************************************** *
* **********************************************************************
* FIELDS */
*
********************************************************************** @NotNull
*/ private volatile CalculatorDisplayViewState state = CalculatorDisplayViewStateImpl.newDefaultInstance();
@NotNull private volatile boolean viewStateChange = false;
private volatile CalculatorDisplayViewState state = CalculatorDisplayViewStateImpl.newDefaultInstance();
@NotNull
private volatile boolean viewStateChange = false; private final Object lock = new Object();
@NotNull @NotNull
private final Object lock = new Object(); private final Handler handler = new Handler();
@NotNull private volatile boolean initialized = false;
private final Handler handler = new Handler();
/*
private volatile boolean initialized = false; **********************************************************************
*
/* * CONSTRUCTORS
********************************************************************** *
* **********************************************************************
* CONSTRUCTORS */
*
********************************************************************** public AndroidCalculatorDisplayView(Context context) {
*/ super(context);
}
public AndroidCalculatorDisplayView(Context context) {
super(context); public AndroidCalculatorDisplayView(Context context, AttributeSet attrs) {
this.addTextChangedListener(new TextWatcherImpl()); super(context, attrs);
}
}
public AndroidCalculatorDisplayView(Context context, AttributeSet attrs) {
super(context, attrs); public AndroidCalculatorDisplayView(Context context, AttributeSet attrs, int defStyle) {
this.addTextChangedListener(new TextWatcherImpl()); super(context, attrs, defStyle);
}
}
/*
public AndroidCalculatorDisplayView(Context context, AttributeSet attrs, int defStyle) { **********************************************************************
super(context, attrs, defStyle); *
this.addTextChangedListener(new TextWatcherImpl()); * METHODS
} *
**********************************************************************
/* */
**********************************************************************
*
* METHODS @Override
* public void setState(@NotNull final CalculatorDisplayViewState state) {
********************************************************************** final CharSequence text = prepareText(state.getStringResult(), state.isValid());
*/
handler.post(new Runnable() {
@Override
@Override public void run() {
public void setState(@NotNull final CalculatorDisplayViewState state) { synchronized (lock) {
final CharSequence text = prepareText(state.getStringResult(), state.isValid()); try {
viewStateChange = true;
handler.post(new Runnable() {
@Override AndroidCalculatorDisplayView.this.state = state;
public void run() { if (state.isValid()) {
synchronized (lock) { setTextColor(getResources().getColor(R.color.default_text_color));
try { setText(text);
viewStateChange = true;
adjustTextSize();
AndroidCalculatorDisplayView.this.state = state;
if (state.isValid()) { } else {
setTextColor(getResources().getColor(R.color.default_text_color)); // update text in order to get rid of HTML tags
setText(text); setText(getText().toString());
setTextColor(getResources().getColor(R.color.display_error_text_color));
adjustTextSize();
// error messages are never shown -> just greyed out text (error message will be shown on click)
} else { //setText(state.getErrorMessage());
// update text in order to get rid of HTML tags //redraw();
setText(getText().toString()); }
setTextColor(getResources().getColor(R.color.display_error_text_color)); } finally {
viewStateChange = false;
// error messages are never shown -> just greyed out text (error message will be shown on click) }
//setText(state.getErrorMessage()); }
//redraw(); }
} });
} finally { }
viewStateChange = false;
} @NotNull
} @Override
} public CalculatorDisplayViewState getState() {
}); synchronized (lock) {
} return this.state;
}
@NotNull }
@Override
public CalculatorDisplayViewState getState() { @Nullable
synchronized (lock) { private static CharSequence prepareText(@Nullable String text, boolean valid) {
return this.state; CharSequence result;
}
} if (valid && text != null) {
@Nullable //Log.d(this.getClass().getName(), text);
private static CharSequence prepareText(@Nullable String text, boolean valid) {
CharSequence result; try {
final TextHighlighter.Result processedText = textHighlighter.process(text);
if (valid && text != null) { text = processedText.toString();
result = Html.fromHtml(text);
//Log.d(this.getClass().getName(), text); } catch (CalculatorParseException e) {
result = text;
try { }
final TextHighlighter.Result processedText = textHighlighter.process(text); } else {
text = processedText.toString(); result = text;
result = Html.fromHtml(text); }
} catch (CalculatorParseException e) {
result = text; return result;
} }
} else {
result = text; private void adjustTextSize() {
} // todo serso: think where to move it (keep in mind org.solovyev.android.view.AutoResizeTextView.resetTextSize())
setAddEllipsis(false);
return result; setMinTextSize(10);
} resizeText();
}
private void adjustTextSize() {
// todo serso: think where to move it (keep in mind org.solovyev.android.view.AutoResizeTextView.resetTextSize()) public synchronized void init(@NotNull Context context) {
setAddEllipsis(false); if (!initialized) {
setMinTextSize(10); this.setOnClickListener(new CalculatorDisplayOnClickListener(context));
resizeText();
} this.initialized = true;
}
}
public void handleTextChange(Editable s) { }
synchronized (lock) {
if (!viewStateChange) {
// external text change => need to notify display
// todo serso: implement
}
}
}
public synchronized void init(@NotNull Context context) {
if (!initialized) {
this.setOnClickListener(new CalculatorDisplayOnClickListener(context));
this.initialized = true;
}
}
private final class TextWatcherImpl implements TextWatcher {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
handleTextChange(s);
}
}
}

View File

@ -130,10 +130,6 @@ public class CalculatorActivity extends SherlockFragmentActivity implements Shar
dialogShown = showSpecialWindow(preferences, CalculatorPreferences.Gui.feedbackWindowShown, R.layout.feedback, R.id.feedbackText, context); dialogShown = showSpecialWindow(preferences, CalculatorPreferences.Gui.feedbackWindowShown, R.layout.feedback, R.id.feedbackText, context);
} }
} }
if (!dialogShown) {
dialogShown = showSpecialWindow(preferences, CalculatorPreferences.Gui.notesppAnnounceShown, R.layout.notespp_announce, R.id.notespp_announce, context);
}
} }
private static boolean showSpecialWindow(@NotNull SharedPreferences preferences, @NotNull Preference<Boolean> specialWindowShownPref, int layoutId, int textViewId, @NotNull Context context) { private static boolean showSpecialWindow(@NotNull SharedPreferences preferences, @NotNull Preference<Boolean> specialWindowShownPref, int layoutId, int textViewId, @NotNull Context context) {
@ -316,8 +312,8 @@ public class CalculatorActivity extends SherlockFragmentActivity implements Shar
} }
@SuppressWarnings({"UnusedDeclaration"}) @SuppressWarnings({"UnusedDeclaration"})
public void donateButtonClickHandler(@NotNull View v) { public void likeButtonClickHandler(@NotNull View v) {
CalculatorApplication.showDonationDialog(this); CalculatorApplication.likeButtonPressed(this);
} }
} }

View File

@ -1,16 +1,10 @@
package org.solovyev.android.calculator; package org.solovyev.android.calculator;
import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.net.Uri; import android.net.Uri;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import net.robotmedia.billing.BillingController; import net.robotmedia.billing.BillingController;
import org.acra.ACRA; import org.acra.ACRA;
import org.acra.ReportingInteractionMode; import org.acra.ReportingInteractionMode;
@ -25,6 +19,8 @@ import org.solovyev.android.calculator.model.AndroidCalculatorEngine;
* Date: 12/1/11 * Date: 12/1/11
* Time: 1:21 PM * Time: 1:21 PM
*/ */
/*@ReportsCrashes(formKey = "dEhDaW1nZU1qcFdsVUpiSnhON0c0ZHc6MQ",
mode = ReportingInteractionMode.TOAST)*/
@ReportsCrashes(formKey = "", @ReportsCrashes(formKey = "",
mailTo = "se.solovyev+programming+calculatorpp+crashes@gmail.com", mailTo = "se.solovyev+programming+calculatorpp+crashes@gmail.com",
mode = ReportingInteractionMode.DIALOG, mode = ReportingInteractionMode.DIALOG,
@ -33,7 +29,15 @@ import org.solovyev.android.calculator.model.AndroidCalculatorEngine;
resDialogText = R.string.crash_dialog_text) resDialogText = R.string.crash_dialog_text)
public class CalculatorApplication extends android.app.Application { public class CalculatorApplication extends android.app.Application {
private static final String paypalDonateUrl = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=se%2esolovyev%40gmail%2ecom&lc=RU&item_name=Android%20Calculator&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"; /*
**********************************************************************
*
* CONSTANTS
*
**********************************************************************
*/
public static final String FACEBOOK_APP_URL = "http://www.facebook.com/calculatorpp";
public static final String AD_FREE_PRODUCT_ID = "ad_free"; public static final String AD_FREE_PRODUCT_ID = "ad_free";
public static final String AD_FREE_P_KEY = "org.solovyev.android.calculator_ad_free"; public static final String AD_FREE_P_KEY = "org.solovyev.android.calculator_ad_free";
@ -43,14 +47,25 @@ public class CalculatorApplication extends android.app.Application {
@NotNull @NotNull
private static CalculatorApplication instance; private static CalculatorApplication instance;
/*
**********************************************************************
*
* CONSTRUCTORS
*
**********************************************************************
*/
public CalculatorApplication() { public CalculatorApplication() {
instance = this; instance = this;
} }
@NotNull /*
public static CalculatorApplication getInstance() { **********************************************************************
return instance; *
} * METHODS
*
**********************************************************************
*/
@Override @Override
public void onCreate() { public void onCreate() {
@ -86,11 +101,10 @@ public class CalculatorApplication extends android.app.Application {
} }
}); });
BillingController.registerObserver(new CalculatorBillingObserver(this)); BillingController.registerObserver(new CalculatorBillingObserver(this));
// init billing controller // init billing controller
BillingController.checkBillingSupported(this); BillingController.checkBillingSupported(this);
} }
private void setTheme(@NotNull SharedPreferences preferences) { private void setTheme(@NotNull SharedPreferences preferences) {
@ -98,29 +112,6 @@ public class CalculatorApplication extends android.app.Application {
setTheme(theme.getThemeId()); setTheme(theme.getThemeId());
} }
public static void showDonationDialog(@NotNull final Context context) {
final LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
final View view = layoutInflater.inflate(R.layout.donate, null);
final TextView donate = (TextView) view.findViewById(R.id.donateText);
donate.setMovementMethod(LinkMovementMethod.getInstance());
final AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setCancelable(true)
.setNegativeButton(R.string.c_cancel, null)
.setPositiveButton(R.string.c_donate, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
final Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(paypalDonateUrl));
context.startActivity(i);
}
})
.setView(view);
builder.create().show();
}
@NotNull @NotNull
public CalculatorActivityHelper createActivityHelper(int layoutResId, @NotNull String logTag) { public CalculatorActivityHelper createActivityHelper(int layoutResId, @NotNull String logTag) {
return new CalculatorActivityHelperImpl(layoutResId, logTag); return new CalculatorActivityHelperImpl(layoutResId, logTag);
@ -140,4 +131,20 @@ public class CalculatorApplication extends android.app.Application {
return new CalculatorFragmentHelperImpl(layoutId, titleResId, listenersOnCreate); return new CalculatorFragmentHelperImpl(layoutId, titleResId, listenersOnCreate);
} }
/*
**********************************************************************
*
* STATIC
*
**********************************************************************
*/
@NotNull
public static CalculatorApplication getInstance() {
return instance;
}
public static void likeButtonPressed(@NotNull final Context context) {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(FACEBOOK_APP_URL)));
}
} }

View File

@ -0,0 +1,50 @@
package org.solovyev.android.calculator;
import android.app.PendingIntent;
import android.util.Log;
import net.robotmedia.billing.IBillingObserver;
import net.robotmedia.billing.ResponseCode;
import net.robotmedia.billing.model.Transaction;
import org.jetbrains.annotations.NotNull;
/**
* User: serso
* Date: 10/10/12
* Time: 12:27 AM
*/
class LoggingBillingObserver implements IBillingObserver {
@Override
public void onCheckBillingSupportedResponse(boolean supported) {
Log.d("CalculatorppBilling", "onCheckBillingSupportedResponse");
}
@Override
public void onPurchaseIntentOK(@NotNull String productId, @NotNull PendingIntent purchaseIntent) {
Log.d("CalculatorppBilling", "onPurchaseIntentOK");
}
@Override
public void onPurchaseIntentFailure(@NotNull String productId, @NotNull ResponseCode responseCode) {
Log.d("CalculatorppBilling", "onPurchaseIntentFailure");
}
@Override
public void onPurchaseStateChanged(@NotNull String productId, @NotNull Transaction.PurchaseState state) {
Log.d("CalculatorppBilling", "onPurchaseStateChanged");
}
@Override
public void onRequestPurchaseResponse(@NotNull String productId, @NotNull ResponseCode response) {
Log.d("CalculatorppBilling", "onRequestPurchaseResponse");
}
@Override
public void onTransactionsRestored() {
Log.d("CalculatorppBilling", "onTransactionsRestored");
}
@Override
public void onErrorRestoreTransactions(@NotNull ResponseCode responseCode) {
Log.d("CalculatorppBilling", "onErrorRestoreTransactions");
}
}

View File

@ -87,7 +87,7 @@ public class CalculatorPlotFragment extends CalculatorFragment implements Calcul
private Input input; private Input input;
@NotNull @NotNull
private CalculatorEventData lastCalculatorEventData = CalculatorUtils.createFirstEventDataId(); private final CalculatorEventHolder lastEventHolder = new CalculatorEventHolder(CalculatorUtils.createFirstEventDataId());
private int bgColor; private int bgColor;
@ -355,13 +355,12 @@ public class CalculatorPlotFragment extends CalculatorFragment implements Calcul
public void onCalculatorEvent(@NotNull CalculatorEventData calculatorEventData, @NotNull CalculatorEventType calculatorEventType, @Nullable final Object data) { public void onCalculatorEvent(@NotNull CalculatorEventData calculatorEventData, @NotNull CalculatorEventType calculatorEventType, @Nullable final Object data) {
if (calculatorEventType.isOfType(CalculatorEventType.display_state_changed)) { if (calculatorEventType.isOfType(CalculatorEventType.display_state_changed)) {
if (!preparedInput.isFromInputArgs()) { if (!preparedInput.isFromInputArgs()) {
if (calculatorEventData.isAfter(this.lastCalculatorEventData)) {
this.lastCalculatorEventData = calculatorEventData;
final CalculatorEventHolder.Result result = this.lastEventHolder.apply(calculatorEventData);
if (result.isNewAfter()) {
this.preparedInput = prepareInputFromDisplay(((CalculatorDisplayChangeEventData) data).getNewValue(), null); this.preparedInput = prepareInputFromDisplay(((CalculatorDisplayChangeEventData) data).getNewValue(), null);
createChart(); createChart();
uiHandler.post(new Runnable() { uiHandler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -372,6 +371,7 @@ public class CalculatorPlotFragment extends CalculatorFragment implements Calcul
} }
}); });
} }
} }
} }
} }