extracting common classes to another project
This commit is contained in:
parent
58500d58d3
commit
495ce8a8e6
@ -93,7 +93,7 @@
|
||||
a:label="@string/c_vars_and_constants"
|
||||
a:configChanges="orientation|keyboardHidden"/>
|
||||
|
||||
<activity a:name=".CalculatorPlotActivity"
|
||||
<activity a:name=".plot.CalculatorPlotActivity"
|
||||
a:label="@string/c_plot_graph"/>
|
||||
|
||||
<activity a:name="com.google.ads.AdActivity"
|
||||
|
@ -53,7 +53,7 @@
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="4"/>
|
||||
|
||||
<org.solovyev.android.view.widgets.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
<org.solovyev.android.calculator.view.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||
a:id="@+id/clearButton"
|
||||
c:textUp="dec"
|
||||
|
@ -47,7 +47,7 @@
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="4"/>
|
||||
|
||||
<org.solovyev.android.view.widgets.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
<org.solovyev.android.calculator.view.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||
a:id="@+id/clearButton"
|
||||
c:textUp="dec"
|
||||
|
@ -6,7 +6,7 @@
|
||||
~ or visit http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<org.solovyev.android.view.widgets.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
<org.solovyev.android.calculator.view.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||
a:id="@+id/clearButton"
|
||||
c:textUp="dec"
|
||||
|
@ -6,7 +6,7 @@
|
||||
~ or visit http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<org.solovyev.android.view.widgets.AngleUnitsButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
<org.solovyev.android.calculator.view.AngleUnitsButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||
c:textUp="deg"
|
||||
a:id="@+id/sixDigitButton"
|
||||
|
@ -37,6 +37,8 @@ import org.solovyev.android.calculator.history.CalculatorHistory;
|
||||
import org.solovyev.android.calculator.history.CalculatorHistoryState;
|
||||
import org.solovyev.android.calculator.math.MathType;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.calculator.view.AngleUnitsButton;
|
||||
import org.solovyev.android.calculator.view.NumeralBasesButton;
|
||||
import org.solovyev.android.view.FontSizeAdjuster;
|
||||
import org.solovyev.android.view.prefs.IntegerPreference;
|
||||
import org.solovyev.android.view.prefs.Preference;
|
||||
@ -126,6 +128,10 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh
|
||||
}
|
||||
|
||||
ResourceCache.instance.initCaptions(CalculatorApplication.getInstance(), R.string.class);
|
||||
|
||||
billingObserver = new CalculatorBillingObserver(this);
|
||||
BillingController.registerObserver(billingObserver);
|
||||
|
||||
firstTimeInit(preferences);
|
||||
|
||||
// init billing controller
|
||||
@ -385,9 +391,6 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh
|
||||
private synchronized void firstTimeInit(@NotNull SharedPreferences preferences) {
|
||||
if (!initialized) {
|
||||
|
||||
billingObserver = new CalculatorBillingObserver(this);
|
||||
BillingController.registerObserver(billingObserver);
|
||||
|
||||
final int savedVersion = Preferences.appVersion.getPreference(preferences);
|
||||
|
||||
final int appVersion = AndroidUtils.getAppVersionCode(this, CalculatorActivity.class.getPackage().getName());
|
||||
|
@ -14,6 +14,7 @@ import org.solovyev.android.calculator.math.edit.CalculatorFunctionsTabActivity;
|
||||
import org.solovyev.android.calculator.math.edit.CalculatorOperatorsActivity;
|
||||
import org.solovyev.android.calculator.math.edit.CalculatorVarsTabActivity;
|
||||
import org.solovyev.android.calculator.math.edit.CalculatorVarsActivity;
|
||||
import org.solovyev.android.calculator.plot.CalculatorPlotActivity;
|
||||
import org.solovyev.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
|
@ -19,6 +19,7 @@ import org.solovyev.android.calculator.jscl.JsclOperation;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.calculator.model.CalculatorParseException;
|
||||
import org.solovyev.android.calculator.model.TextProcessor;
|
||||
import org.solovyev.android.calculator.view.TextHighlighter;
|
||||
import org.solovyev.android.view.AMenuItem;
|
||||
import org.solovyev.android.view.AutoResizeTextView;
|
||||
|
||||
|
@ -18,8 +18,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.calculator.model.CalculatorParseException;
|
||||
import org.solovyev.android.calculator.model.TextProcessor;
|
||||
import org.solovyev.android.calculator.view.TextHighlighter;
|
||||
import org.solovyev.common.utils.CollectionsUtils;
|
||||
import org.solovyev.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* User: serso
|
||||
|
@ -1,38 +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
|
||||
*/
|
||||
|
||||
package org.solovyev.android.calculator;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.solovyev.common.utils.Finder;
|
||||
|
||||
/**
|
||||
* User: serso
|
||||
* Date: 10/3/11
|
||||
* Time: 12:49 AM
|
||||
*/
|
||||
public class StartsWithFinder implements Finder<String> {
|
||||
|
||||
private int i;
|
||||
|
||||
@NotNull
|
||||
private final String targetString;
|
||||
|
||||
public StartsWithFinder(@NotNull String targetString, int i) {
|
||||
this.targetString = targetString;
|
||||
this.i = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFound(@Nullable String s) {
|
||||
return targetString.startsWith(s, i);
|
||||
}
|
||||
|
||||
public void setI(int i) {
|
||||
this.i = i;
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ import jscl.NumeralBase;
|
||||
import jscl.math.function.Constants;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.solovyev.android.calculator.StartsWithFinder;
|
||||
import org.solovyev.common.StartsWithFinder;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.calculator.model.CalculatorParseException;
|
||||
import org.solovyev.common.utils.CollectionsUtils;
|
||||
|
@ -8,7 +8,7 @@ package org.solovyev.android.calculator.model;
|
||||
|
||||
import jscl.math.function.IConstant;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.calculator.StartsWithFinder;
|
||||
import org.solovyev.common.StartsWithFinder;
|
||||
import org.solovyev.android.calculator.math.MathType;
|
||||
import org.solovyev.common.utils.CollectionsUtils;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* or visit http://se.solovyev.org
|
||||
*/
|
||||
|
||||
package org.solovyev.android.calculator;
|
||||
package org.solovyev.android.calculator.plot;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
@ -33,8 +33,7 @@ import org.achartengine.tools.ZoomEvent;
|
||||
import org.achartengine.tools.ZoomListener;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.solovyev.android.calculator.plot.MyXYSeries;
|
||||
import org.solovyev.android.calculator.plot.PlotUtils;
|
||||
import org.solovyev.android.calculator.R;
|
||||
import org.solovyev.common.utils.MutableObject;
|
||||
|
||||
import java.io.Serializable;
|
@ -4,7 +4,7 @@
|
||||
* or visit http://se.solovyev.org
|
||||
*/
|
||||
|
||||
package org.solovyev.android.view.widgets;
|
||||
package org.solovyev.android.calculator.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
@ -14,6 +14,7 @@ import android.util.AttributeSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.calculator.R;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.view.widgets.DirectionDragButton;
|
||||
|
||||
/**
|
||||
* User: serso
|
@ -4,7 +4,7 @@
|
||||
* or visit http://se.solovyev.org
|
||||
*/
|
||||
|
||||
package org.solovyev.android.view.widgets;
|
||||
package org.solovyev.android.calculator.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
@ -14,6 +14,7 @@ import android.util.AttributeSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.calculator.R;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.view.widgets.DirectionDragButton;
|
||||
|
||||
/**
|
||||
* User: serso
|
@ -4,7 +4,7 @@
|
||||
* or visit http://se.solovyev.org
|
||||
*/
|
||||
|
||||
package org.solovyev.android.calculator;
|
||||
package org.solovyev.android.calculator.view;
|
||||
|
||||
import jscl.MathContext;
|
||||
import org.jetbrains.annotations.NotNull;
|
@ -13,6 +13,7 @@ import junit.framework.Assert;
|
||||
import org.junit.Test;
|
||||
import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.calculator.model.TextProcessor;
|
||||
import org.solovyev.android.calculator.view.TextHighlighter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
|
Loading…
Reference in New Issue
Block a user