Skip to content

Commit

Permalink
Started new version: 2.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mkulesh committed Mar 4, 2018
1 parent 9a2ff6d commit ea9d2bd
Show file tree
Hide file tree
Showing 47 changed files with 59 additions and 57 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![License](https://img.shields.io/badge/license-GNU_GPLv3-orange.svg)](https://github.com/mkulesh/microMathematics/blob/master/LICENSE) [![Build Status](https://travis-ci.org/mkulesh/microMathematics.svg?branch=master)](https://travis-ci.org/mkulesh/microMathematics) [![Download unsigned APK from latest autobuild](https://img.shields.io/badge/APK-autobuild-blue.svg)](https://github.com/mkulesh/microMathematics/raw/autobuild/autobuild/microMathematics-v2.17.0.apk)
[![License](https://img.shields.io/badge/license-GNU_GPLv3-orange.svg)](https://github.com/mkulesh/microMathematics/blob/master/LICENSE) [![Build Status](https://travis-ci.org/mkulesh/microMathematics.svg?branch=master)](https://travis-ci.org/mkulesh/microMathematics) [![Download unsigned APK from latest autobuild](https://img.shields.io/badge/APK-autobuild-blue.svg)](https://github.com/mkulesh/microMathematics/raw/autobuild/autobuild/microMathematics-v2.17.1.apk)

# <img src="https://github.com/mkulesh/microMathematics/blob/master/images/icon.png" align="center" height="48" width="48"> "microMathematics Plus - Extended visual calculator"

Expand Down Expand Up @@ -42,7 +42,7 @@ For more screenshots, see directory images/screenshots.
## Documentation
* [Supported Functions Overview](http://htmlpreview.github.io/?https://github.com/mkulesh/microMathematics/blob/master/doc/html/functions_overview.html)
* [Supported Units Overview](http://htmlpreview.github.io/?https://github.com/mkulesh/microMathematics/blob/master/doc/html/units_overview.html)
* [The latest PDF version of the User Manual](https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.0.pdf)
* [The latest PDF version of the User Manual](https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.1.pdf)

## Posts on Habrahabr (in Russian)

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 14
targetSdkVersion 26
versionCode 308
versionName "2.17.0"
versionName "2.17.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/mkulesh/micromath/BaseFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected void setWorksheetName(CharSequence name)
protected void onSaveFinished()
{
// Allow save button (for the case if a read-only asset is saved on SD card)
final MenuItem saveItem = (mainMenu == null)? null : mainMenu.findItem(R.id.action_save);
final MenuItem saveItem = (mainMenu == null) ? null : mainMenu.findItem(R.id.action_save);
if (saveItem != null)
{
saveItem.setVisible(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public ArgumentValueAdapter(Context context, ArrayList<ArgumentValueItem> list,
{
super(context, 0, list);
this.docProp = docProp;
this.targetUnit = resProp != null? TermParser.parseUnits(resProp.units) : null;
this.targetUnit = resProp != null ? TermParser.parseUnits(resProp.units) : null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public void setEnabled(Category t, boolean value)
*********************************************************/

private int colorAttrId = Integer.MIN_VALUE;

public void setColorAttr(@AttrRes int attrId)
{
if (this.colorAttrId != attrId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ public void readFromXml(XmlPullParser parser) throws Exception
}
else if (unit != null && !unit.isEmpty())
{
setText(text.isEmpty()? unit : text + TermParser.UNIT_SEPARATOR + unit);
setText(text.isEmpty() ? unit : text + TermParser.UNIT_SEPARATOR + unit);
}
else
{
Expand Down Expand Up @@ -558,7 +558,7 @@ public void writeToXml(XmlSerializer serializer) throws Exception
{
if (isEmptyOrAutoContent())
{
serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_TEXT, "");
serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_TEXT, "");
}
else if (parser.getUnit() != null && parser.getUnitTags() != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public Intervals(Context context, AttributeSet attrs)
@Override
public CalculatedValue.ValueType getValue(CalculaterTask thread, CalculatedValue outValue) throws CancelException
{
Pair<Unit, Integer> units = compareUnits(new TermField []{minValueTerm, nextValueTerm, maxValueTerm});
Pair<Unit, Integer> units = compareUnits(new TermField[]{ minValueTerm, nextValueTerm, maxValueTerm });
if (units.getFirst() != null && units.getSecond() != 3)
{
return outValue.invalidate(CalculatedValue.ErrorType.INCOMPATIBLE_UNIT);
Expand Down Expand Up @@ -280,7 +280,7 @@ else if (v.getText().toString()
* FormulaTermInterval-specific methods
*********************************************************/

private Pair<Unit, Integer> compareUnits(TermField [] terms)
private Pair<Unit, Integer> compareUnits(TermField[] terms)
{
Unit unit = terms[0].getParser().getUnit();
int compatibleNumber = 0;
Expand All @@ -296,15 +296,15 @@ private Pair<Unit, Integer> compareUnits(TermField [] terms)
unit = tp;
}
}
return new Pair<>(unit == null? null : unit.getStandardUnit(), compatibleNumber);
return new Pair<>(unit == null ? null : unit.getStandardUnit(), compatibleNumber);
}

/**
* Procedure returns declared interval if this root formula represents an interval
*/
public ArrayList<CalculatedValue> getInterval(CalculaterTask thread) throws CancelException
{
Pair<Unit, Integer> units = compareUnits(new TermField []{minValueTerm, nextValueTerm, maxValueTerm});
Pair<Unit, Integer> units = compareUnits(new TermField[]{ minValueTerm, nextValueTerm, maxValueTerm });
if (units.getFirst() != null && units.getSecond() != 3)
{
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static void prepare()
allTerms.addAll(Arrays.asList(SeriesIntegrals.LoopType.values()));

termMap = new HashMap<>();
for(TermTypeIf t : allTerms)
for (TermTypeIf t : allTerms)
{
termMap.put(t.getLowerCaseName(), t);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public class ExportToLatex
{ "Ω", "\\Omega" }, { "ω", "\\omega" } };

protected final String[][] supplementTable = new String[][]{
{ "°", "\\degree" }};
{ "°", "\\degree" } };

public ExportToLatex(Context context, OutputStream stream, final Uri uri, final AdapterIf adapter,
final Exporter.Parameters exportParameters) throws Exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void write(FormulaList formulas) throws Exception
writer.append("<html><head>\n");
writer.append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
writer.append("<title>");
writer.append(isPropEmpty(docProp.title)? fileName : docProp.title);
writer.append(isPropEmpty(docProp.title) ? fileName : docProp.title);
writer.append("</title>\n");

writer.append("<script type=\"text/x-mathjax-config\">\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void parseRegion(final Element e, final Element prevRegion, final XmlSer
final int prevButton = prevTop + Integer.parseInt(prevRegion.getAttribute("height"));
final int thisTop = Integer.parseInt(e.getAttribute("top"));
final int thisButton = thisTop + Integer.parseInt(e.getAttribute("height"));
final int thisCenter = (thisTop + thisButton)/2;
final int thisCenter = (thisTop + thisButton) / 2;
if (thisCenter > prevTop && thisCenter < prevButton)
{
inRightOfPrevious = true;
Expand Down Expand Up @@ -403,7 +403,7 @@ private void parsePlotFunctions(List<Element> elements, XmlSerializer serializer
XmlUtils.removeLast(elements);
XmlUtils.removeLast(elements);
// add functions
for(int i = 0; i < argNumber; i++)
for (int i = 0; i < argNumber; i++)
{
final String suffix = Integer.toString(argNumber - i);
LineProperties newProp = new LineProperties();
Expand Down Expand Up @@ -514,7 +514,7 @@ private void parseTerm(final CharSequence key, final List<Element> elements, fin
// A text term
final String newText = textMap.get(p.text);
serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_TEXT,
newText != null? newText : p.text);
newText != null ? newText : p.text);
}
else if (p.isEqual(SM_TAG_MATH_OPERATOR, 1, "-"))
{
Expand Down Expand Up @@ -740,7 +740,7 @@ private String makeFunctionName(List<Element> elements, ExpressionProperties p)
String retValue = args.get(0) + "[";
for (int i = 1; i < args.size(); i++)
{
retValue += (i > 1? "," : "") + args.get(i);
retValue += (i > 1 ? "," : "") + args.get(i);
}
return retValue + "]";
}
Expand All @@ -749,7 +749,7 @@ private String makeFunctionName(List<Element> elements, ExpressionProperties p)
String retValue = p.text + "(";
for (int i = 0; i < args.size(); i++)
{
retValue += (i > 0? "," : "") + args.get(i);
retValue += (i > 0 ? "," : "") + args.get(i);
}
return retValue + ")";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private boolean unitExists(CalculatedValue f, CalculatedValue g)
public String toString()
{
return valueType.toString() + "[" + real + ", " + imaginary + "]" +
(unit == null? "?" : unit.toString());
(unit == null ? "?" : unit.toString());
}

public String getResultDescription(DocumentProperties doc)
Expand Down Expand Up @@ -552,7 +552,7 @@ public ValueType pow(CalculatedValue f, CalculatedValue g)
{
if (unitExists(f, g))
{
unit = powUnit(f,g);
unit = powUnit(f, g);
if (unit == null)
{
return invalidate(ErrorType.INCOMPATIBLE_UNIT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void readFromXml(XmlPullParser parser)
final DecimalFormat df = CompatUtils.getDecimalFormat("0.00000");

String attr = parser.getAttributeValue(null, XML_PROP_VERSION);
documentVersion = (attr != null)? Integer.parseInt(attr) : DEFAULT_DOCUMENT_VERSION;
documentVersion = (attr != null) ? Integer.parseInt(attr) : DEFAULT_DOCUMENT_VERSION;
attr = parser.getAttributeValue(null, XML_PROP_AUTHOR);
author = (attr == null) ? EMPTY_STRING : attr;
attr = parser.getAttributeValue(null, XML_PROP_TITLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void run()
public static void updateMenuIconColor(Context context, MenuItem m)
{
CompatUtils.setDrawableColorAttr(context, m.getIcon(),
m.isEnabled() ? R.attr.colorMicroMathIcon : R.attr.colorPrimaryDark);
m.isEnabled() ? R.attr.colorMicroMathIcon : R.attr.colorPrimaryDark);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void updateTextSize(ScaledDimensions dimen, int termDepth, ScaledDimensio
public void updateMinimumWidth(ScaledDimensions dimen)
{
final int newWidth = length() == 0 ? dimen.get(ScaledDimensions.Type.TEXT_MIN_WIDTH) : 0;
final int prevWidth = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN?
final int prevWidth = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN ?
getMinimumWidth() : Integer.MIN_VALUE;
if (prevWidth != newWidth)
{
Expand Down Expand Up @@ -538,8 +538,8 @@ protected void onSelectionChanged(int selStart, int selEnd)
{
super.onSelectionChanged(selEnd, selEnd);
if (CompatUtils.isMarshMallowOrLater() &&
isTextFragment() && getText().length() > 0 &&
hasSelection() && selEnd - selStart == getText().length())
isTextFragment() && getText().length() > 0 &&
hasSelection() && selEnd - selStart == getText().length())
{
// null for input view means that we will start ActionMode without owner:
// the root formula will be selected instead of owner term
Expand All @@ -553,6 +553,7 @@ protected void onSelectionChanged(int selStart, int selEnd)

private int backgroundDrawableId = Integer.MIN_VALUE;
private int backgroundAttrId = Integer.MIN_VALUE;

public void setBackgroundAttr(@DrawableRes int drawableId, @AttrRes int attrId)
{
if (this.backgroundDrawableId != drawableId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void updateTextSize(ScaledDimensions dimen, int termDepth)

public void setContentValid(boolean contentValid)
{
if(this.contentValid != contentValid)
if (this.contentValid != contentValid)
{
this.contentValid = contentValid;
invalidate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ public boolean fullScroll(int direction, boolean horizontal)
* area, the focus is reclaimed by this scrollview.
*
* @param directionY the scroll direction: {@link android.view.View#FOCUS_UP} to go upward
* {@link android.view.View#FOCUS_DOWN} to downward
* @param top the top offset of the new area to be made visible
* @param bottom the bottom offset of the new area to be made visible
* {@link android.view.View#FOCUS_DOWN} to downward
* @param top the top offset of the new area to be made visible
* @param bottom the bottom offset of the new area to be made visible
* @return true if the key event is consumed by this method, false otherwise
*/
private boolean scrollAndFocus(int directionY, int top, int bottom, int directionX, int left, int right)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<item>asset:/doc_de/three_d_plot_de.mmt</item>
<item>asset:/doc_de/series_and_integrals_de.mmt</item>
<item>asset:/doc_de/about_micromath_de.mmt</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.0-de.pdf</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.1-de.pdf</item>
</string-array>
<string name="activity_example">Beispiele</string>
<string name="activity_welcome">asset:/doc_de/welcome_de.mmt</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<item>asset:/doc_br/three_d_plot_br.mmt</item>
<item>asset:/doc_br/series_and_integrals_br.mmt</item>
<item>asset:/doc_br/about_micromath_br.mmt</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.0-br.pdf</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.1-br.pdf</item>
</string-array>
<string name="activity_example">Exemplo</string>
<string name="activity_welcome">asset:/doc_br/welcome.mmt</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<item>asset:/doc_ru/three_d_plot_ru.mmt</item>
<item>asset:/doc_ru/series_and_integrals_ru.mmt</item>
<item>asset:/doc_ru/about_micromath_ru.mmt</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.0-ru.pdf</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.1-ru.pdf</item>
</string-array>
<string name="activity_example">Примеры</string>
<string name="activity_welcome">asset:/doc_ru/welcome_ru.mmt</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<item>asset:/doc_en/three_d_plot.mmt</item>
<item>asset:/doc_en/series_and_integrals.mmt</item>
<item>asset:/doc_en/about_micromath.mmt</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.0.pdf</item>
<item>https://docs.google.com/viewer?url=https://github.com/mkulesh/microMathematics/raw/supplement/doc/microMathematics-v2.17.1.pdf</item>
</string-array>
<string name="activity_example">Examples</string>
<string name="activity_welcome">asset:/doc_en/welcome.mmt</string>
Expand Down
2 changes: 1 addition & 1 deletion autobuild/push-apk.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

APK_VERSION=2.17.0
APK_VERSION=2.17.1

echo "Generated APK"
pwd; ls -l ./app/build/outputs/apk
Expand Down
Empty file modified autotest/create-avd.sh
100755 → 100644
Empty file.
Empty file modified autotest/run-emulator.sh
100755 → 100644
Empty file.
Empty file modified autotest/run-session.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion doc/function_plot.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


This example demonstrates how to
Expand Down
2 changes: 1 addition & 1 deletion doc/function_plot_br.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Este exemplo demonstra como preparar e
Expand Down
2 changes: 1 addition & 1 deletion doc/function_plot_de.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Dieses Beispiel demonstriert, wie man
Expand Down
2 changes: 1 addition & 1 deletion doc/function_plot_ru.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Данный пример демонстрирует
Expand Down
2 changes: 1 addition & 1 deletion doc/how_to_use.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


This app is a powerful calculation
Expand Down
2 changes: 1 addition & 1 deletion doc/how_to_use_br.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Este app é um poderoso programa
Expand Down
2 changes: 1 addition & 1 deletion doc/how_to_use_de.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Diese App ist eine leistungsstarke
Expand Down
2 changes: 1 addition & 1 deletion doc/how_to_use_ru.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Данное приложение является мощным
Expand Down
2 changes: 1 addition & 1 deletion doc/partial-translation/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<item>asset:/doc_en/three_d_plot.mmt</item>
<item>asset:/doc_en/series_and_integrals.mmt</item>
<item>asset:/doc_en/about_micromath.mmt</item>
<item>https://github.com/mkulesh/microMathematics/blob/master/doc/download/v2.17.0/microMathematics-v2.17.0.pdf</item>
<item>https://github.com/mkulesh/microMathematics/blob/master/doc/download/v2.17.1/microMathematics-v2.17.1.pdf</item>
</string-array>
<string name="activity_welcome">asset:/doc_en/welcome.mmt</string>-->

Expand Down
2 changes: 1 addition & 1 deletion doc/polar_plot.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Now we plot several functions given in
Expand Down
2 changes: 1 addition & 1 deletion doc/polar_plot_br.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Agora desenharemos várias funções dadas
Expand Down
2 changes: 1 addition & 1 deletion doc/polar_plot_de.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Jetzt zeichnen wir eine Funktion, die
Expand Down
2 changes: 1 addition & 1 deletion doc/polar_plot_ru.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This is auto-generated file: do not edit!
% Exported from microMathematics Plus, version 2.17.0
% Exported from microMathematics Plus, version 2.17.1


Сейчас мы построим несколько
Expand Down
Loading

0 comments on commit ea9d2bd

Please sign in to comment.