diff --git a/android-app-tests/android-app-tests.iml b/android-app-tests/android-app-tests.iml
index dfee8079..38698c84 100644
--- a/android-app-tests/android-app-tests.iml
+++ b/android-app-tests/android-app-tests.iml
@@ -71,40 +71,36 @@
+
-
+
-
-
-
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/android-app/android-app.iml b/android-app/android-app.iml
index 2c2f13d0..8ba4dc70 100644
--- a/android-app/android-app.iml
+++ b/android-app/android-app.iml
@@ -81,18 +81,15 @@
-
+
-
-
-
-
+
@@ -101,8 +98,8 @@
-
+
@@ -110,7 +107,6 @@
-
diff --git a/android-app/build.gradle b/android-app/build.gradle
index b364887a..5eb6046a 100644
--- a/android-app/build.gradle
+++ b/android-app/build.gradle
@@ -56,16 +56,13 @@ dependencies {
compile 'org.solovyev:common-text:1.0.7'
compile 'org.solovyev:common-security:1.0.7'
compile 'com.android.support:support-v4:21.0.3'
- compile ('ch.acra:acra:4.5.0') {
+ compile 'com.android.support:appcompat-v7:21.0.3'
+ compile('ch.acra:acra:4.5.0') {
exclude group: 'org.json'
}
- compile 'org.solovyev.android:android-common-sherlock:1.1.18@aar'
compile 'org.solovyev.android:android-common-lists:1.1.18@aar'
- compile 'org.solovyev.android:android-common-wizard:1.1.18@aar'
compile 'org.solovyev.android:android-common-core:1.1.18@aar'
compile 'org.solovyev.android:android-common-other:1.1.18@aar'
- compile 'org.solovyev.android:android-common-db:1.1.18@aar'
- compile 'org.solovyev.android:android-common-security:1.1.18@aar'
compile 'org.solovyev.android:android-common-views:1.1.18@aar'
compile 'org.solovyev.android:android-common-menus:1.1.18@aar'
compile 'org.solovyev.android:android-common-preferences:1.1.18@aar'
@@ -73,7 +70,6 @@ dependencies {
exclude(module: 'xercesImpl')
}
compile 'org.solovyev.android:checkout:0.6.0@aar'
- compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.google.android.gms:play-services:6.5.87@aar'
compile 'com.melnykov:floatingactionbutton:1.1.0'
}
diff --git a/android-app/proguard-debug.cfg b/android-app/proguard-debug.cfg
index 62cd3f66..7c237aa5 100644
--- a/android-app/proguard-debug.cfg
+++ b/android-app/proguard-debug.cfg
@@ -67,6 +67,9 @@
-dontwarn com.actionbarsherlock.BuildConfig
-dontwarn com.google.android.gms.**
-dontwarn com.melnykov.fab.**
+-dontwarn android.support.v7.**
+-keep class android.support.v7.** { *; }
+-keep interface android.support.v7.** { *; }
-keep class org.simpleframework.xml.** { *; }
-keep class * implements org.solovyev.android.calculator.model.MathPersistenceEntity
diff --git a/android-app/proguard.cfg b/android-app/proguard.cfg
index ebae0859..10f6c572 100644
--- a/android-app/proguard.cfg
+++ b/android-app/proguard.cfg
@@ -66,6 +66,9 @@
-dontwarn com.actionbarsherlock.BuildConfig
-dontwarn com.google.android.gms.**
-dontwarn com.melnykov.fab.**
+-dontwarn android.support.v7.**
+-keep class android.support.v7.** { *; }
+-keep interface android.support.v7.** { *; }
-keep class org.simpleframework.xml.** { *; }
-keep class * implements org.solovyev.android.calculator.model.MathPersistenceEntity
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ActivityUi.java b/android-app/src/main/java/org/solovyev/android/calculator/ActivityUi.java
index 788666d8..36f1893e 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/ActivityUi.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/ActivityUi.java
@@ -36,8 +36,8 @@ import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import org.solovyev.android.Activities;
import org.solovyev.android.Views;
import org.solovyev.android.sherlock.tabs.ActionBarFragmentTabListener;
@@ -111,9 +111,8 @@ public class ActivityUi extends BaseUi {
}
}
- public void onCreate(@Nonnull final SherlockFragmentActivity activity) {
- onCreate((Activity)activity);
-
+ public void onCreate(@Nonnull final ActionBarActivity activity) {
+ onCreate((Activity) activity);
final ActionBar actionBar = activity.getSupportActionBar();
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(homeIcon);
@@ -126,7 +125,7 @@ public class ActivityUi extends BaseUi {
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
- private void toggleTitle(@Nonnull SherlockFragmentActivity activity, boolean showTitle) {
+ private void toggleTitle(@Nonnull ActionBarActivity activity, boolean showTitle) {
final ActionBar actionBar = activity.getSupportActionBar();
if (activity instanceof CalculatorActivity) {
@@ -140,14 +139,14 @@ public class ActivityUi extends BaseUi {
}
}
- public void restoreSavedTab(@Nonnull SherlockFragmentActivity activity) {
+ public void restoreSavedTab(@Nonnull ActionBarActivity activity) {
final ActionBar actionBar = activity.getSupportActionBar();
if (selectedNavigationIndex >= 0 && selectedNavigationIndex < actionBar.getTabCount()) {
actionBar.setSelectedNavigationItem(selectedNavigationIndex);
}
}
- public void onSaveInstanceState(@Nonnull SherlockFragmentActivity activity, @Nonnull Bundle outState) {
+ public void onSaveInstanceState(@Nonnull ActionBarActivity activity, @Nonnull Bundle outState) {
onSaveInstanceState((Activity) activity, outState);
}
@@ -166,7 +165,7 @@ public class ActivityUi extends BaseUi {
public void onPause(@Nonnull Activity activity) {
}
- public void onPause(@Nonnull SherlockFragmentActivity activity) {
+ public void onPause(@Nonnull ActionBarActivity activity) {
onPause((Activity) activity);
final int selectedNavigationIndex = activity.getSupportActionBar().getSelectedNavigationIndex();
@@ -193,11 +192,11 @@ public class ActivityUi extends BaseUi {
}
}
- public void onDestroy(@Nonnull SherlockFragmentActivity activity) {
+ public void onDestroy(@Nonnull ActionBarActivity activity) {
this.onDestroy((Activity) activity);
}
- public void addTab(@Nonnull SherlockFragmentActivity activity,
+ public void addTab(@Nonnull ActionBarActivity activity,
@Nonnull String tag,
@Nonnull Class extends Fragment> fragmentClass,
@Nullable Bundle fragmentArgs,
@@ -214,11 +213,11 @@ public class ActivityUi extends BaseUi {
actionBar.addTab(tab);
}
- public void addTab(@Nonnull SherlockFragmentActivity activity, @Nonnull CalculatorFragmentType fragmentType, @Nullable Bundle fragmentArgs, int parentViewId) {
+ public void addTab(@Nonnull ActionBarActivity activity, @Nonnull CalculatorFragmentType fragmentType, @Nullable Bundle fragmentArgs, int parentViewId) {
addTab(activity, fragmentType.getFragmentTag(), fragmentType.getFragmentClass(), fragmentArgs, fragmentType.getDefaultTitleResId(), parentViewId);
}
- public void setFragment(@Nonnull SherlockFragmentActivity activity, @Nonnull CalculatorFragmentType fragmentType, @Nullable Bundle fragmentArgs, int parentViewId) {
+ public void setFragment(@Nonnull ActionBarActivity activity, @Nonnull CalculatorFragmentType fragmentType, @Nullable Bundle fragmentArgs, int parentViewId) {
final FragmentManager fm = activity.getSupportFragmentManager();
Fragment fragment = fm.findFragmentByTag(fragmentType.getFragmentTag());
@@ -237,7 +236,7 @@ public class ActivityUi extends BaseUi {
}
}
- public void selectTab(@Nonnull SherlockFragmentActivity activity, @Nonnull CalculatorFragmentType fragmentType) {
+ public void selectTab(@Nonnull ActionBarActivity activity, @Nonnull CalculatorFragmentType fragmentType) {
final ActionBar actionBar = activity.getSupportActionBar();
for (int i = 0; i < actionBar.getTabCount(); i++) {
final ActionBar.Tab tab = actionBar.getTabAt(i);
@@ -262,7 +261,7 @@ public class ActivityUi extends BaseUi {
return layout;
}
- public void onResume(@Nonnull SherlockFragmentActivity activity) {
+ public void onResume(@Nonnull ActionBarActivity activity) {
onResume((Activity) activity);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/BaseActivity.java b/android-app/src/main/java/org/solovyev/android/calculator/BaseActivity.java
index b52dd6d1..066ed25f 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/BaseActivity.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/BaseActivity.java
@@ -2,11 +2,11 @@ package org.solovyev.android.calculator;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
+import android.support.v7.app.ActionBarActivity;
import javax.annotation.Nonnull;
-public class BaseActivity extends SherlockFragmentActivity {
+public class BaseActivity extends ActionBarActivity {
@Nonnull
protected final ActivityUi ui;
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
index 337193a8..06035e3b 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
@@ -36,8 +36,8 @@ import android.util.Log;
import android.view.*;
import android.widget.Button;
import android.widget.TextView;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import org.solovyev.android.Activities;
import org.solovyev.android.Android;
import org.solovyev.android.Threads;
@@ -62,7 +62,7 @@ import static org.solovyev.android.calculator.Preferences.Gui.preventScreenFromF
import static org.solovyev.android.wizard.WizardUi.continueWizard;
import static org.solovyev.android.wizard.WizardUi.startWizard;
-public class CalculatorActivity extends SherlockFragmentActivity implements SharedPreferences.OnSharedPreferenceChangeListener, CalculatorEventListener {
+public class CalculatorActivity extends ActionBarActivity implements SharedPreferences.OnSharedPreferenceChangeListener, CalculatorEventListener {
@Nonnull
public static final String TAG = CalculatorActivity.class.getSimpleName();
@@ -77,6 +77,8 @@ public class CalculatorActivity extends SherlockFragmentActivity implements Shar
*/
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
final Preferences.Gui.Layout layout = Preferences.Gui.layout.getPreferenceNoError(preferences);
@@ -85,9 +87,6 @@ public class CalculatorActivity extends SherlockFragmentActivity implements Shar
activityUi.logDebug("onCreate");
activityUi.onCreate(this);
- super.onCreate(savedInstanceState);
- activityUi.logDebug("super.onCreate");
-
if (isMultiPane()) {
activityUi.addTab(this, CalculatorFragmentType.history, null, R.id.main_second_pane);
activityUi.addTab(this, CalculatorFragmentType.saved_history, null, R.id.main_second_pane);
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java
index c4510907..e5b17ec8 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java
@@ -32,7 +32,7 @@ import android.preference.PreferenceManager;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
+import android.support.v7.app.ActionBarActivity;
import jscl.math.Generic;
import org.solovyev.android.Android;
import org.solovyev.android.calculator.about.CalculatorAboutActivity;
@@ -129,8 +129,8 @@ public final class CalculatorActivityLauncher implements CalculatorEventListener
final String varValue = viewState.getText();
if (!Strings.isEmpty(varValue)) {
if (CalculatorVarsFragment.isValidValue(varValue)) {
- if (context instanceof SherlockFragmentActivity) {
- VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newFromValue(varValue), ((SherlockFragmentActivity) context).getSupportFragmentManager());
+ if (context instanceof ActionBarActivity) {
+ VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newFromValue(varValue), ((ActionBarActivity) context).getSupportFragmentManager());
} else {
final Intent intent = new Intent(context, CalculatorVarsActivity.class);
intent.putExtra(CalculatorVarsFragment.CREATE_VAR_EXTRA_STRING, varValue);
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java
index 30190288..b22c4c92 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java
@@ -31,7 +31,7 @@ import android.view.View;
import android.widget.Button;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
+import android.support.v7.app.ActionBarActivity;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -46,7 +46,7 @@ import org.solovyev.common.text.Strings;
* Date: 1/20/13
* Time: 12:50 PM
*/
-public class CalculatorDialogActivity extends SherlockFragmentActivity {
+public class CalculatorDialogActivity extends ActionBarActivity {
@Nonnull
private static final String TAG = CalculatorDialogActivity.class.getSimpleName();
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java
index af6fef66..fd64313d 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java
@@ -29,7 +29,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import com.actionbarsherlock.app.SherlockFragment;
+import android.support.v4.app.Fragment;
import javax.annotation.Nonnull;
@@ -38,7 +38,7 @@ import javax.annotation.Nonnull;
* Date: 25.09.12
* Time: 12:03
*/
-public class CalculatorDisplayFragment extends SherlockFragment {
+public class CalculatorDisplayFragment extends Fragment {
@Nonnull
private FragmentUi fragmentHelper;
diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java
index a5ea970b..07e5c02b 100644
--- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java
+++ b/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java
@@ -30,29 +30,29 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import com.actionbarsherlock.app.SherlockFragment;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
+import android.support.v4.app.Fragment;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import javax.annotation.Nonnull;
import org.solovyev.android.menu.ActivityMenu;
import org.solovyev.android.menu.ListActivityMenu;
-import org.solovyev.android.sherlock.menu.SherlockMenuHelper;
+import org.solovyev.android.menu.AndroidMenuHelper;
/**
* User: Solovyev_S
* Date: 25.09.12
* Time: 10:49
*/
-public class CalculatorEditorFragment extends SherlockFragment {
+public class CalculatorEditorFragment extends Fragment {
@Nonnull
private FragmentUi fragmentHelper;
@Nonnull
- private ActivityMenu