]> matita.cs.unibo.it Git - logicplayer.git/commitdiff
Ported to latest version of Android SDK
authorClaudio Sacerdoti Coen <claudio@zenone.casamia.org>
Mon, 19 Oct 2015 15:13:04 +0000 (17:13 +0200)
committerClaudio Sacerdoti Coen <claudio@zenone.casamia.org>
Mon, 19 Oct 2015 15:13:04 +0000 (17:13 +0200)
The porting has been done automatically.

275 files changed:
mainActivity/._AndroidManifest.xml [deleted file]
mainActivity/.classpath [deleted file]
mainActivity/.gradle/2.4/taskArtifacts/cache.properties [new file with mode: 0644]
mainActivity/.gradle/2.4/taskArtifacts/cache.properties.lock [new file with mode: 0644]
mainActivity/.gradle/2.4/taskArtifacts/fileHashes.bin [new file with mode: 0644]
mainActivity/.gradle/2.4/taskArtifacts/fileSnapshots.bin [new file with mode: 0644]
mainActivity/.gradle/2.4/taskArtifacts/outputFileStates.bin [new file with mode: 0644]
mainActivity/.gradle/2.4/taskArtifacts/taskArtifacts.bin [new file with mode: 0644]
mainActivity/.idea/.name [new file with mode: 0644]
mainActivity/.idea/compiler.xml [new file with mode: 0644]
mainActivity/.idea/copyright/profiles_settings.xml [new file with mode: 0644]
mainActivity/.idea/gradle.xml [new file with mode: 0644]
mainActivity/.idea/libraries/support_v4_19_1_0.xml [new file with mode: 0644]
mainActivity/.idea/misc.xml [new file with mode: 0644]
mainActivity/.idea/modules.xml [new file with mode: 0644]
mainActivity/.idea/runConfigurations.xml [new file with mode: 0644]
mainActivity/.idea/vcs.xml [new file with mode: 0644]
mainActivity/.idea/workspace.xml [new file with mode: 0644]
mainActivity/.project [deleted file]
mainActivity/.settings/org.eclipse.jdt.core.prefs [deleted file]
mainActivity/AndroidManifest.xml [deleted file]
mainActivity/app/app.iml [new file with mode: 0644]
mainActivity/app/build.gradle [new file with mode: 0644]
mainActivity/app/build/generated/source/buildConfig/androidTest/debug/com/example/furt/myapplication/test/BuildConfig.java [new file with mode: 0644]
mainActivity/app/build/generated/source/buildConfig/debug/com/example/furt/myapplication/BuildConfig.java [new file with mode: 0644]
mainActivity/app/build/generated/source/r/debug/com/example/furt/myapplication/R.java [new file with mode: 0644]
mainActivity/app/build/intermediates/dex/debug/classes.dex [new file with mode: 0644]
mainActivity/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store [new file with mode: 0644]
mainActivity/app/build/intermediates/incremental/aidl/debug/dependency.store [new file with mode: 0644]
mainActivity/app/build/intermediates/incremental/mergeAssets/androidTest/debug/merger.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/incremental/mergeAssets/debug/merger.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/incremental/mergeResourcesandroidTest/debug/merger.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/incremental/mergeResourcesdebug/merger.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/manifest/androidTest/debug/AndroidManifest.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/manifests/full/debug/AndroidManifest.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/pre-dexed/debug/support-v4-19.1.0-8faefc2ba4cd5a2975855f5f7f9dd384b0788ebc.jar [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/def.jpg [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/def.jpg [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/def.jpg [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/def.jpg [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout-land/download.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/activity_login.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/activity_my.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/aggiornamento.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/download.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/reimpostapass.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/ruledialog.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/string_layout.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/layout/textviewgeneral.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/menu/login_set.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/menu/menu_dow.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/menu/my.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/raw/halloween.crt [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/raw/keystore.bks [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/values-w820dp/values-w820dp.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/merged/debug/values/values.xml [new file with mode: 0644]
mainActivity/app/build/intermediates/res/resources-debug-androidTest.ap_ [new file with mode: 0644]
mainActivity/app/build/intermediates/res/resources-debug.ap_ [new file with mode: 0644]
mainActivity/app/build/outputs/apk/app-debug-unaligned.apk [new file with mode: 0644]
mainActivity/app/build/outputs/apk/app-debug.apk [new file with mode: 0644]
mainActivity/app/build/outputs/logs/manifest-merger-debug-report.txt [new file with mode: 0644]
mainActivity/app/lint.xml [new file with mode: 0644]
mainActivity/app/src/main/AndroidManifest.xml [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/Border.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/BorderedTextView.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/CopyPasteDialog.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/DialogTouchHandler.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/DrawActivity.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/EliminationRule.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FView.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/Formula.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaAnd.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaBOT.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaImpl.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaNot.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaOr.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaTOP.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/GenericFormula.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/Hypothesis.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/IntroductionRule.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/Literal.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/LongHPClick.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/MD5.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/MyService.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/Node.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleAndElimination.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleBotElimination.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleDialog.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleImplElimination.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleIntroduction.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleNotElimination.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/RuleOrElimination.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/ServerData.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/Tree.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/UndefinedFormula.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/aggiorna.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/aggiornamento.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/askFormula.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/download_page.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/global.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/listElem.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/longnodeHandler.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/mainActivity.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/operandClick.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/parser.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/parserDialog.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/personalDBHelper.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/personalTrackerContract.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/recuperaPass.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/serverComunication.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/suString.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/touchHPHandler.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/touchParserHandler.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/touchnodeHandler.java [new file with mode: 0644]
mainActivity/app/src/main/java/com/example/furt/myapplication/valutazione.java [new file with mode: 0644]
mainActivity/app/src/main/res/._drawable-hdpi [new file with mode: 0644]
mainActivity/app/src/main/res/._drawable-mdpi [new file with mode: 0644]
mainActivity/app/src/main/res/._drawable-xxhdpi [new file with mode: 0644]
mainActivity/app/src/main/res/._values [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-hdpi/._ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-hdpi/def.jpg [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-mdpi/._ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-mdpi/def.jpg [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-xhdpi/._ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-xhdpi/def.jpg [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-xhdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-xxhdpi/._ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-xxhdpi/def.jpg [new file with mode: 0644]
mainActivity/app/src/main/res/drawable-xxhdpi/ic_launcher.png [new file with mode: 0644]
mainActivity/app/src/main/res/layout-land/download.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/activity_login.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/activity_my.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/aggiornamento.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/download.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/reimpostapass.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/ruledialog.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/string_layout.xml [new file with mode: 0644]
mainActivity/app/src/main/res/layout/textviewgeneral.xml [new file with mode: 0644]
mainActivity/app/src/main/res/menu/._my.xml [new file with mode: 0644]
mainActivity/app/src/main/res/menu/login_set.xml [new file with mode: 0644]
mainActivity/app/src/main/res/menu/menu_dow.xml [new file with mode: 0644]
mainActivity/app/src/main/res/menu/my.xml [new file with mode: 0644]
mainActivity/app/src/main/res/raw/._halloween.crt [new file with mode: 0644]
mainActivity/app/src/main/res/raw/._keystore.bks [new file with mode: 0644]
mainActivity/app/src/main/res/raw/halloween.crt [new file with mode: 0644]
mainActivity/app/src/main/res/raw/keystore.bks [new file with mode: 0644]
mainActivity/app/src/main/res/values-w820dp/._dimens.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values-w820dp/dimens.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values/._dimens.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values/._strings.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values/._styles.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values/dimens.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values/strings.xml [new file with mode: 0644]
mainActivity/app/src/main/res/values/styles.xml [new file with mode: 0644]
mainActivity/bin/AndroidManifest.xml [deleted file]
mainActivity/bin/classes.dex [deleted file]
mainActivity/bin/dexedLibs/android-support-v4-70fb0600066156aa2b6d08c87cc768e7.jar [deleted file]
mainActivity/bin/mainActivity.apk [deleted file]
mainActivity/bin/res/crunch/drawable-hdpi/ic_launcher.png [deleted file]
mainActivity/bin/res/crunch/drawable-mdpi/ic_launcher.png [deleted file]
mainActivity/bin/res/crunch/drawable-xhdpi/ic_launcher.png [deleted file]
mainActivity/bin/res/crunch/drawable-xxhdpi/ic_launcher.png [deleted file]
mainActivity/bin/resources.ap_ [deleted file]
mainActivity/build.gradle [new file with mode: 0644]
mainActivity/build/intermediates/dex-cache/cache.xml [new file with mode: 0644]
mainActivity/gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
mainActivity/gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
mainActivity/gradlew [new file with mode: 0755]
mainActivity/gradlew.bat [new file with mode: 0644]
mainActivity/import-summary.txt [new file with mode: 0644]
mainActivity/libs/android-support-v4.jar [deleted file]
mainActivity/lint.xml [deleted file]
mainActivity/local.properties [new file with mode: 0644]
mainActivity/mainActivity.iml [new file with mode: 0644]
mainActivity/project.properties [deleted file]
mainActivity/res/._drawable-hdpi [deleted file]
mainActivity/res/._drawable-mdpi [deleted file]
mainActivity/res/._drawable-xxhdpi [deleted file]
mainActivity/res/._values [deleted file]
mainActivity/res/drawable-hdpi/._ic_launcher.png [deleted file]
mainActivity/res/drawable-hdpi/def.jpg [deleted file]
mainActivity/res/drawable-hdpi/ic_launcher.png [deleted file]
mainActivity/res/drawable-mdpi/._ic_launcher.png [deleted file]
mainActivity/res/drawable-mdpi/def.jpg [deleted file]
mainActivity/res/drawable-mdpi/ic_launcher.png [deleted file]
mainActivity/res/drawable-xhdpi/._ic_launcher.png [deleted file]
mainActivity/res/drawable-xhdpi/def.jpg [deleted file]
mainActivity/res/drawable-xhdpi/ic_launcher.png [deleted file]
mainActivity/res/drawable-xxhdpi/._ic_launcher.png [deleted file]
mainActivity/res/drawable-xxhdpi/def.jpg [deleted file]
mainActivity/res/drawable-xxhdpi/ic_launcher.png [deleted file]
mainActivity/res/layout-land/download.xml [deleted file]
mainActivity/res/layout/activity_login.xml [deleted file]
mainActivity/res/layout/activity_my.xml [deleted file]
mainActivity/res/layout/aggiornamento.xml [deleted file]
mainActivity/res/layout/download.xml [deleted file]
mainActivity/res/layout/reimpostapass.xml [deleted file]
mainActivity/res/layout/ruledialog.xml [deleted file]
mainActivity/res/layout/string_layout.xml [deleted file]
mainActivity/res/layout/textviewgeneral.xml [deleted file]
mainActivity/res/menu/._my.xml [deleted file]
mainActivity/res/menu/login_set.xml [deleted file]
mainActivity/res/menu/menu_dow.xml [deleted file]
mainActivity/res/menu/my.xml [deleted file]
mainActivity/res/raw/._halloween.crt [deleted file]
mainActivity/res/raw/._keystore.bks [deleted file]
mainActivity/res/raw/halloween.crt [deleted file]
mainActivity/res/raw/keystore.bks [deleted file]
mainActivity/res/values-w820dp/._dimens.xml [deleted file]
mainActivity/res/values-w820dp/dimens.xml [deleted file]
mainActivity/res/values/._dimens.xml [deleted file]
mainActivity/res/values/._strings.xml [deleted file]
mainActivity/res/values/._styles.xml [deleted file]
mainActivity/res/values/dimens.xml [deleted file]
mainActivity/res/values/strings.xml [deleted file]
mainActivity/res/values/styles.xml [deleted file]
mainActivity/settings.gradle [new file with mode: 0644]
mainActivity/src/com/example/furt/myapplication/Border.java [deleted file]
mainActivity/src/com/example/furt/myapplication/BorderedTextView.java [deleted file]
mainActivity/src/com/example/furt/myapplication/CopyPasteDialog.java [deleted file]
mainActivity/src/com/example/furt/myapplication/DialogTouchHandler.java [deleted file]
mainActivity/src/com/example/furt/myapplication/DrawActivity.java [deleted file]
mainActivity/src/com/example/furt/myapplication/EliminationRule.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FView.java [deleted file]
mainActivity/src/com/example/furt/myapplication/Formula.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FormulaAnd.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FormulaBOT.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FormulaImpl.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FormulaNot.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FormulaOr.java [deleted file]
mainActivity/src/com/example/furt/myapplication/FormulaTOP.java [deleted file]
mainActivity/src/com/example/furt/myapplication/GenericFormula.java [deleted file]
mainActivity/src/com/example/furt/myapplication/Hypothesis.java [deleted file]
mainActivity/src/com/example/furt/myapplication/IntroductionRule.java [deleted file]
mainActivity/src/com/example/furt/myapplication/Literal.java [deleted file]
mainActivity/src/com/example/furt/myapplication/LongHPClick.java [deleted file]
mainActivity/src/com/example/furt/myapplication/MD5.java [deleted file]
mainActivity/src/com/example/furt/myapplication/MyService.java [deleted file]
mainActivity/src/com/example/furt/myapplication/Node.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleAndElimination.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleBotElimination.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleDialog.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleImplElimination.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleIntroduction.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleNotElimination.java [deleted file]
mainActivity/src/com/example/furt/myapplication/RuleOrElimination.java [deleted file]
mainActivity/src/com/example/furt/myapplication/ServerData.java [deleted file]
mainActivity/src/com/example/furt/myapplication/Tree.java [deleted file]
mainActivity/src/com/example/furt/myapplication/UndefinedFormula.java [deleted file]
mainActivity/src/com/example/furt/myapplication/aggiorna.java [deleted file]
mainActivity/src/com/example/furt/myapplication/aggiornamento.java [deleted file]
mainActivity/src/com/example/furt/myapplication/askFormula.java [deleted file]
mainActivity/src/com/example/furt/myapplication/download_page.java [deleted file]
mainActivity/src/com/example/furt/myapplication/global.java [deleted file]
mainActivity/src/com/example/furt/myapplication/listElem.java [deleted file]
mainActivity/src/com/example/furt/myapplication/longnodeHandler.java [deleted file]
mainActivity/src/com/example/furt/myapplication/mainActivity.java [deleted file]
mainActivity/src/com/example/furt/myapplication/operandClick.java [deleted file]
mainActivity/src/com/example/furt/myapplication/parser.java [deleted file]
mainActivity/src/com/example/furt/myapplication/parserDialog.java [deleted file]
mainActivity/src/com/example/furt/myapplication/personalDBHelper.java [deleted file]
mainActivity/src/com/example/furt/myapplication/personalTrackerContract.java [deleted file]
mainActivity/src/com/example/furt/myapplication/recuperaPass.java [deleted file]
mainActivity/src/com/example/furt/myapplication/serverComunication.java [deleted file]
mainActivity/src/com/example/furt/myapplication/suString.java [deleted file]
mainActivity/src/com/example/furt/myapplication/touchHPHandler.java [deleted file]
mainActivity/src/com/example/furt/myapplication/touchParserHandler.java [deleted file]
mainActivity/src/com/example/furt/myapplication/touchnodeHandler.java [deleted file]
mainActivity/src/com/example/furt/myapplication/valutazione.java [deleted file]

diff --git a/mainActivity/._AndroidManifest.xml b/mainActivity/._AndroidManifest.xml
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/._AndroidManifest.xml and /dev/null differ
diff --git a/mainActivity/.classpath b/mainActivity/.classpath
deleted file mode 100644 (file)
index 5176974..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
-       <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
-       <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="src" path="gen"/>
-       <classpathentry kind="output" path="bin/classes"/>
-</classpath>
diff --git a/mainActivity/.gradle/2.4/taskArtifacts/cache.properties b/mainActivity/.gradle/2.4/taskArtifacts/cache.properties
new file mode 100644 (file)
index 0000000..9488317
--- /dev/null
@@ -0,0 +1 @@
+#Mon Oct 19 16:57:34 CEST 2015
diff --git a/mainActivity/.gradle/2.4/taskArtifacts/cache.properties.lock b/mainActivity/.gradle/2.4/taskArtifacts/cache.properties.lock
new file mode 100644 (file)
index 0000000..c0731a4
Binary files /dev/null and b/mainActivity/.gradle/2.4/taskArtifacts/cache.properties.lock differ
diff --git a/mainActivity/.gradle/2.4/taskArtifacts/fileHashes.bin b/mainActivity/.gradle/2.4/taskArtifacts/fileHashes.bin
new file mode 100644 (file)
index 0000000..053fc42
Binary files /dev/null and b/mainActivity/.gradle/2.4/taskArtifacts/fileHashes.bin differ
diff --git a/mainActivity/.gradle/2.4/taskArtifacts/fileSnapshots.bin b/mainActivity/.gradle/2.4/taskArtifacts/fileSnapshots.bin
new file mode 100644 (file)
index 0000000..422fd52
Binary files /dev/null and b/mainActivity/.gradle/2.4/taskArtifacts/fileSnapshots.bin differ
diff --git a/mainActivity/.gradle/2.4/taskArtifacts/outputFileStates.bin b/mainActivity/.gradle/2.4/taskArtifacts/outputFileStates.bin
new file mode 100644 (file)
index 0000000..5c3b110
Binary files /dev/null and b/mainActivity/.gradle/2.4/taskArtifacts/outputFileStates.bin differ
diff --git a/mainActivity/.gradle/2.4/taskArtifacts/taskArtifacts.bin b/mainActivity/.gradle/2.4/taskArtifacts/taskArtifacts.bin
new file mode 100644 (file)
index 0000000..c6bf0c2
Binary files /dev/null and b/mainActivity/.gradle/2.4/taskArtifacts/taskArtifacts.bin differ
diff --git a/mainActivity/.idea/.name b/mainActivity/.idea/.name
new file mode 100644 (file)
index 0000000..563ac5a
--- /dev/null
@@ -0,0 +1 @@
+mainActivity
\ No newline at end of file
diff --git a/mainActivity/.idea/compiler.xml b/mainActivity/.idea/compiler.xml
new file mode 100644 (file)
index 0000000..96cc43e
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <resourceExtensions />
+    <wildcardResourcePatterns>
+      <entry name="!?*.java" />
+      <entry name="!?*.form" />
+      <entry name="!?*.class" />
+      <entry name="!?*.groovy" />
+      <entry name="!?*.scala" />
+      <entry name="!?*.flex" />
+      <entry name="!?*.kt" />
+      <entry name="!?*.clj" />
+      <entry name="!?*.aj" />
+    </wildcardResourcePatterns>
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="false">
+        <processorPath useClasspath="true" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.idea/copyright/profiles_settings.xml b/mainActivity/.idea/copyright/profiles_settings.xml
new file mode 100644 (file)
index 0000000..e7bedf3
--- /dev/null
@@ -0,0 +1,3 @@
+<component name="CopyrightManager">
+  <settings default="" />
+</component>
\ No newline at end of file
diff --git a/mainActivity/.idea/gradle.xml b/mainActivity/.idea/gradle.xml
new file mode 100644 (file)
index 0000000..bd4202c
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GradleSettings">
+    <option name="linkedExternalProjectsSettings">
+      <GradleProjectSettings>
+        <option name="distributionType" value="LOCAL" />
+        <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4" />
+        <option name="gradleJvm" value="1.8" />
+        <option name="modules">
+          <set>
+            <option value="$PROJECT_DIR$" />
+            <option value="$PROJECT_DIR$/app" />
+          </set>
+        </option>
+      </GradleProjectSettings>
+    </option>
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.idea/libraries/support_v4_19_1_0.xml b/mainActivity/.idea/libraries/support_v4_19_1_0.xml
new file mode 100644 (file)
index 0000000..db7d4f3
--- /dev/null
@@ -0,0 +1,11 @@
+<component name="libraryTable">
+  <library name="support-v4-19.1.0">
+    <CLASSES>
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES>
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>
\ No newline at end of file
diff --git a/mainActivity/.idea/misc.xml b/mainActivity/.idea/misc.xml
new file mode 100644 (file)
index 0000000..f49240e
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+    <OptionsSetting value="true" id="Add" />
+    <OptionsSetting value="true" id="Remove" />
+    <OptionsSetting value="true" id="Checkout" />
+    <OptionsSetting value="true" id="Update" />
+    <OptionsSetting value="true" id="Status" />
+    <OptionsSetting value="true" id="Edit" />
+    <ConfirmationsSetting value="0" id="Add" />
+    <ConfirmationsSetting value="0" id="Remove" />
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/build/classes" />
+  </component>
+  <component name="ProjectType">
+    <option name="id" value="Android" />
+  </component>
+  <component name="SvnBranchConfigurationManager">
+    <option name="mySupportsUserInfoFilter" value="true" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.idea/modules.xml b/mainActivity/.idea/modules.xml
new file mode 100644 (file)
index 0000000..d87a494
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
+      <module fileurl="file://$PROJECT_DIR$/mainActivity.iml" filepath="$PROJECT_DIR$/mainActivity.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.idea/runConfigurations.xml b/mainActivity/.idea/runConfigurations.xml
new file mode 100644 (file)
index 0000000..7f68460
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RunConfigurationProducerService">
+    <option name="ignoredProducers">
+      <set>
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
+      </set>
+    </option>
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.idea/vcs.xml b/mainActivity/.idea/vcs.xml
new file mode 100644 (file)
index 0000000..45cf85c
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="svn" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.idea/workspace.xml b/mainActivity/.idea/workspace.xml
new file mode 100644 (file)
index 0000000..4378a46
--- /dev/null
@@ -0,0 +1,1819 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AndroidLogFilters">
+    <option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" readonly="true" id="101f239c-f21b-4259-9293-2b8283a63a72" name="Default" comment="" />
+    <ignored path="mainActivity.iws" />
+    <ignored path=".idea/workspace.xml" />
+    <ignored path="$PROJECT_DIR$/build/classes/" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="TRACKING_ENABLED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+  <component name="CreatePatchCommitExecutor">
+    <option name="PATCH_PATH" value="" />
+  </component>
+  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
+  <component name="ExternalProjectsManager">
+    <system id="GRADLE">
+      <state>
+        <projects_view />
+      </state>
+    </system>
+  </component>
+  <component name="FavoritesManager">
+    <favorites_list name="mainActivity" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf />
+  </component>
+  <component name="GradleLocalSettings">
+    <option name="availableProjects">
+      <map>
+        <entry>
+          <key>
+            <ExternalProjectPojo>
+              <option name="name" value="mainActivity" />
+              <option name="path" value="$PROJECT_DIR$" />
+            </ExternalProjectPojo>
+          </key>
+          <value>
+            <list>
+              <ExternalProjectPojo>
+                <option name="name" value="mainActivity" />
+                <option name="path" value="$PROJECT_DIR$" />
+              </ExternalProjectPojo>
+              <ExternalProjectPojo>
+                <option name="name" value=":app" />
+                <option name="path" value="$PROJECT_DIR$/app" />
+              </ExternalProjectPojo>
+            </list>
+          </value>
+        </entry>
+      </map>
+    </option>
+    <option name="availableTasks">
+      <map>
+        <entry key="$PROJECT_DIR$">
+          <value>
+            <list>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the components produced by root project 'mainActivity'. [incubating]" />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="components" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays all dependencies declared in root project 'mainActivity'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="dependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the insight into a specific dependency in root project 'mainActivity'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="dependencyInsight" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays a help message." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="help" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Initializes a new Gradle build. [incubating]" />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="init" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the configuration model of root project 'mainActivity'. [incubating]" />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="model" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the sub-projects of root project 'mainActivity'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="projects" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the properties of root project 'mainActivity'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="properties" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the tasks runnable from root project 'mainActivity' (some of the displayed tasks may belong to subprojects)." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="tasks" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Generates Gradle wrapper files. [incubating]" />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="wrapper" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the Android dependencies of the project." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="androidDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all variants of all applications and secondary packages." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assemble" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all the Test applications." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assembleAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all Debug builds." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assembleDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assembleDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assembleDebugUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all Release builds." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assembleRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="assembleReleaseUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles and tests this project." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="build" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles and tests this project and all projects that depend on it." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="buildDependents" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles and tests this project and all projects it depends on." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="buildNeeded" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs all checks." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="check" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="checkDebugManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="checkReleaseManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Deletes the build directory." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="clean" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugAidl" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugAndroidTestAidl" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugAndroidTestJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugAndroidTestNdk" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugAndroidTestRenderscript" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugAndroidTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugNdk" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugRenderscript" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugUnitTestJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileDebugUnitTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileLint" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseAidl" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseNdk" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseRenderscript" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseUnitTestJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="compileReleaseUnitTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs and runs instrumentation tests for all flavors on connected devices." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="connectedAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs all device checks on currently connected devices." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="connectedCheck" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs and runs the tests for debug on connected devices." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="connectedDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs and runs instrumentation tests using all Device Providers." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="deviceAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs all device checks using Device Providers and Test Servers." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="deviceCheck" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="dexDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="dexDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="dexRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugAndroidTestAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugAndroidTestBuildConfig" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugAndroidTestResValues" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugAndroidTestResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugAndroidTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugBuildConfig" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugResValues" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateDebugSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateReleaseAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateReleaseBuildConfig" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateReleaseResValues" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateReleaseResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="generateReleaseSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="installDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs the android (on device) tests for the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="installDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="jarDebugClasses" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="jarReleaseClasses" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on all variants." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="lint" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="lintDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on the Release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="lintRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on just the fatal issues in the Release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="lintVitalRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mergeDebugAndroidTestAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mergeDebugAndroidTestResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mergeDebugAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mergeDebugResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mergeReleaseAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mergeReleaseResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Creates a version of android.jar that's suitable for unit tests." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="mockableAndroidJar" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="packageDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="packageDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="packageRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preDebugAndroidTestBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preDebugBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preDebugUnitTestBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preDexDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preDexDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preDexRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preReleaseBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="preReleaseUnitTestBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="prepareDebugAndroidTestDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="prepareDebugDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="prepareDebugUnitTestDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="prepareReleaseDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="prepareReleaseUnitTestDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugAndroidTestJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugAndroidTestManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugAndroidTestResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processDebugUnitTestJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processReleaseJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processReleaseManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processReleaseResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="processReleaseUnitTestJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the signing info for each variant." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="signingReport" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Prints out all the source sets defined in this project." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="sourceSets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Run unit tests for all variants." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="test" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Run unit tests for the debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="testDebugUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Run unit tests for the release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="testReleaseUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstall all applications." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="uninstallAll" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstalls the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="uninstallDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstalls the android (on device) tests for the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="uninstallDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstalls the Release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="uninstallRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="validateDebugSigning" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
+                <option name="name" value="zipalignDebug" />
+              </ExternalTaskPojo>
+            </list>
+          </value>
+        </entry>
+        <entry key="$PROJECT_DIR$/app">
+          <value>
+            <list>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the Android dependencies of the project." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="androidDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all variants of all applications and secondary packages." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assemble" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all the Test applications." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assembleAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all Debug builds." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assembleDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assembleDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assembleDebugUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles all Release builds." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assembleRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="assembleReleaseUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles and tests this project." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="build" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles and tests this project and all projects that depend on it." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="buildDependents" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Assembles and tests this project and all projects it depends on." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="buildNeeded" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs all checks." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="check" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="checkDebugManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="checkReleaseManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Deletes the build directory." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="clean" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugAidl" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugAndroidTestAidl" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugAndroidTestJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugAndroidTestNdk" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugAndroidTestRenderscript" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugAndroidTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugNdk" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugRenderscript" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugUnitTestJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileDebugUnitTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileLint" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseAidl" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseNdk" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseRenderscript" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseUnitTestJavaWithJavac" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="compileReleaseUnitTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the components produced by project ':app'. [incubating]" />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="components" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs and runs instrumentation tests for all flavors on connected devices." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="connectedAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs all device checks on currently connected devices." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="connectedCheck" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs and runs the tests for debug on connected devices." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="connectedDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays all dependencies declared in project ':app'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="dependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the insight into a specific dependency in project ':app'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="dependencyInsight" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs and runs instrumentation tests using all Device Providers." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="deviceAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs all device checks using Device Providers and Test Servers." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="deviceCheck" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="dexDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="dexDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="dexRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugAndroidTestAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugAndroidTestBuildConfig" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugAndroidTestResValues" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugAndroidTestResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugAndroidTestSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugBuildConfig" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugResValues" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateDebugSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateReleaseAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateReleaseBuildConfig" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateReleaseResValues" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateReleaseResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="generateReleaseSources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays a help message." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="help" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="installDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Installs the android (on device) tests for the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="installDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="jarDebugClasses" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="jarReleaseClasses" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on all variants." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="lint" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="lintDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on the Release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="lintRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Runs lint on just the fatal issues in the Release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="lintVitalRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mergeDebugAndroidTestAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mergeDebugAndroidTestResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mergeDebugAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mergeDebugResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mergeReleaseAssets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mergeReleaseResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Creates a version of android.jar that's suitable for unit tests." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="mockableAndroidJar" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the configuration model of project ':app'. [incubating]" />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="model" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="packageDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="packageDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="packageRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preDebugAndroidTestBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preDebugBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preDebugUnitTestBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preDexDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preDexDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preDexRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preReleaseBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="preReleaseUnitTestBuild" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="prepareDebugAndroidTestDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="prepareDebugDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="prepareDebugUnitTestDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="prepareReleaseDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="prepareReleaseUnitTestDependencies" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugAndroidTestJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugAndroidTestManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugAndroidTestResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processDebugUnitTestJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processReleaseJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processReleaseManifest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processReleaseResources" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="processReleaseUnitTestJavaRes" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the sub-projects of project ':app'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="projects" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the properties of project ':app'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="properties" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the signing info for each variant." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="signingReport" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Prints out all the source sets defined in this project." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="sourceSets" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Displays the tasks runnable from project ':app'." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="tasks" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Run unit tests for all variants." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="test" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Run unit tests for the debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="testDebugUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Run unit tests for the release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="testReleaseUnitTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstall all applications." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="uninstallAll" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstalls the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="uninstallDebug" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstalls the android (on device) tests for the Debug build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="uninstallDebugAndroidTest" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="description" value="Uninstalls the Release build." />
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="uninstallRelease" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="validateDebugSigning" />
+              </ExternalTaskPojo>
+              <ExternalTaskPojo>
+                <option name="linkedExternalProjectPath" value="$PROJECT_DIR$/app" />
+                <option name="name" value="zipalignDebug" />
+              </ExternalTaskPojo>
+            </list>
+          </value>
+        </entry>
+      </map>
+    </option>
+    <option name="modificationStamps">
+      <map>
+        <entry key="$PROJECT_DIR$" value="4335793648038" />
+      </map>
+    </option>
+    <option name="projectBuildClasspath">
+      <map>
+        <entry key="$PROJECT_DIR$">
+          <value>
+            <ExternalProjectBuildClasspathPojo>
+              <option name="modulesBuildClasspath">
+                <map>
+                  <entry key="$PROJECT_DIR$">
+                    <value>
+                      <ExternalModuleBuildClasspathPojo>
+                        <option name="entries">
+                          <list>
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle/1.3.0/gradle-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle/1.3.0/gradle-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle-core/1.3.0/gradle-core-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle-core/1.3.0/gradle-core-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder/1.3.0/builder-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder/1.3.0/builder-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint/24.3.0/lint-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint/24.3.0/lint-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdk-common/24.3.0/sdk-common-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdk-common/24.3.0/sdk-common-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/common/24.3.0/common-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/common/24.3.0/common-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-model/1.3.0/builder-model-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-model/1.3.0/builder-model-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/squareup/javawriter/2.5.0/javawriter-2.5.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/ddms/ddmlib/24.3.0/ddmlib-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/ddms/ddmlib/24.3.0/ddmlib-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdklib/24.3.0/sdklib-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdklib/24.3.0/sdklib-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/manifest-merger/24.3.0/manifest-merger-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/manifest-merger/24.3.0/manifest-merger-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm/5.0.3/asm-5.0.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-test-api/1.3.0/builder-test-api-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-test-api/1.3.0/builder-test-api-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-checks/24.3.0/lint-checks-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-checks/24.3.0/lint-checks-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/guava/guava/17.0/guava-17.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/guava/guava/17.0/guava-17.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/annotations/24.3.0/annotations-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/annotations/24.3.0/annotations-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/dvlib/24.3.0/dvlib-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/dvlib/24.3.0/dvlib-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/layoutlib/layoutlib-api/24.3.0/layoutlib-api-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/layoutlib/layoutlib-api/24.3.0/layoutlib-api-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/code/gson/gson/2.2.4/gson-2.2.4-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-api/24.3.0/lint-api-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-api/24.3.0/lint-api-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-codec/commons-codec/1.4/commons-codec-1.4-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/intellij/annotations/12.0/annotations-12.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/intellij/annotations/12.0/annotations-12.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar" />
+                          </list>
+                        </option>
+                        <option name="path" value="$PROJECT_DIR$" />
+                      </ExternalModuleBuildClasspathPojo>
+                    </value>
+                  </entry>
+                  <entry key="$PROJECT_DIR$/app">
+                    <value>
+                      <ExternalModuleBuildClasspathPojo>
+                        <option name="entries">
+                          <list>
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle/1.3.0/gradle-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle/1.3.0/gradle-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle-core/1.3.0/gradle-core-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle-core/1.3.0/gradle-core-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder/1.3.0/builder-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder/1.3.0/builder-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint/24.3.0/lint-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint/24.3.0/lint-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdk-common/24.3.0/sdk-common-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdk-common/24.3.0/sdk-common-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/common/24.3.0/common-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/common/24.3.0/common-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-model/1.3.0/builder-model-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-model/1.3.0/builder-model-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/squareup/javawriter/2.5.0/javawriter-2.5.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/ddms/ddmlib/24.3.0/ddmlib-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/ddms/ddmlib/24.3.0/ddmlib-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdklib/24.3.0/sdklib-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/sdklib/24.3.0/sdklib-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/manifest-merger/24.3.0/manifest-merger-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/manifest-merger/24.3.0/manifest-merger-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm/5.0.3/asm-5.0.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-test-api/1.3.0/builder-test-api-1.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/builder-test-api/1.3.0/builder-test-api-1.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-checks/24.3.0/lint-checks-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-checks/24.3.0/lint-checks-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/guava/guava/17.0/guava-17.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/guava/guava/17.0/guava-17.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/annotations/24.3.0/annotations-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/annotations/24.3.0/annotations-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/dvlib/24.3.0/dvlib-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/dvlib/24.3.0/dvlib-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/layoutlib/layoutlib-api/24.3.0/layoutlib-api-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/layoutlib/layoutlib-api/24.3.0/layoutlib-api-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/code/gson/gson/2.2.4/gson-2.2.4-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-api/24.3.0/lint-api-24.3.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/lint/lint-api/24.3.0/lint-api-24.3.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-codec/commons-codec/1.4/commons-codec-1.4-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/intellij/annotations/12.0/annotations-12.0-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/intellij/annotations/12.0/annotations-12.0.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3-sources.jar" />
+                            <option value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar" />
+                            <option value="$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar" />
+                          </list>
+                        </option>
+                        <option name="path" value="$PROJECT_DIR$/app" />
+                      </ExternalModuleBuildClasspathPojo>
+                    </value>
+                  </entry>
+                </map>
+              </option>
+              <option name="name" value="mainActivity" />
+              <option name="projectBuildClasspath">
+                <list>
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/plugins" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/resources-http" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/ide" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/tooling-api" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/jetty" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/ui" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/cli" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/ear" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/build-comparison" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/publish" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/sonar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/jacoco" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/open-api" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/messaging" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/plugin-development" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/platform-jvm" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/internal-testing" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/resources-sftp" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/language-scala" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/ide-native" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/dependency-management" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/signing" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/base-services" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/platform-native" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/diagnostics" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/announce" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/ivy" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/build-init" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/native" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/reporting" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/scala" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/tooling-api-builders" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/resources-s3" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/language-groovy" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/testing-native" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/osgi" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/core" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/antlr" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/platform-base" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/language-native" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/base-services-groovy" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/plugin-use" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/model-groovy" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/resources" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/language-jvm" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/wrapper" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/launcher" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/internal-integ-testing" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/code-quality" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/platform-play" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/javascript" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/model-core" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/maven" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/src/language-java" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-resources-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-docs-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-native-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-launcher-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-open-api-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-model-groovy-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/ant-launcher-1.9.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-model-core-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/groovy-all-2.3.10.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-base-services-groovy-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-messaging-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/ant-1.9.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-ui-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-cli-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-core-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-tooling-api-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-wrapper-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/gradle-base-services-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-plugin-use-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-antlr-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-platform-base-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-scala-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-reporting-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-signing-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-resources-s3-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/ivy-2.2.0.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-build-init-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-language-java-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-testing-native-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-jacoco-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-ivy-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-language-jvm-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-plugin-development-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-maven-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-osgi-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-platform-play-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-ear-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-language-groovy-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-javascript-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-platform-native-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-build-comparison-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-dependency-management-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-resources-sftp-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-platform-jvm-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-announce-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-plugins-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-language-scala-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-ide-native-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-tooling-api-builders-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-code-quality-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-sonar-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-resources-http-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-diagnostics-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-ide-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-publish-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-language-native-2.4.jar" />
+                  <option value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4/lib/plugins/gradle-jetty-2.4.jar" />
+                  <option value="$PROJECT_DIR$/buildSrc/src/main/java" />
+                  <option value="$PROJECT_DIR$/buildSrc/src/main/groovy" />
+                </list>
+              </option>
+            </ExternalProjectBuildClasspathPojo>
+          </value>
+        </entry>
+      </map>
+    </option>
+    <option name="externalProjectsViewState">
+      <projects_view />
+    </option>
+  </component>
+  <component name="MavenImportPreferences">
+    <option name="generalSettings">
+      <MavenGeneralSettings>
+        <option name="mavenHome" value="Bundled (Maven 3)" />
+      </MavenGeneralSettings>
+    </option>
+  </component>
+  <component name="NamedScopeManager">
+    <order />
+  </component>
+  <component name="ProjectFrameBounds">
+    <option name="y" value="27" />
+    <option name="width" value="1366" />
+    <option name="height" value="708" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+    <OptionsSetting value="true" id="Add" />
+    <OptionsSetting value="true" id="Remove" />
+    <OptionsSetting value="true" id="Checkout" />
+    <OptionsSetting value="true" id="Update" />
+    <OptionsSetting value="true" id="Status" />
+    <OptionsSetting value="true" id="Edit" />
+    <ConfirmationsSetting value="0" id="Add" />
+    <ConfirmationsSetting value="0" id="Remove" />
+  </component>
+  <component name="ProjectView">
+    <navigator currentView="ProjectPane" proportions="" version="1">
+      <flattenPackages />
+      <showMembers />
+      <showModules />
+      <showLibraryContents />
+      <hideEmptyPackages />
+      <abbreviatePackageNames />
+      <autoscrollToSource />
+      <autoscrollFromSource />
+      <sortByType />
+    </navigator>
+    <panes>
+      <pane id="AndroidView">
+        <subPane>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="mainActivity" />
+              <option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
+            </PATH_ELEMENT>
+          </PATH>
+        </subPane>
+      </pane>
+      <pane id="ProjectPane">
+        <subPane>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="mainActivity" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+          </PATH>
+        </subPane>
+      </pane>
+      <pane id="PackagesPane" />
+      <pane id="Scratches" />
+      <pane id="Scope" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="settings.editor.selected.configurable" value="vcs.Subversion" />
+    <property name="settings.editor.splitter.proportion" value="0.2" />
+    <property name="android.project.structure.last.selected" value="mainActivity" />
+    <property name="android.project.structure.proportion" value="0.15" />
+    <property name="recentsLimit" value="5" />
+    <property name="FullScreen" value="false" />
+    <property name="ANDROID_EXTENDED_DEVICE_CHOOSER_SERIALS" value="06548b0b" />
+    <property name="ANDROID_EXTENDED_DEVICE_CHOOSER_AVD" value="CSCAndroidEmulator" />
+  </component>
+  <component name="RunManager" selected="Android Application.app">
+    <configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
+      <module name="" />
+      <option name="ACTIVITY_CLASS" value="" />
+      <option name="ACTIVITY_EXTRA_FLAGS" value="" />
+      <option name="MODE" value="default_activity" />
+      <option name="DEPLOY" value="true" />
+      <option name="ARTIFACT_NAME" value="" />
+      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
+      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
+      <option name="PREFERRED_AVD" value="" />
+      <option name="USE_COMMAND_LINE" value="true" />
+      <option name="COMMAND_LINE" value="" />
+      <option name="WIPE_USER_DATA" value="false" />
+      <option name="DISABLE_BOOT_ANIMATION" value="false" />
+      <option name="NETWORK_SPEED" value="full" />
+      <option name="NETWORK_LATENCY" value="none" />
+      <option name="CLEAR_LOGCAT" value="false" />
+      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
+      <option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
+      <option name="FORCE_STOP_RUNNING_APP" value="true" />
+      <option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="0" />
+      <option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
+      <option name="SELECTED_CLOUD_DEVICE_CONFIGURATION_ID" value="0" />
+      <option name="SELECTED_CLOUD_DEVICE_PROJECT_ID" value="" />
+      <option name="IS_VALID_CLOUD_MATRIX_SELECTION" value="false" />
+      <option name="INVALID_CLOUD_MATRIX_SELECTION_ERROR" value="" />
+      <option name="IS_VALID_CLOUD_DEVICE_SELECTION" value="false" />
+      <option name="INVALID_CLOUD_DEVICE_SELECTION_ERROR" value="" />
+      <option name="CLOUD_DEVICE_SERIAL_NUMBER" value="" />
+      <method />
+    </configuration>
+    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
+      <module name="" />
+      <option name="TESTING_TYPE" value="0" />
+      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
+      <option name="METHOD_NAME" value="" />
+      <option name="CLASS_NAME" value="" />
+      <option name="PACKAGE_NAME" value="" />
+      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
+      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
+      <option name="PREFERRED_AVD" value="" />
+      <option name="USE_COMMAND_LINE" value="true" />
+      <option name="COMMAND_LINE" value="" />
+      <option name="WIPE_USER_DATA" value="false" />
+      <option name="DISABLE_BOOT_ANIMATION" value="false" />
+      <option name="NETWORK_SPEED" value="full" />
+      <option name="NETWORK_LATENCY" value="none" />
+      <option name="CLEAR_LOGCAT" value="false" />
+      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
+      <option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
+      <option name="FORCE_STOP_RUNNING_APP" value="true" />
+      <option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="0" />
+      <option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
+      <option name="SELECTED_CLOUD_DEVICE_CONFIGURATION_ID" value="0" />
+      <option name="SELECTED_CLOUD_DEVICE_PROJECT_ID" value="" />
+      <option name="IS_VALID_CLOUD_MATRIX_SELECTION" value="false" />
+      <option name="INVALID_CLOUD_MATRIX_SELECTION_ERROR" value="" />
+      <option name="IS_VALID_CLOUD_DEVICE_SELECTION" value="false" />
+      <option name="INVALID_CLOUD_DEVICE_SELECTION_ERROR" value="" />
+      <option name="CLOUD_DEVICE_SERIAL_NUMBER" value="" />
+      <method />
+    </configuration>
+    <configuration default="true" type="Application" factoryName="Application">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="true" type="GroovyScriptRunConfiguration" factoryName="Groovy">
+      <module name="" />
+      <setting name="path" value="" />
+      <setting name="vmparams" value="" />
+      <setting name="params" value="" />
+      <setting name="workDir" value="file://$PROJECT_DIR$" />
+      <setting name="debug" value="false" />
+      <method />
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <envs />
+      <patterns />
+      <method />
+    </configuration>
+    <configuration default="true" type="JarApplication" factoryName="JAR Application">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+      <method />
+    </configuration>
+    <configuration default="true" type="TestNG" factoryName="TestNG">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="SUITE_NAME" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="GROUP_NAME" />
+      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="OUTPUT_DIRECTORY" />
+      <option name="ANNOTATION_TYPE" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
+      <option name="PROPERTIES_FILE" />
+      <envs />
+      <properties />
+      <listeners />
+      <method />
+    </configuration>
+    <configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android Application">
+      <module name="app" />
+      <option name="ACTIVITY_CLASS" value="" />
+      <option name="ACTIVITY_EXTRA_FLAGS" value="" />
+      <option name="MODE" value="default_activity" />
+      <option name="DEPLOY" value="true" />
+      <option name="ARTIFACT_NAME" value="" />
+      <option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
+      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
+      <option name="PREFERRED_AVD" value="" />
+      <option name="USE_COMMAND_LINE" value="true" />
+      <option name="COMMAND_LINE" value="" />
+      <option name="WIPE_USER_DATA" value="false" />
+      <option name="DISABLE_BOOT_ANIMATION" value="false" />
+      <option name="NETWORK_SPEED" value="full" />
+      <option name="NETWORK_LATENCY" value="none" />
+      <option name="CLEAR_LOGCAT" value="false" />
+      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
+      <option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
+      <option name="FORCE_STOP_RUNNING_APP" value="true" />
+      <option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="0" />
+      <option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
+      <option name="SELECTED_CLOUD_DEVICE_CONFIGURATION_ID" value="0" />
+      <option name="SELECTED_CLOUD_DEVICE_PROJECT_ID" value="" />
+      <option name="IS_VALID_CLOUD_MATRIX_SELECTION" value="false" />
+      <option name="INVALID_CLOUD_MATRIX_SELECTION_ERROR" value="" />
+      <option name="IS_VALID_CLOUD_DEVICE_SELECTION" value="false" />
+      <option name="INVALID_CLOUD_DEVICE_SELECTION_ERROR" value="" />
+      <option name="CLOUD_DEVICE_SERIAL_NUMBER" value="" />
+      <method />
+    </configuration>
+    <list size="1">
+      <item index="0" class="java.lang.String" itemvalue="Android Application.app" />
+    </list>
+    <configuration name="&lt;template&gt;" type="Applet" default="true" selected="false">
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+    </configuration>
+    <configuration name="&lt;template&gt;" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
+      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
+    </configuration>
+  </component>
+  <component name="ShelveChangesManager" show_recycled="false" />
+  <component name="SvnConfiguration" cleanupOnStartRun="true">
+    <configuration>$USER_HOME$/.subversion</configuration>
+    <supportedVersion>125</supportedVersion>
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="101f239c-f21b-4259-9293-2b8283a63a72" name="Default" comment="" />
+      <created>1445264549146</created>
+      <option name="number" value="Default" />
+      <updated>1445264549146</updated>
+    </task>
+    <servers />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="0" y="27" width="1366" height="708" extended-state="6" />
+    <editor active="false" />
+    <layout>
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32971016" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+      <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32789856" sideWeight="0.5060514" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Android Monitor" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32789856" sideWeight="0.49394855" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32971016" sideWeight="0.4969743" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24962178" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Android Model" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+    </layout>
+  </component>
+  <component name="Vcs.Log.UiProperties">
+    <option name="RECENTLY_FILTERED_USER_GROUPS">
+      <collection />
+    </option>
+    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
+      <collection />
+    </option>
+  </component>
+  <component name="VcsContentAnnotationSettings">
+    <option name="myLimit" value="2678400000" />
+  </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager />
+    <watches-manager />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/build.gradle">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/build.gradle">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/gradlew">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/import-summary.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="-1.2044729">
+          <caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/gradlew">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/build.gradle">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>
\ No newline at end of file
diff --git a/mainActivity/.project b/mainActivity/.project
deleted file mode 100644 (file)
index 53dc2e1..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>mainActivity</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>com.android.ide.eclipse.adt.ApkBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/mainActivity/.settings/org.eclipse.jdt.core.prefs b/mainActivity/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 7341ab1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/mainActivity/AndroidManifest.xml b/mainActivity/AndroidManifest.xml
deleted file mode 100755 (executable)
index b9b6088..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.furt.myapplication" >
-    <uses-sdk
-        android:minSdkVersion="16"
-        android:targetSdkVersion="19" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/def"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".mainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity
-            android:name=".DrawActivity"
-            android:label="@string/app_name"
-            android:configChanges="orientation|screenSize">
-
-        </activity>
-        <service
-            android:name=".MyService"
-            android:exported="false"/>
-        <activity
-            android:name=".download_page"
-            android:configChanges="orientation|screenSize">
-            android:label="@string/listEs" >
-        </activity>
-        <activity
-            android:name=".aggiornamento"
-            android:label="@string/app_name" >
-        </activity>
-        <activity
-            android:name=".recuperaPass"
-            android:label="@string/app_name" >
-        </activity>
-    </application>
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
-</manifest>
diff --git a/mainActivity/app/app.iml b/mainActivity/app/app.iml
new file mode 100644 (file)
index 0000000..2e3372b
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="mainActivity" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="android-gradle" name="Android-Gradle">
+      <configuration>
+        <option name="GRADLE_PROJECT_PATH" value=":app" />
+      </configuration>
+    </facet>
+    <facet type="android" name="Android">
+      <configuration>
+        <option name="SELECTED_BUILD_VARIANT" value="debug" />
+        <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
+        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
+        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
+        <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
+        <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
+        <afterSyncTasks>
+          <task>generateDebugAndroidTestSources</task>
+          <task>generateDebugSources</task>
+        </afterSyncTasks>
+        <option name="ALLOW_USER_CONFIGURATION" value="false" />
+        <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
+        <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
+        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
+        <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
+    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
+      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
+    </content>
+    <orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" exported="" name="support-v4-19.1.0" level="project" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/mainActivity/app/build.gradle b/mainActivity/app/build.gradle
new file mode 100644 (file)
index 0000000..7dc6364
--- /dev/null
@@ -0,0 +1,27 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 19
+    buildToolsVersion "23.0.1"
+
+    defaultConfig {
+        applicationId "com.example.furt.myapplication"
+        minSdkVersion 16
+        targetSdkVersion 19
+        compileOptions {
+            sourceCompatibility JavaVersion.VERSION_1_7
+            targetCompatibility JavaVersion.VERSION_1_7
+        }
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+        }
+    }
+}
+
+dependencies {
+    compile 'com.android.support:support-v4:19.1.0'
+}
diff --git a/mainActivity/app/build/generated/source/buildConfig/androidTest/debug/com/example/furt/myapplication/test/BuildConfig.java b/mainActivity/app/build/generated/source/buildConfig/androidTest/debug/com/example/furt/myapplication/test/BuildConfig.java
new file mode 100644 (file)
index 0000000..365acb0
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package com.example.furt.myapplication.test;
+
+public final class BuildConfig {
+  public static final boolean DEBUG = Boolean.parseBoolean("true");
+  public static final String APPLICATION_ID = "com.example.furt.myapplication.test";
+  public static final String BUILD_TYPE = "debug";
+  public static final String FLAVOR = "";
+  public static final int VERSION_CODE = -1;
+  public static final String VERSION_NAME = "";
+}
diff --git a/mainActivity/app/build/generated/source/buildConfig/debug/com/example/furt/myapplication/BuildConfig.java b/mainActivity/app/build/generated/source/buildConfig/debug/com/example/furt/myapplication/BuildConfig.java
new file mode 100644 (file)
index 0000000..20b4022
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package com.example.furt.myapplication;
+
+public final class BuildConfig {
+  public static final boolean DEBUG = Boolean.parseBoolean("true");
+  public static final String APPLICATION_ID = "com.example.furt.myapplication";
+  public static final String BUILD_TYPE = "debug";
+  public static final String FLAVOR = "";
+  public static final int VERSION_CODE = -1;
+  public static final String VERSION_NAME = "";
+}
diff --git a/mainActivity/app/build/generated/source/r/debug/com/example/furt/myapplication/R.java b/mainActivity/app/build/generated/source/r/debug/com/example/furt/myapplication/R.java
new file mode 100644 (file)
index 0000000..9816617
--- /dev/null
@@ -0,0 +1,94 @@
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package com.example.furt.myapplication;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class dimen {
+        public static final int activity_horizontal_margin=0x7f050000;
+        public static final int activity_vertical_margin=0x7f050001;
+    }
+    public static final class drawable {
+        public static final int def=0x7f020000;
+        public static final int ic_launcher=0x7f020001;
+    }
+    public static final class id {
+        public static final int abandon=0x7f09001c;
+        public static final int aggiorna=0x7f09000f;
+        public static final int annulla=0x7f090014;
+        public static final int button2=0x7f090005;
+        public static final int dlglobal=0x7f09000e;
+        public static final int esci=0x7f09001b;
+        public static final int formulaLayout=0x7f090017;
+        public static final int glob_agg=0x7f09000a;
+        public static final int global=0x7f090009;
+        public static final int hpscroll=0x7f090006;
+        public static final int invia=0x7f090013;
+        public static final int listView=0x7f09000d;
+        public static final int literals=0x7f090015;
+        public static final int loading=0x7f09000b;
+        public static final int login=0x7f090001;
+        public static final int logout=0x7f090002;
+        public static final int newPass=0x7f090012;
+        public static final int oldPass=0x7f090003;
+        public static final int operators=0x7f090016;
+        public static final int passreim=0x7f090011;
+        public static final int progressBar=0x7f09000c;
+        public static final int recupera=0x7f090019;
+        public static final int reimposta=0x7f09001a;
+        public static final int rowTextView=0x7f090018;
+        public static final int scrollView3=0x7f090000;
+        public static final int startEs=0x7f090010;
+        public static final int userId=0x7f090004;
+        public static final int vscroll=0x7f090007;
+        public static final int window=0x7f090008;
+    }
+    public static final class layout {
+        public static final int activity_login=0x7f030000;
+        public static final int activity_my=0x7f030001;
+        public static final int aggiornamento=0x7f030002;
+        public static final int download=0x7f030003;
+        public static final int reimpostapass=0x7f030004;
+        public static final int ruledialog=0x7f030005;
+        public static final int string_layout=0x7f030006;
+        public static final int textviewgeneral=0x7f030007;
+    }
+    public static final class menu {
+        public static final int login_set=0x7f080000;
+        public static final int menu_dow=0x7f080001;
+        public static final int my=0x7f080002;
+    }
+    public static final class raw {
+        public static final int halloween=0x7f040000;
+        public static final int keystore=0x7f040001;
+    }
+    public static final class string {
+        public static final int Credenziali=0x7f060000;
+        public static final int action_settings=0x7f060001;
+        public static final int aggiornamento=0x7f060002;
+        public static final int app_name=0x7f060003;
+        public static final int esci=0x7f060004;
+        public static final int first=0x7f060005;
+        public static final int hello_world=0x7f060006;
+        public static final int invia=0x7f060007;
+        public static final int listEs=0x7f060008;
+        public static final int listaEsercizi=0x7f060009;
+        public static final int pass=0x7f06000a;
+        public static final int recuperapass=0x7f06000b;
+        public static final int registrati=0x7f06000c;
+        public static final int reimposta=0x7f06000d;
+        public static final int sync=0x7f06000e;
+        public static final int user=0x7f06000f;
+    }
+    public static final class style {
+        /**  Customize your theme here. 
+         */
+        public static final int AppTheme=0x7f070000;
+    }
+}
diff --git a/mainActivity/app/build/intermediates/dex/debug/classes.dex b/mainActivity/app/build/intermediates/dex/debug/classes.dex
new file mode 100644 (file)
index 0000000..2996aa0
Binary files /dev/null and b/mainActivity/app/build/intermediates/dex/debug/classes.dex differ
diff --git a/mainActivity/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store b/mainActivity/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store
new file mode 100644 (file)
index 0000000..8b8400d
Binary files /dev/null and b/mainActivity/app/build/intermediates/incremental/aidl/androidTest/debug/dependency.store differ
diff --git a/mainActivity/app/build/intermediates/incremental/aidl/debug/dependency.store b/mainActivity/app/build/intermediates/incremental/aidl/debug/dependency.store
new file mode 100644 (file)
index 0000000..8b8400d
Binary files /dev/null and b/mainActivity/app/build/intermediates/incremental/aidl/debug/dependency.store differ
diff --git a/mainActivity/app/build/intermediates/incremental/mergeAssets/androidTest/debug/merger.xml b/mainActivity/app/build/intermediates/incremental/mergeAssets/androidTest/debug/merger.xml
new file mode 100644 (file)
index 0000000..b255e4d
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet config="main"><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/androidTest/assets"/></dataSet></merger>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/incremental/mergeAssets/debug/merger.xml b/mainActivity/app/build/intermediates/incremental/mergeAssets/debug/merger.xml
new file mode 100644 (file)
index 0000000..531914c
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet config="main"><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/assets"/></dataSet><dataSet config="debug"><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/debug/assets"/></dataSet></merger>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/incremental/mergeResourcesandroidTest/debug/merger.xml b/mainActivity/app/build/intermediates/incremental/mergeResourcesandroidTest/debug/merger.xml
new file mode 100644 (file)
index 0000000..5d353ae
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet config="main"><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/androidTest/res"/><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/build/generated/res/rs/androidTest/debug"/><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/build/generated/res/resValues/androidTest/debug"/></dataSet><mergedItems/></merger>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/incremental/mergeResourcesdebug/merger.xml b/mainActivity/app/build/intermediates/incremental/mergeResourcesdebug/merger.xml
new file mode 100644 (file)
index 0000000..c954e90
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet config="main"><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res"><file name="def" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-xxhdpi/def.jpg" qualifiers="xxhdpi" type="drawable"/><file name="ic_launcher" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-xxhdpi/ic_launcher.png" qualifiers="xxhdpi" type="drawable"/><file path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values/dimens.xml" qualifiers=""><dimen name="activity_vertical_margin">16dp</dimen><dimen name="activity_horizontal_margin">16dp</dimen></file><file path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values/styles.xml" qualifiers=""><style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+    </style></file><file path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values/strings.xml" qualifiers=""><string name="hello_world">inserisci una stringa</string><string name="action_settings">Settings</string><string name="app_name">LogicPlayer</string><string name="recuperapass">recupera password</string><string name="listEs">Lista esercizi:</string><string name="reimposta">Reimposta password</string><string name="first">download disponibili:</string><string name="sync">Aggiorna</string><string name="invia">accedi</string><string name="listaEsercizi">Lista esercizi:</string><string name="registrati">registrati</string><string name="Credenziali">Inserisci le tue credenziali:</string><string name="aggiornamento">sto aggiornando</string><string name="pass">password</string><string name="esci">Esci</string><string name="user">Username</string></file><file name="activity_my" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/activity_my.xml" qualifiers="" type="layout"/><file name="aggiornamento" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/aggiornamento.xml" qualifiers="" type="layout"/><file name="ruledialog" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/ruledialog.xml" qualifiers="" type="layout"/><file name="reimpostapass" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/reimpostapass.xml" qualifiers="" type="layout"/><file name="activity_login" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/activity_login.xml" qualifiers="" type="layout"/><file name="string_layout" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/string_layout.xml" qualifiers="" type="layout"/><file name="textviewgeneral" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/textviewgeneral.xml" qualifiers="" type="layout"/><file name="download" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/download.xml" qualifiers="" type="layout"/><file path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values-w820dp/dimens.xml" qualifiers="w820dp"><dimen name="activity_horizontal_margin">64dp</dimen></file><file name="login_set" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/menu/login_set.xml" qualifiers="" type="menu"/><file name="my" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/menu/my.xml" qualifiers="" type="menu"/><file name="menu_dow" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/menu/menu_dow.xml" qualifiers="" type="menu"/><file name="download" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout-land/download.xml" qualifiers="land" type="layout"/><file name="def" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-hdpi/def.jpg" qualifiers="hdpi" type="drawable"/><file name="ic_launcher" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-hdpi/ic_launcher.png" qualifiers="hdpi" type="drawable"/><file name="def" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-xhdpi/def.jpg" qualifiers="xhdpi" type="drawable"/><file name="ic_launcher" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-xhdpi/ic_launcher.png" qualifiers="xhdpi" type="drawable"/><file name="halloween" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/raw/halloween.crt" qualifiers="" type="raw"/><file name="keystore" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/raw/keystore.bks" qualifiers="" type="raw"/><file name="def" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-mdpi/def.jpg" qualifiers="mdpi" type="drawable"/><file name="ic_launcher" path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/drawable-mdpi/ic_launcher.png" qualifiers="mdpi" type="drawable"/></source><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/build/generated/res/rs/debug"/><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/build/generated/res/resValues/debug"/></dataSet><dataSet config="debug"><source path="/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/debug/res"/></dataSet><mergedItems/></merger>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/manifest/androidTest/debug/AndroidManifest.xml b/mainActivity/app/build/intermediates/manifest/androidTest/debug/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..160594a
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.furt.myapplication.test">
+
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="19" />
+
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <instrumentation android:name="android.test.InstrumentationTestRunner"
+                     android:targetPackage="com.example.furt.myapplication"
+                     android:handleProfiling="false"
+                     android:functionalTest="false"
+                     android:label="Tests for com.example.furt.myapplication"/>
+</manifest>
diff --git a/mainActivity/app/build/intermediates/manifests/full/debug/AndroidManifest.xml b/mainActivity/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..5aea220
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.furt.myapplication" >
+
+    <uses-sdk
+        android:minSdkVersion="16"
+        android:targetSdkVersion="19" />
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/def"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.furt.myapplication.mainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="com.example.furt.myapplication.DrawActivity"
+            android:configChanges="orientation|screenSize"
+            android:label="@string/app_name" >
+        </activity>
+
+        <service
+            android:name="com.example.furt.myapplication.MyService"
+            android:exported="false" />
+
+        <activity
+            android:name="com.example.furt.myapplication.download_page"
+            android:configChanges="orientation|screenSize" >
+            android:label="@string/listEs" >
+        </activity>
+        <activity
+            android:name="com.example.furt.myapplication.aggiornamento"
+            android:label="@string/app_name" >
+        </activity>
+        <activity
+            android:name="com.example.furt.myapplication.recuperaPass"
+            android:label="@string/app_name" >
+        </activity>
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/pre-dexed/debug/support-v4-19.1.0-8faefc2ba4cd5a2975855f5f7f9dd384b0788ebc.jar b/mainActivity/app/build/intermediates/pre-dexed/debug/support-v4-19.1.0-8faefc2ba4cd5a2975855f5f7f9dd384b0788ebc.jar
new file mode 100644 (file)
index 0000000..43e66b0
Binary files /dev/null and b/mainActivity/app/build/intermediates/pre-dexed/debug/support-v4-19.1.0-8faefc2ba4cd5a2975855f5f7f9dd384b0788ebc.jar differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/def.jpg b/mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/def.jpg
new file mode 100644 (file)
index 0000000..e81ddc1
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/def.jpg differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/ic_launcher.png b/mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..bcfa058
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-hdpi/ic_launcher.png differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/def.jpg b/mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/def.jpg
new file mode 100644 (file)
index 0000000..39cdd6e
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/def.jpg differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/ic_launcher.png b/mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..85848ff
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-mdpi/ic_launcher.png differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/def.jpg b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/def.jpg
new file mode 100644 (file)
index 0000000..47e817d
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/def.jpg differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/ic_launcher.png b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..916901e
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xhdpi/ic_launcher.png differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/def.jpg b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/def.jpg
new file mode 100644 (file)
index 0000000..8d7903d
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/def.jpg differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/ic_launcher.png b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..b36186f
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/drawable-xxhdpi/ic_launcher.png differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout-land/download.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout-land/download.xml
new file mode 100644 (file)
index 0000000..715bb8b
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:id="@+id/dlglobal">
+
+    <Button
+        style="?android:attr/buttonStyleSmall"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="aggiorna"
+        android:paddingRight="10dp"
+        android:layout_marginRight="10dp"
+        android:id="@+id/aggiorna" />
+
+    <Button
+        style="?android:attr/buttonStyleSmall"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="logout"
+        android:id="@+id/logout"
+        android:layout_alignParentTop="true"
+        android:layout_toRightOf="@+id/aggiorna"
+        android:layout_toEndOf="@+id/aggiorna" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/startEs"
+        android:text="Lista degli Esercizi:"
+        android:textSize="30sp"
+        android:layout_below="@+id/aggiorna"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true" />
+
+</RelativeLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout-land/download.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/activity_login.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/activity_login.xml
new file mode 100644 (file)
index 0000000..32257c6
--- /dev/null
@@ -0,0 +1,72 @@
+<RelativeLayout
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <ScrollView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/scrollView3">
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:paddingLeft="@dimen/activity_horizontal_margin"
+            android:paddingRight="@dimen/activity_horizontal_margin"
+            android:paddingTop="@dimen/activity_vertical_margin"
+            android:paddingBottom="@dimen/activity_vertical_margin"
+            tools:context=".activity_login">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Inserisci le tue credenziali:"
+                android:id="@+id/login"/>
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/invia"
+                android:id="@+id/logout"
+                android:layout_below="@+id/oldPass"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="61dp"
+                android:width="120dp" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textPassword"
+                android:ems="10"
+                android:id="@+id/oldPass"
+                android:hint="@string/pass"
+                android:layout_below="@+id/userId"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true"
+                android:layout_marginTop="29dp"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true" />
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textEmailAddress"
+                android:ems="10"
+                android:id="@+id/userId"
+                android:hint="nome.cognome@studio.unibo.it"
+                android:layout_alignParentTop="true"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_marginTop="31dp"
+                android:layout_alignRight="@+id/oldPass"
+                android:layout_alignEnd="@+id/oldPass"
+                android:autoText="false" />
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/registrati"
+                android:id="@+id/button2"
+                android:layout_below="@+id/logout"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="31dp"
+                android:width="120dp" />
+        </RelativeLayout>
+    </ScrollView>
+</RelativeLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/activity_login.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/activity_my.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/activity_my.xml
new file mode 100644 (file)
index 0000000..32fe5f3
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_width="match_parent"
+        android:background="@android:color/holo_blue_light"
+        android:id="@+id/hpscroll"
+        android:layout_height="wrap_content"
+        tools:context=".MyActivity">
+    </RelativeLayout>
+    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:id="@+id/vscroll"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_height="fill_parent"
+        android:fillViewport="false"
+        tools:context=".MainActivity">
+
+        <HorizontalScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:id="@+id/window"
+            android:fillViewport="true">
+            <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                xmlns:tools="http://schemas.android.com/tools"
+                android:layout_width="wrap_content"
+                android:layout_height="7000dp"
+                android:id="@+id/global"
+                tools:context=".MyActivity">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_centerHorizontal="true" />
+            </RelativeLayout>
+        </HorizontalScrollView>
+    </ScrollView>
+</LinearLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/activity_my.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/aggiornamento.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/aggiornamento.xml
new file mode 100644 (file)
index 0000000..f030ef4
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:id="@+id/glob_agg">
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/aggiornamento"
+        android:textSize="20sp"
+        android:id="@+id/loading"
+        android:layout_gravity="center_horizontal"
+        android:layout_alignParentTop="true"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="192dp" />
+
+    <ProgressBar
+        style="?android:attr/progressBarStyleLarge"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/progressBar"
+        android:layout_marginTop="39dp"
+        android:layout_centerHorizontal="true" />
+
+</RelativeLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/aggiornamento.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/download.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/download.xml
new file mode 100644 (file)
index 0000000..a287403
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <ListView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/listView"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true" />
+
+</RelativeLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/download.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/reimpostapass.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/reimpostapass.xml
new file mode 100644 (file)
index 0000000..337bb3b
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_height="fill_parent"
+        android:fillViewport="false"
+        tools:context=".recuperaPass">
+        <RelativeLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            xmlns:android="http://schemas.android.com/apk/res/android">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Inserisci le tue credenziali:"
+                android:id="@+id/passreim"
+                android:layout_alignParentTop="true"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:textSize="24dp" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textEmailAddress"
+                android:ems="10"
+                android:id="@+id/userId"
+                android:hint="nome.cognome@studio.unibo.it"
+                android:layout_below="@+id/passreim"
+                android:layout_marginTop="69dp"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textPassword"
+                android:ems="10"
+                android:id="@+id/oldPass"
+                android:hint="vecchia password"
+                android:layout_below="@+id/userId"
+                android:layout_marginTop="50dp"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textPassword"
+                android:ems="10"
+                android:id="@+id/newPass"
+                android:layout_below="@+id/oldPass"
+                android:layout_marginTop="56dp"
+                android:hint="nuova password"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true" />
+
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Invia"
+                android:id="@+id/invia"
+                android:layout_marginTop="30dp"
+                android:width="120dp"
+                android:layout_below="@+id/newPass"
+                android:layout_centerHorizontal="true" />
+
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="annulla"
+                android:id="@+id/annulla"
+                android:layout_below="@+id/invia"
+                android:layout_alignLeft="@+id/invia"
+                android:layout_alignStart="@+id/invia"
+                android:layout_marginTop="30dp"
+                android:width="120dp" />
+        </RelativeLayout>
+    </ScrollView>
+</RelativeLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/reimpostapass.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/ruledialog.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/ruledialog.xml
new file mode 100644 (file)
index 0000000..f5bfe35
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="fill_parent"
+    android:fillViewport="false"
+    tools:context=".MainActivity">
+
+    <HorizontalScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/window"
+        android:fillViewport="true">
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="wrap_content"
+            android:layout_height="1dp"
+            android:id="@+id/global"
+            tools:context=".MyActivity">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true" />
+        </RelativeLayout>
+    </HorizontalScrollView>
+
+</ScrollView><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/ruledialog.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/string_layout.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/string_layout.xml
new file mode 100644 (file)
index 0000000..63c4898
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <HorizontalScrollView
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:background="@android:color/holo_blue_light"
+        android:fillViewport="true">
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="wrap_content"
+            android:id="@+id/literals"
+            android:layout_height="match_parent">
+        </RelativeLayout>
+    </HorizontalScrollView>
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="match_parent"
+            android:background="@android:color/holo_orange_light"
+            android:id="@+id/operators"
+            android:layout_height="40dp"
+            tools:context=".MyActivity">
+        </RelativeLayout>
+
+        <HorizontalScrollView
+            android:layout_width="match_parent"
+            android:layout_height="100dp"
+            android:fillViewport="true">
+            <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                xmlns:tools="http://schemas.android.com/tools"
+                android:layout_width="wrap_content"
+                android:layout_height="100dp"
+                android:id="@+id/formulaLayout"
+                tools:context=".MyActivity">
+            </RelativeLayout>
+        </HorizontalScrollView>
+</LinearLayout><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/string_layout.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/layout/textviewgeneral.xml b/mainActivity/app/build/intermediates/res/merged/debug/layout/textviewgeneral.xml
new file mode 100644 (file)
index 0000000..ac78f3d
--- /dev/null
@@ -0,0 +1,9 @@
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/rowTextView"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:padding="10dp"
+    android:textSize="20sp"
+    android:textColor="@android:color/black">
+</TextView><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/layout/textviewgeneral.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/menu/login_set.xml b/mainActivity/app/build/intermediates/res/merged/debug/menu/login_set.xml
new file mode 100644 (file)
index 0000000..5f31483
--- /dev/null
@@ -0,0 +1,13 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MyActivity" >
+    <item android:id="@+id/recupera"
+        android:title="@string/recuperapass"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+    <item android:id="@+id/reimposta"
+        android:title="@string/reimposta"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
+<!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/menu/login_set.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/menu/menu_dow.xml b/mainActivity/app/build/intermediates/res/merged/debug/menu/menu_dow.xml
new file mode 100644 (file)
index 0000000..363f0e8
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<menu
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MyActivity" >
+    <item android:id="@+id/aggiorna"
+    android:title="@string/sync"
+    android:orderInCategory="100"
+    android:showAsAction="never" />
+    <item android:id="@+id/esci"
+    android:title="@string/esci"
+    android:orderInCategory="100"
+    android:showAsAction="never" />
+</menu><!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/menu/menu_dow.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/menu/my.xml b/mainActivity/app/build/intermediates/res/merged/debug/menu/my.xml
new file mode 100644 (file)
index 0000000..6b76832
--- /dev/null
@@ -0,0 +1,9 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MyActivity" >
+    <item android:id="@+id/abandon"
+        android:title="Abbandona esercizio"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
+<!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/menu/my.xml -->
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/raw/halloween.crt b/mainActivity/app/build/intermediates/res/merged/debug/raw/halloween.crt
new file mode 100644 (file)
index 0000000..e60e9db
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/raw/halloween.crt differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/raw/keystore.bks b/mainActivity/app/build/intermediates/res/merged/debug/raw/keystore.bks
new file mode 100644 (file)
index 0000000..1d03af4
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/merged/debug/raw/keystore.bks differ
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/values-w820dp/values-w820dp.xml b/mainActivity/app/build/intermediates/res/merged/debug/values-w820dp/values-w820dp.xml
new file mode 100644 (file)
index 0000000..a24b4ca
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values-w820dp/dimens.xml -->
+    <eat-comment/>
+    <dimen name="activity_horizontal_margin">64dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/merged/debug/values/values.xml b/mainActivity/app/build/intermediates/res/merged/debug/values/values.xml
new file mode 100644 (file)
index 0000000..31f47da
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values/dimens.xml -->
+    <eat-comment/>
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
+    <!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values/strings.xml -->
+    <eat-comment/>
+    <string name="Credenziali">Inserisci le tue credenziali:</string>
+    <string name="action_settings">Settings</string>
+    <string name="aggiornamento">sto aggiornando</string>
+    <string name="app_name">LogicPlayer</string>
+    <string name="esci">Esci</string>
+    <string name="first">download disponibili:</string>
+    <string name="hello_world">inserisci una stringa</string>
+    <string name="invia">accedi</string>
+    <string name="listEs">Lista esercizi:</string>
+    <string name="listaEsercizi">Lista esercizi:</string>
+    <string name="pass">password</string>
+    <string name="recuperapass">recupera password</string>
+    <string name="registrati">registrati</string>
+    <string name="reimposta">Reimposta password</string>
+    <string name="sync">Aggiorna</string>
+    <string name="user">Username</string>
+    <!-- From: file:/home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/res/values/styles.xml -->
+    <eat-comment/>
+    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+    </style>
+</resources>
\ No newline at end of file
diff --git a/mainActivity/app/build/intermediates/res/resources-debug-androidTest.ap_ b/mainActivity/app/build/intermediates/res/resources-debug-androidTest.ap_
new file mode 100644 (file)
index 0000000..0a9a30c
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/resources-debug-androidTest.ap_ differ
diff --git a/mainActivity/app/build/intermediates/res/resources-debug.ap_ b/mainActivity/app/build/intermediates/res/resources-debug.ap_
new file mode 100644 (file)
index 0000000..d35bde0
Binary files /dev/null and b/mainActivity/app/build/intermediates/res/resources-debug.ap_ differ
diff --git a/mainActivity/app/build/outputs/apk/app-debug-unaligned.apk b/mainActivity/app/build/outputs/apk/app-debug-unaligned.apk
new file mode 100644 (file)
index 0000000..ad0d66e
Binary files /dev/null and b/mainActivity/app/build/outputs/apk/app-debug-unaligned.apk differ
diff --git a/mainActivity/app/build/outputs/apk/app-debug.apk b/mainActivity/app/build/outputs/apk/app-debug.apk
new file mode 100644 (file)
index 0000000..198d66c
Binary files /dev/null and b/mainActivity/app/build/outputs/apk/app-debug.apk differ
diff --git a/mainActivity/app/build/outputs/logs/manifest-merger-debug-report.txt b/mainActivity/app/build/outputs/logs/manifest-merger-debug-report.txt
new file mode 100644 (file)
index 0000000..e0177dd
--- /dev/null
@@ -0,0 +1,89 @@
+-- Merging decision tree log ---
+manifest
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:2:1-47:12
+       package
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:3:5-45
+               INJECTED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml
+               INJECTED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml
+       xmlns:android
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:2:11-69
+uses-sdk
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:4:5-6:41
+       android:targetSdkVersion
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:6:9-38
+               INJECTED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml
+               INJECTED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml
+       android:minSdkVersion
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:5:9-35
+               INJECTED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml
+               INJECTED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml
+uses-permission#android.permission.INTERNET
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:7:5-67
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:7:22-64
+application
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:8:5-44:19
+       android:label
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:11:9-41
+       android:allowBackup
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:9:9-35
+       android:icon
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:10:9-37
+       android:theme
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:12:9-40
+activity#com.example.furt.myapplication.mainActivity
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:13:9-21:20
+       android:label
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:15:13-45
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:14:13-41
+intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:16:13-20:29
+action#android.intent.action.MAIN
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:17:17-69
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:17:25-66
+category#android.intent.category.LAUNCHER
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:19:17-77
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:19:27-74
+activity#com.example.furt.myapplication.DrawActivity
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:22:9-27:20
+       android:label
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:24:13-45
+       android:configChanges
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:25:13-59
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:23:13-41
+service#com.example.furt.myapplication.MyService
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:28:9-30:39
+       android:exported
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:30:13-37
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:29:13-38
+activity#com.example.furt.myapplication.download_page
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:31:9-35:20
+       android:configChanges
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:33:13-59
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:32:13-42
+activity#com.example.furt.myapplication.aggiornamento
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:36:9-39:20
+       android:label
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:38:13-45
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:37:13-42
+activity#com.example.furt.myapplication.recuperaPass
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:40:9-43:20
+       android:label
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:42:13-45
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:41:13-41
+uses-permission#android.permission.WRITE_EXTERNAL_STORAGE
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:45:5-80
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:45:22-78
+uses-permission#android.permission.READ_EXTERNAL_STORAGE
+ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:46:5-79
+       android:name
+               ADDED from /home/claudio/tesi_applet/logicplayer/mainActivity/app/src/main/AndroidManifest.xml:46:22-77
diff --git a/mainActivity/app/lint.xml b/mainActivity/app/lint.xml
new file mode 100644 (file)
index 0000000..8423c0e
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<lint>
+</lint>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/AndroidManifest.xml b/mainActivity/app/src/main/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..b9b6088
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.furt.myapplication" >
+    <uses-sdk
+        android:minSdkVersion="16"
+        android:targetSdkVersion="19" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/def"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".mainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name=".DrawActivity"
+            android:label="@string/app_name"
+            android:configChanges="orientation|screenSize">
+
+        </activity>
+        <service
+            android:name=".MyService"
+            android:exported="false"/>
+        <activity
+            android:name=".download_page"
+            android:configChanges="orientation|screenSize">
+            android:label="@string/listEs" >
+        </activity>
+        <activity
+            android:name=".aggiornamento"
+            android:label="@string/app_name" >
+        </activity>
+        <activity
+            android:name=".recuperaPass"
+            android:label="@string/app_name" >
+        </activity>
+    </application>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+</manifest>
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/Border.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/Border.java
new file mode 100644 (file)
index 0000000..532b11a
--- /dev/null
@@ -0,0 +1,43 @@
+package com.example.furt.myapplication;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.DialogInterface;
+import android.graphics.Color;
+import android.os.Bundle;
+
+public  class Border {
+    private int orientation;
+    private int width;
+    private int color = Color.BLACK;
+    private int style;
+    public int getWidth() {
+        return width;
+    }
+    public void setWidth(int width) {
+        this.width = width;
+    }
+    public int getColor() {
+        return color;
+    }
+    public void setColor(int color) {
+        this.color = color;
+    }
+    public int getStyle() {
+        return style;
+    }
+    public void setStyle(int style) {
+        this.style = style;
+    }
+    public int getOrientation() {
+        return orientation;
+    }
+    public void setOrientation(int orientation) {
+        this.orientation = orientation;
+    }
+    public Border(int Style) {
+        this.style = Style;
+    }
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/BorderedTextView.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/BorderedTextView.java
new file mode 100644 (file)
index 0000000..40f3852
--- /dev/null
@@ -0,0 +1,67 @@
+package com.example.furt.myapplication;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+public class BorderedTextView extends TextView {
+    private Paint paint = new Paint();
+    public static final int BORDER_TOP = 0x00000001;
+    public static final int BORDER_RIGHT = 0x00000002;
+    public static final int BORDER_BOTTOM = 0x00000004;
+    public static final int BORDER_LEFT = 0x00000008;
+    private Border[] borders;
+
+    public BorderedTextView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        init();
+    }
+
+    public BorderedTextView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public BorderedTextView(Context context) {
+        super(context);
+        init();
+    }
+    private void init(){
+        paint.setStyle(Paint.Style.STROKE);
+        paint.setColor(Color.BLACK);
+        paint.setStrokeWidth(4);
+    }
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        if(borders == null) return;
+        for(Border border : borders){
+            paint.setColor(border.getColor());
+            paint.setStrokeWidth(border.getWidth());
+
+            if(border.getStyle() == BORDER_TOP){
+                canvas.drawLine(0, 0, getWidth(), 0, paint);
+            } else
+            if(border.getStyle() == BORDER_RIGHT){
+                canvas.drawLine(getWidth(), 0, getWidth(), getHeight(), paint);
+            } else
+            if(border.getStyle() == BORDER_BOTTOM){
+                canvas.drawLine(0, getHeight(), getWidth(), getHeight(), paint);
+            } else
+            if(border.getStyle() == BORDER_LEFT){
+                canvas.drawLine(0, 0, 0, getHeight(), paint);
+            }
+        }
+    }
+
+    public Border[] getBorders() {
+        return borders;
+    }
+
+    public void setBorders(Border[] borders) {
+        this.borders = borders;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/CopyPasteDialog.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/CopyPasteDialog.java
new file mode 100644 (file)
index 0000000..e40156f
--- /dev/null
@@ -0,0 +1,43 @@
+package com.example.furt.myapplication;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+
+import java.util.ArrayList;
+
+/**CopyPasteDialog: dialog per la gestione delle operazioni di copia e cancellazione su
+ * nodi intermedi dell'albero
+ */
+public class CopyPasteDialog extends DialogFragment {
+    Node thisNode; //nodo legato a questo Dialog
+    public CopyPasteDialog(Node n)
+    {
+        thisNode=n;
+    }
+    @Override
+    public Dialog onCreateDialog(final Bundle savedInstanceState) {
+        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        builder.setMessage("Seleziona un'operazione:")
+                .setPositiveButton("Copia", new DialogInterface.OnClickListener() {
+                    public void onClick(DialogInterface dialog, int id) {
+                        DrawActivity.copiedNode=thisNode; //il nodo viene copiato
+                    }
+                });
+            builder.setNeutralButton("Cancella", new DialogInterface.OnClickListener() {
+                public void onClick(DialogInterface dialog, int id) {
+                    DrawActivity.selectedNode.Children = new ArrayList<Node>(); //eliminazione del sottoalbero
+                    DrawActivity.rootNode.Clean();
+                    DrawActivity.startDraw();
+                }
+            });
+        builder.setNegativeButton("Annulla", new DialogInterface.OnClickListener() {
+            public void onClick(DialogInterface dialog, int id) {
+            }
+        });
+        // Create the AlertDialog object and return it
+        return builder.create();
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/DialogTouchHandler.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/DialogTouchHandler.java
new file mode 100644 (file)
index 0000000..eba3c67
--- /dev/null
@@ -0,0 +1,34 @@
+package com.example.furt.myapplication;
+
+import android.view.View;
+
+/**DialogTouchHandler: Handler per la gestione delle regole cliccate
+ * nel Dialog delle regole di introduzione**/
+
+public class DialogTouchHandler implements View.OnClickListener{
+    Node node;
+    DialogTouchHandler(Node n)
+    {
+        node=n;
+    }
+    public void onClick(View view)
+    {
+        Node selectedRule=node;
+        while(selectedRule.Father!=null) //se l'utente ha cliccato su uno dei figli del sottoalbero risalgo alla radice
+            selectedRule=selectedRule.Father;
+        for (Node n : selectedRule.Children) { //incollo i figli del nodo sul selectedNode avendo cura di integrare le ipotesi
+            for (Hypothesis hp : n.NodeHP)
+                hp.fromNode = DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
+            n.addHPList(DrawActivity.selectedNode.NodeHP);
+            n.handler = null; //rimuovo l'handler per il DialogTouchHandler, che è ora inutile
+            DrawActivity.selectedNode.addChild(n);
+        }
+        DrawActivity.selectedNode.hasFocus = false; //il vecchio selectedNode non ha più il focus
+        DrawActivity.selectedNode.ruleName = selectedRule.Children.get(0).ruleName;
+        DrawActivity.selectedNode.Children.get(0).hasFocus = true; //il primo figlio della regola applicata acquisisce il focus
+        DrawActivity.nmoves++;
+        DrawActivity.rootNode.Clean();
+        DrawActivity.startDraw();
+        touchnodeHandler.ruleDialog.dismiss(); //il ruleDialog del touchnodeHandler non è più necessario
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/DrawActivity.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/DrawActivity.java
new file mode 100644 (file)
index 0000000..f9a9c84
--- /dev/null
@@ -0,0 +1,277 @@
+package com.example.furt.myapplication;
+
+import android.app.FragmentManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+import android.util.DisplayMetrics;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.ScaleGestureDetector;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.RelativeLayout;
+import android.widget.ScrollView;
+import android.widget.Toast;
+
+import java.sql.Timestamp;
+
+import static java.lang.Thread.sleep;
+
+public class DrawActivity extends FragmentActivity {
+
+    static RelativeLayout globalHP; //layout delle ipotesi cancellate
+    static ScaleGestureDetector scaleGestureDetector; //zoom listener
+    static float spaceSize; //dimensione della spaziatura tra i sottoalberi
+    static float textSize=40; //dimensione del font iniziale
+    static Node selectedNode; //Node su cui è attualmente il focus
+    static Node copiedNode;//nodo copiato
+    static boolean addFakes;//booleano che segnala se bisogna aggiungere delle regole fake
+    static Border[] b; //bordi per le borderedTextView
+    static FragmentManager fragmentManager;//per i dialog
+    static Node rootNode; //radice dell'albero corrente
+    static ScrollView scroll; //Vertical ScrollView contenente l'albero
+    static int nmoves=0;//numero di mosse
+    static int nerrors=0;//nomero di errori
+    static long startTime;//tempo di inizio dell'esercizio
+    static RelativeLayout globalR; //layout globale contenente l'albero
+    static int globalId =10; //variabile incrementale per l'assegnazione di ID univoci
+    static DisplayMetrics v = new DisplayMetrics();//altezza lunghezza e densità dello schermo
+
+    //Informazioni per la comunicazione client-server: username, password, nome dell'esercizio e chiave di sessione.
+    static String user=null;
+    static String pass=null;
+    static String sessionKey=null;
+    static String nomeEs=null;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        //routine standard per la create
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_my);
+
+        //recupero e setto le variabili globali
+        getWindowManager().getDefaultDisplay().getMetrics(v); //getMetrics() inserisce nella variabile V i dati metrici (altezza,larghezza,densità...) dello schermo del dispositivo
+        globalHP = (RelativeLayout) findViewById(R.id.hpscroll);
+        globalR = (RelativeLayout) findViewById(R.id.global);
+        spaceSize = 2*(textSize/v.density); //lo spazio tra due sottoalberi è di due caratteri vuoti
+        fragmentManager=getFragmentManager();
+        copiedNode=null; //inizialmente non ci sono ovviamente sottoalberi copiati
+        scroll=(ScrollView)findViewById(R.id.vscroll);
+        startTime=time();
+        b=new Border[1];
+        b[0]=new Border(BorderedTextView.BORDER_TOP);
+        b[0].setWidth(2);
+        //Recupero i dati passati dall'Intent: username, password, nome dell'esercizio da visualizzare e chiave di sessione
+        Bundle dati=getIntent().getExtras();
+        nomeEs=dati.getString("nomeEs");
+        user=dati.getString("user");
+        pass=dati.getString("pass");
+        sessionKey=dati.getString("sessionKey");
+
+        //Creazione dell'albero: setto il rootNode e creo la Formula di partenza (F)
+        if(!populateTree()) //populateTree() ha fallito: file dell'esercizio corrotto.
+            return;
+
+        //Creazione dell'albero: setto i campi della view
+        BorderedTextView rootView=new BorderedTextView(this);
+        rootView.setId(globalId);
+        globalId++;
+        selectedNode=null;
+        addFakes=false; //di default non vengono aggiunte regole false
+        rootNode.setView(rootView,globalR); //il rootNode viene legato al globalLayout attuale e alla TextView creata
+        rootNode.handler=new touchnodeHandler(rootNode);
+        rootNode.longHandler=new longnodeHandler(rootNode);
+        rootNode.hasFocus=true; //di default, la radice ha inizialmente il focus.
+        startDraw();
+
+        //imposto il listener per il pinch zoom
+        scaleGestureDetector = new ScaleGestureDetector(this, new simpleOnScaleGestureListener());
+    }
+    @Override
+    public void onConfigurationChanged(Configuration configuration) //rotazione dello schermo: restore dell'albero
+    {
+        super.onConfigurationChanged(configuration);
+        getWindowManager().getDefaultDisplay().getMetrics(v);
+        DrawActivity.rootNode.Clean();
+        DrawActivity.startDraw();
+    }
+    public static void startDraw()
+    {
+        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        final int halfScreen=Math.round((v.widthPixels / 2) - rootNode.getBaseWidth() / 2); //calcolo la metà dello schermo per il calcolo dei margins della scrollView
+        int leftSubTree=(Math.round(rootNode.getLeftOffset() - rootNode.getUpLine() / 2 + (rootNode.getBaseWidth() / 2)) + 40); //sottoalbero sinistro del rootNode più un padding di 40px
+        lp.setMargins(Math.max(halfScreen,leftSubTree),0, 0, 0);
+        lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, rootNode.view.getId());
+        rootNode.view.setLayoutParams(lp);
+        rootNode.view.setBorders(b);
+        rootNode.view.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
+        rootNode.view.setWidth(Math.round(rootNode.getLineWidth())); //setto la larghezza della view al contenuto della linea
+        rootNode.view.setGravity(Gravity.CENTER); //formula al centro della sua overline
+        rootNode.view.setText(rootNode.F.toString()); //setta il contenuto della formula
+        globalR.addView(rootNode.view);
+        //inserisco un listener a rootView da attivare quando sono state fissate le coordinate nel RelativeLayout
+        rootNode.view.getViewTreeObserver().addOnGlobalLayoutListener(
+                new ViewTreeObserver.OnGlobalLayoutListener()
+                {
+                    @Override
+                    public void onGlobalLayout()
+                    {
+                        globalR.setPadding(0,0,(int)Math.max(rootNode.getRightOffset(),halfScreen),0);
+                        globalR.getLayoutParams().height=(int)Math.max((v.heightPixels),(rootNode.getMaxHeight()+rootNode.getMaxHeight()*0.10)); //altezza della view=max(h_screen,h_tree). Aggiungo un 10% all'altezza dell'albero per approssimazione dei calcoli.
+                        globalR.requestLayout(); //aggiorna i parametri e le dimensioni del RelativeLayout
+                        if (rootNode.getMaxHeight()<v.heightPixels/2) //se l'albero non ha raggiunto almeno la metà dello schermo scrollo la view fino in fondo per visualizzarlo interamente
+                            scroll.fullScroll(ScrollView.FOCUS_DOWN);
+                        rootNode.view.setOnClickListener(rootNode.handler);
+                        rootNode.view.setOnLongClickListener(rootNode.longHandler);
+                        rootNode.view.getViewTreeObserver().removeOnGlobalLayoutListener(this); //rimuove il listener per evitare che la funzione parta nuovamente
+                        rootNode.Draw();
+                    }
+                });
+    }
+    @Override
+    public void onBackPressed() {
+        //abbandona esercizio e torna alla view con la lista degli esercizi
+        Intent i = new Intent(globalHP.getContext(), aggiornamento.class);
+        i.putExtra("user", user);
+        i.putExtra("pass", pass);
+        i.putExtra("sessionKey", sessionKey);
+        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        globalHP.getContext().startActivity(i);
+
+    }
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.my, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        // TODO Auto-generated method stub
+        scaleGestureDetector.onTouchEvent(event);
+        return true;
+    }
+
+
+    @Override
+    public boolean dispatchTouchEvent(MotionEvent event) {
+        super.dispatchTouchEvent(event);
+        return (scaleGestureDetector.onTouchEvent(event));
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        int id = item.getItemId();
+        if(id==R.id.abandon)
+        {   //abbandona esercizio e torna alla view con la lista degli esercizi
+            Intent i = new Intent(globalHP.getContext(), aggiornamento.class);
+            i.putExtra("user", user);
+            i.putExtra("pass", pass);
+            i.putExtra("sessionKey", sessionKey);
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            globalHP.getContext().startActivity(i);
+        }
+        return true;
+    }
+
+
+
+    public class simpleOnScaleGestureListener extends
+            ScaleGestureDetector.SimpleOnScaleGestureListener {
+
+        @Override
+        public boolean onScale(ScaleGestureDetector detector) {
+            float factor=detector.getScaleFactor();
+            if (textSize>65 && factor>1) //font troppo grande: impedisco aumento
+                return true;
+            if (textSize<15 && factor<1) //font troppo piccolo: impedisco riduzione
+                return true;
+            rootNode.Refactor();  //risetta i campi dell'albero a FIELD_UNSET
+            RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            DrawActivity.spaceSize=(DrawActivity.spaceSize*factor);
+            DrawActivity.textSize=(DrawActivity.textSize*factor);
+            int halfScreen=Math.round((v.widthPixels / 2)-rootNode.getBaseWidth()/2);
+            int leftSubTree=(Math.round(rootNode.getLeftOffset() - rootNode.getUpLine() / 2 + (rootNode.getBaseWidth() / 2)) + 40);
+            globalR.setPadding(0,0,(int)Math.max(rootNode.getRightOffset(),halfScreen),0);
+            lp.setMargins(Math.max(halfScreen,leftSubTree),0, 0, 0);
+            lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, rootNode.view.getId());
+            rootNode.view.setLayoutParams(lp);
+            rootNode.view.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
+            rootNode.view.setWidth(Math.round(rootNode.getLineWidth())); //setto la larghezza della view al contenuto della linea
+            rootNode.Resize(); //ricorsivamente sistema i fontsize, le larghezze e le posizioni delle view nell'albero
+            return true;
+        }
+    }
+    public static void finishedTree(Context context) {
+        if (!rootNode.isCorrect()) {
+            Toast.makeText(context, "Esercizio errato! Ricontrolla i passaggi fatti e riprova", Toast.LENGTH_LONG).show();
+        } else {
+            long endTime = time();
+            int second= (int) ((endTime-startTime)/1000);
+            int minute=second/60;
+            Toast.makeText(context, "Esercizio completato in " + Integer.toString(nmoves) + " mosse!", Toast.LENGTH_LONG).show();
+            try {
+                sleep(2);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            Toast.makeText(context, "Hai commesso " + Integer.toString(nerrors) + " errori!", Toast.LENGTH_LONG).show();
+            try {
+                sleep(2);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            Toast.makeText(context, "Numero nodi dell'albero: " + Integer.toString(rootNode.count()), Toast.LENGTH_LONG).show();
+            try {
+                sleep(2);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            Toast.makeText(context, "Tempo impiegato: " + Integer.toString(minute) + " minuti e " + Integer.toString(second-(minute*60)) + " secondi", Toast.LENGTH_LONG).show();
+            //aggiungo l'esercizio al database
+            int voto=valutazione.voto(nomeEs,nmoves,second,rootNode.count(),nerrors);
+            personalDBHelper db = new personalDBHelper(context);
+            db.add(user, nomeEs, MD5.digest(nomeEs), 0.0, voto, 0);
+            nmoves = 0;
+            Intent i = new Intent(context, aggiornamento.class);
+            i.putExtra("user", user);
+            i.putExtra("pass", pass);
+            i.putExtra("sessionKey", sessionKey);
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            context.startActivity(i);
+        }
+    }
+    public boolean populateTree() {
+
+        rootNode = parser.root(nomeEs);
+        if(rootNode==null)
+        {
+            Toast.makeText(this, "Errore nell'apertura del file", Toast.LENGTH_LONG).show();
+            Intent i = new Intent(this, aggiornamento.class);
+            i.putExtra("user", user);
+            i.putExtra("pass", pass);
+            i.putExtra("sessionKey", sessionKey);
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            this.startActivity(i);
+            return false;
+        }
+        for (Hypothesis h:rootNode.NodeHP)
+            h.fromNode=rootNode;
+        return true;
+    }
+    public static long time()
+    {
+        java.util.Date date= new java.util.Date();
+        Timestamp now=new Timestamp(date.getTime());
+        return now.getTime();
+    }
+
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/EliminationRule.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/EliminationRule.java
new file mode 100644 (file)
index 0000000..cc55c45
--- /dev/null
@@ -0,0 +1,8 @@
+package com.example.furt.myapplication;
+
+/**EliminationRule: interfaccia per le regole di eliminazione**/
+public interface EliminationRule
+{
+    public Node createNodes(Formula F, askFormula ask); //restituisce il sottoalbero successivo all'applicazione della regola sul nodo attualmente selezionato
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FView.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FView.java
new file mode 100644 (file)
index 0000000..479df78
--- /dev/null
@@ -0,0 +1,13 @@
+package com.example.furt.myapplication;
+
+public interface FView
+{
+    @Override
+    public String toString();
+    public String toStringDeleted();
+    String Draw(int priority);
+    public float size();
+    public float height();
+    public float sizeDeleted();
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/Formula.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/Formula.java
new file mode 100644 (file)
index 0000000..0145444
--- /dev/null
@@ -0,0 +1,13 @@
+package com.example.furt.myapplication;
+
+import java.util.List;
+/**Formula:interfaccia per l'implementazione di formule logiche. Prevede metodi per
+ * l'applicazione delle regole e per la gestione dell'editor guidato per l'inserimento.**/
+public interface Formula extends FView{
+    public List<IntroductionRule> introductionRules();
+    public List<EliminationRule> EliminationRules();
+    public boolean Fill(Formula F);
+    public boolean setCursor();
+    public Formula duplicate();
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaAnd.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaAnd.java
new file mode 100644 (file)
index 0000000..fe75584
--- /dev/null
@@ -0,0 +1,77 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FormulaAnd extends GenericFormula implements Formula
+{
+    Formula leftF;
+    Formula rightF;
+    int leftPriority;
+    int rightPriority;
+    FormulaAnd(Formula F1,Formula F2)
+    {
+        leftF=F1;
+        rightF=F2;
+        priority=15;
+        leftPriority=15;
+        rightPriority=16;
+    }
+    @Override
+    public String Draw(int p)
+    {
+        if (priority >= p)
+            return leftF.Draw(leftPriority)+"∧"+rightF.Draw(rightPriority);
+        else
+            return("(")+leftF.Draw(leftPriority)+"∧"+rightF.Draw(rightPriority)+")";
+    }
+
+    @Override
+    public List<IntroductionRule> introductionRules()
+    {
+        List<IntroductionRule> rules=new ArrayList<IntroductionRule>();
+        rules.addAll(super.introductionRules());
+
+        //Regola di introduzione dell'And
+        RuleIntroduction andIntroduction=new RuleIntroduction("∧i",5);
+        Node Left=new Node(leftF);
+        Node Right=new Node(rightF);
+        Node thisNode=new Node(this);
+        thisNode.addChild(Left);
+        thisNode.addChild(Right);
+        andIntroduction.tempRule=thisNode;
+        rules.add(andIntroduction);
+
+        return rules;
+    }
+    public List<EliminationRule> EliminationRules()
+    {
+        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
+        nodes.add(new RuleAndElimination(this));
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula Filler) {
+        if(leftF.toString().equals("_")) {
+            this.leftF = Filler;
+            return true;
+        }
+        else if(rightF.toString().equals("_")) {
+            this.rightF = Filler;
+            return true;
+        }
+        return leftF.Fill(Filler) || rightF.Fill(Filler);
+    }
+
+    @Override
+    public boolean setCursor() {
+        return leftF.setCursor() || rightF.setCursor();
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new FormulaAnd(leftF.duplicate(),rightF.duplicate());
+    }
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaBOT.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaBOT.java
new file mode 100644 (file)
index 0000000..f5e905b
--- /dev/null
@@ -0,0 +1,47 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Paint;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FormulaBOT extends GenericFormula implements Formula{
+    Paint p=new Paint();
+    FormulaBOT()
+    {
+        priority=100;
+    }
+
+    @Override
+    public String Draw(int p)
+    {
+        return "⊥";
+    }
+
+    public List<IntroductionRule> introductionRules(){
+        //Bottom non ha regole di introduzione sensate
+        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
+        return nodes;
+    }
+    public List<EliminationRule> EliminationRules()
+    {
+        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
+        nodes.add(new RuleBotElimination(this));
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula F) {
+        return false;
+    }
+
+    @Override
+    public boolean setCursor() {
+        return false;
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new FormulaBOT();
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaImpl.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaImpl.java
new file mode 100644 (file)
index 0000000..efe1714
--- /dev/null
@@ -0,0 +1,75 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FormulaImpl extends GenericFormula implements Formula
+{
+    Formula leftF;
+    Formula rightF;
+    int leftPriority;
+    int rightPriority;
+    FormulaImpl(Formula F1,Formula F2)
+    {
+        priority=10;
+        leftF=F1;
+        rightF=F2;
+        leftPriority=11;
+        rightPriority=10;
+    }
+    @Override
+    public String Draw(int p)
+    {
+        if (priority >= p)
+            return leftF.Draw(leftPriority)+"⇒"+rightF.Draw(rightPriority);
+        else
+            return("(")+leftF.Draw(leftPriority)+"⇒"+rightF.Draw(rightPriority)+")";
+    }
+
+    public List<IntroductionRule> introductionRules(){
+        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
+        nodes.addAll(super.introductionRules()); //aggiunge la regola di R.A.A.
+
+        //Regola di introduzione dell'implicazione
+
+        RuleIntroduction implIntro=new RuleIntroduction("⇒i",10);
+        Node ImplN=new Node(rightF);
+        List<Formula> implHP=new ArrayList<Formula>();
+        implHP.add(leftF);
+        ImplN.addHPFormula(implHP,true);
+        Node thisNode=new Node(this);
+        thisNode.addChild(ImplN);
+        implIntro.tempRule=thisNode;
+        nodes.add(implIntro);
+
+        return nodes;
+    }
+    public List<EliminationRule> EliminationRules()
+    {
+        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
+        nodes.add(new RuleImplElimination(this));
+        return nodes;
+    }
+    @Override
+    public boolean Fill(Formula Filler) {
+        if(leftF.toString().equals("_")) {
+            this.leftF = Filler;
+            return true;
+        }
+        else if(rightF.toString().equals("_")) {
+            this.rightF = Filler;
+            return true;
+        }
+        return leftF.Fill(Filler) || rightF.Fill(Filler);
+    }
+
+    @Override
+    public boolean setCursor() {
+        return leftF.setCursor() || rightF.setCursor();
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new FormulaImpl(leftF.duplicate(),rightF.duplicate());
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaNot.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaNot.java
new file mode 100644 (file)
index 0000000..6bd80e5
--- /dev/null
@@ -0,0 +1,68 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Paint;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FormulaNot extends GenericFormula implements Formula{
+    Paint p=new Paint();
+    Formula Operand;
+    int priority;
+    int argPriority;
+    FormulaNot(Formula F)
+    {
+        Operand=F;
+        priority=20;
+        argPriority=100;
+    }
+    @Override
+    public String Draw(int p)
+    {
+        if (priority >= p)
+            return "¬"+Operand.Draw(20);
+        else
+            return("¬("+Operand.Draw(20)+")");
+    }
+
+    public List<IntroductionRule> introductionRules(){
+        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
+
+        //Introduzione del not (NOTA: il not non eredita la regola di riduzione ad assurdo)
+        RuleIntroduction notIntro=new RuleIntroduction("¬i",4);
+        Node notN=new Node(new FormulaBOT());
+        List<Formula> notHP=new ArrayList<Formula>();
+        notHP.add(Operand);
+        notN.addHPFormula(notHP,true);
+        Node thisNode=new Node(this);
+        thisNode.addChild(notN);
+        notIntro.tempRule=thisNode;
+        nodes.add(notIntro);
+        return nodes;
+    }
+    public List<EliminationRule> EliminationRules()
+    {
+        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
+        nodes.add(new RuleNotElimination(this));
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula Filler) {
+        if(Operand.toString().equals("_")) {
+            Operand = Filler;
+            return true;
+        }
+        return Operand.Fill(Filler);
+    }
+
+    @Override
+    public boolean setCursor() {
+        return Operand.setCursor();
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new FormulaNot(Operand.duplicate());
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaOr.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaOr.java
new file mode 100644 (file)
index 0000000..83531cc
--- /dev/null
@@ -0,0 +1,84 @@
+package com.example.furt.myapplication;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FormulaOr extends GenericFormula implements Formula
+{
+    Formula leftF;
+    Formula rightF;
+    int leftPriority;
+    int rightPriority;
+    FormulaOr(Formula F1,Formula F2)
+    {
+        priority=13;
+        leftF=F1;
+        rightF=F2;
+        leftPriority=13;
+        rightPriority=14;
+    }
+
+    @Override
+    public String Draw(int p)
+    {
+        if (priority >= p)
+            return leftF.Draw(leftPriority)+"∨"+rightF.Draw(rightPriority);
+        else
+            return("(")+leftF.Draw(leftPriority)+"∨"+rightF.Draw(rightPriority)+")";
+    }
+
+    public List<IntroductionRule> introductionRules(){
+        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
+        nodes.addAll(super.introductionRules()); //eredita la R.A.A.
+
+        //Introduzione sinistra dell'or
+        RuleIntroduction orIntroductionLeft=new RuleIntroduction("∨i(L)",6);
+        Node orLeft=new Node(leftF);
+        Node thisNodeL=new Node(this);
+        thisNodeL.addChild(orLeft);
+        orIntroductionLeft.tempRule=thisNodeL;
+        nodes.add(orIntroductionLeft);
+
+        //Introduzione destra dell'or
+        RuleIntroduction orIntroductionRight=new RuleIntroduction("∨i(R)",5);
+        Node orRight=new Node(rightF);
+        Node thisNodeR=new Node(this);
+        thisNodeR.addChild(orRight);
+        orIntroductionRight.tempRule=thisNodeR;
+        nodes.add(orIntroductionRight);
+
+        return nodes;
+    }
+
+    public List<EliminationRule> EliminationRules()
+    {
+        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
+        nodes.add(new RuleOrElimination(this));
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula Filler) {
+        if(leftF.toString().equals("_")) {
+            this.leftF = Filler;
+            return true;
+        }
+        else if(rightF.toString().equals("_")) {
+            this.rightF = Filler;
+            return true;
+        }
+        return leftF.Fill(Filler) || rightF.Fill(Filler);
+    }
+
+    @Override
+    public boolean setCursor() {
+        return leftF.setCursor() || rightF.setCursor();
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new FormulaOr(leftF.duplicate(),rightF.duplicate());
+    }
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaTOP.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/FormulaTOP.java
new file mode 100644 (file)
index 0000000..8d9aa70
--- /dev/null
@@ -0,0 +1,38 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FormulaTOP extends GenericFormula implements Formula{
+
+    FormulaTOP()
+    {
+        priority=100;
+    }
+
+    @Override
+    public String Draw(int p){return "Ț";}
+
+    public List<IntroductionRule> introductionRules(){
+        //le regole di introduzione ed eliminazione per Top non sono implementate in quanto prive
+        //di un'applicazione effettiva nella dimostrazione
+        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula F) {
+        return false;
+    }
+
+    @Override
+    public boolean setCursor() {
+        return false;
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new FormulaTOP();
+    }
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/GenericFormula.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/GenericFormula.java
new file mode 100644 (file)
index 0000000..b2136ab
--- /dev/null
@@ -0,0 +1,83 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Paint;
+import android.graphics.Rect;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericFormula implements Formula
+{
+    Paint p=new Paint();
+    int priority;
+    public String Draw(int p)
+    {
+        return "?";
+    } //la GenericFormula non può essere rappresentata
+    public String toString(){return Draw(0);}
+    public float size(){
+        p.setTextSize(DrawActivity.textSize);
+        return p.measureText(toString())+(float)(p.measureText(toString())*0.20);//ritorna la misura effettuata dalla classe Paint con un padding del 20% per migliorare la stima
+    }
+    public float sizeDeleted()
+    {
+        p.setTextSize(DrawActivity.textSize);
+        return p.measureText(toStringDeleted())+(float)(p.measureText(toStringDeleted())*0.20); //ritorna la misura effettuata dalla classe Paint con un padding del 20% per migliorare la stima
+    }
+    public String toStringDeleted()
+    {
+        return "["+toString()+"]";
+    }
+    public float height()
+    {
+        p.setTextSize(DrawActivity.textSize);
+        Rect bounds=new Rect();
+        p.getTextBounds(toString(),0,toString().length(),bounds);
+        return (float)((bounds.height()+((float)0.20*bounds.height()))*1.5); //l'altezza della formula va moltiplicata per l'inverso della densità dello schermo (circa 1.5)
+    }
+    public List<IntroductionRule> introductionRules(){
+        List<IntroductionRule> rules=new ArrayList<IntroductionRule>();
+        Node thisNode=new Node(this);
+        RuleIntroduction RAA=new RuleIntroduction("RAA",0);                        //R.A.A.
+        Node RAAnode=new Node(new FormulaBOT());                            //Formula=Bottom
+        List<Formula> RAAhp=new ArrayList<Formula>();                             //Tutte le ipotesi del nodo precedente
+        RAAhp.add(new FormulaNot(this));                                    //Più la negazione del nodo attuale
+        RAAnode.addHPFormula(RAAhp,true);
+        thisNode.addChild(RAAnode);
+        RAA.tempRule=thisNode;
+        rules.add(RAA);
+        /*
+        Node thisFakeNode=new Node(this);
+        RuleIntroduction fakeRAA=new RuleIntroduction("RAA",0,true);                        //fake R.A.A.
+        Node fakeRAAnode=new Node(new FormulaNot(this));                            //Formula=!F
+        thisFakeNode.addChild(fakeRAAnode);
+        fakeRAA.tempRule=thisFakeNode;
+        rules.add(fakeRAA);
+        */
+        return rules;
+    }
+    public List<EliminationRule> EliminationRules(){
+        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula F) {
+        return false;
+    }
+
+    @Override
+    public boolean setCursor() {
+        return false;
+    }
+
+    @Override
+    public Formula duplicate() {
+        return null;
+    }
+
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/Hypothesis.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/Hypothesis.java
new file mode 100644 (file)
index 0000000..f951431
--- /dev/null
@@ -0,0 +1,17 @@
+package com.example.furt.myapplication;
+
+/**Hypothesis: implementa le ipotesi di un nodo. Contiene una formula, un booleano per verificare se si stratta
+ * di un'ipotesi scaricata e un puntatore al nodo in cui l'ipotesi è stata introdotta
+ */
+public class Hypothesis
+{
+    Formula HP;
+    boolean isDeleted;
+    Node fromNode;
+    Hypothesis(Formula F,boolean d)
+    {
+        HP=F;
+        isDeleted=d;
+        fromNode=null;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/IntroductionRule.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/IntroductionRule.java
new file mode 100644 (file)
index 0000000..9799a43
--- /dev/null
@@ -0,0 +1,7 @@
+package com.example.furt.myapplication;
+
+public interface IntroductionRule
+{
+    int getPriority();
+    public Node createNodes(askFormula ask);
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/Literal.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/Literal.java
new file mode 100644 (file)
index 0000000..3da98ce
--- /dev/null
@@ -0,0 +1,32 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Literal extends GenericFormula implements Formula
+{
+    String L;
+    Literal(char c)
+    {
+        priority=100;
+        L=c+"";
+    }
+    @Override
+    public String Draw(int p){return L;}
+
+    public List<IntroductionRule> introductionRules(){
+        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
+        nodes.addAll(super.introductionRules()); //eredita la R.A.A.
+        return nodes;
+    }
+
+    @Override
+    public boolean Fill(Formula F) {
+        return false;
+    }
+
+    @Override
+    public Formula duplicate() {
+        return new Literal(this.L.charAt(0));
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/LongHPClick.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/LongHPClick.java
new file mode 100644 (file)
index 0000000..69ed7c3
--- /dev/null
@@ -0,0 +1,29 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Color;
+import android.os.Handler;
+import android.view.View;
+
+/**LongHPClick: handler per il longtouch delle ipotesi. Illumina di giallo il nodo
+ * da cui proviene l'ipotesi in oggetto
+ */
+public class LongHPClick implements View.OnLongClickListener {
+
+    Node n;
+    LongHPClick(Node node)
+    {
+        n=node;
+    }
+    @Override
+    public boolean onLongClick(View v) {
+        n.view.setTextColor(Color.BLUE);
+        final Handler handler = new Handler();
+        handler.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                n.view.setTextColor(Color.BLACK);
+            }
+        }, 1000);
+        return true;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/MD5.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/MD5.java
new file mode 100644 (file)
index 0000000..dc28986
--- /dev/null
@@ -0,0 +1,46 @@
+package com.example.furt.myapplication;
+
+import android.os.Environment;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.security.MessageDigest;
+
+
+public class MD5 {
+
+    MD5(){}
+
+    public static String digest(String filePath) {
+        InputStream inputStream = null;
+        try {
+            inputStream = new FileInputStream(Environment.getExternalStorageDirectory()+"/tesiEs/"+filePath);
+            byte[] buffer = new byte[1024];
+            MessageDigest digest = MessageDigest.getInstance("MD5");
+            int numRead = 0;
+            while (numRead != -1) {
+                numRead = inputStream.read(buffer);
+                if (numRead > 0)
+                    digest.update(buffer, 0, numRead);
+            }
+            byte [] md5Bytes = digest.digest();
+            return convertHashToString(md5Bytes);
+        } catch (Exception e) {
+            return null;
+        } finally {
+            if (inputStream != null) {
+                try {
+                    inputStream.close();
+                } catch (Exception e) { }
+            }
+        }
+    }
+
+    private static String convertHashToString(byte[] md5Bytes) {
+        String returnVal = "";
+        for (int i = 0; i < md5Bytes.length; i++) {
+            returnVal += Integer.toString(( md5Bytes[i] & 0xff ) + 0x100, 16).substring(1);
+        }
+        return returnVal;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/MyService.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/MyService.java
new file mode 100644 (file)
index 0000000..acac481
--- /dev/null
@@ -0,0 +1,139 @@
+package com.example.furt.myapplication;
+
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.IBinder;
+import android.util.Log;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.util.Scanner;
+
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+
+public class MyService extends Service {
+
+    @Override
+    public int onStartCommand(final Intent intent, int flags, int startId)
+    {
+        final Context context=getApplicationContext();
+        /*System.setProperty("javax.net.ssl.trustStore", "mysrvkeystore");
+        //Log.e("onStartCommand",""+R.raw.mysrvkeystore);
+        System.setProperty("javax.net.ssl.trustStorePassword", "123456");
+
+
+
+        String inviotmp = intent.getStringExtra("code") + intent.getStringExtra("varInvio");
+
+        if(intent.getStringExtra("code").charAt(0)!='2')
+            inviotmp = inviotmp + intent.getStringExtra("varInvio2");
+        final String invio=inviotmp;
+        final Thread readthread;
+        readthread = new Thread(new Runnable() {
+            public void run() {
+                SSLSocketFactory sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
+                //Socket socket = null;
+                SSLSocket socket = null;
+                try {
+                    int port = 25000;
+                   // socket = new Socket("10.0.0.2", port);
+                    socket=(SSLSocket) sslsocketfactory.createSocket("10.0.0.2", port);                    //Send the message to the server
+                    OutputStream os = socket.getOutputStream();
+                    OutputStreamWriter osw = new OutputStreamWriter(os);
+                    BufferedWriter bw = new BufferedWriter(osw);
+
+                    //String number = "2";
+
+                    String sendMessage = invio+"\n";
+                    bw.write(sendMessage+"\n");
+                    bw.flush();
+                    System.out.println("Message sent to the server : " + sendMessage);
+
+                    //Get the return message from the server
+                    InputStream is = socket.getInputStream();
+                    InputStreamReader isr = new InputStreamReader(is);
+                    BufferedReader br = new BufferedReader(isr);
+                    String message;
+                    message = br.readLine();
+                    System.out.println("Message received from the server : " + message);
+                } catch (Exception exception) {
+                    exception.printStackTrace();
+                } finally {
+                    //Closing the socket
+                    try {
+                        socket.close();
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        });
+
+        readthread.start();*/
+        final Thread readthread;
+        readthread = new Thread(new Runnable() {
+            public void run() {
+                InputStream certificato = getResources().openRawResource(R.raw.keystore);
+                KeyStore trustStore = null;
+                try
+                {
+                    trustStore = KeyStore.getInstance("BKS");
+                    trustStore.load(certificato, "123stella".toCharArray());
+                    SSLSocketFactory fs = (SSLSocketFactory) SSLSocketFactory.getDefault();
+                    SSLSocket socket = (SSLSocket) fs.createSocket("10.0.0.2", 25000);
+                    Log.e("", "miracolo");
+
+                    InputStream inputstream = System.in;
+                    InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
+                    BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
+
+                    OutputStream os = socket.getOutputStream();
+                    OutputStreamWriter osw = new OutputStreamWriter(os);
+                    BufferedWriter bw = new BufferedWriter(osw);
+
+                    String sendMessage ="brova";
+                    bw.write(sendMessage+"\n");
+                    bw.flush();
+
+                    System.out.println("Message sent to the server : " + sendMessage);
+                }
+                catch (KeyStoreException e)
+                {
+                    e.printStackTrace();
+                }
+                catch (CertificateException e)
+                {
+                    e.printStackTrace();
+                }
+                catch (NoSuchAlgorithmException e)
+                {
+                    e.printStackTrace();
+                }
+                catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+        readthread.start();
+        return 0;
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return null;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/Node.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/Node.java
new file mode 100644 (file)
index 0000000..0a39fdf
--- /dev/null
@@ -0,0 +1,436 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Color;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class Node implements Tree {
+
+    static int FIELD_UNSET = -1;
+    static int OPEN=0;
+    static int FAKE=1;
+    static int CLOSED=2;
+    static int FAKE_CLOSED=3;
+    static int CANCELED=4;
+    static int FAKE_CANCELED=5;
+
+    Formula F; //formula legata al nodo
+    String ruleName; //nome della regola associata a questo nodo
+    List<Node> Children = new ArrayList<Node>(); //Nodi figli
+    List<Hypothesis> NodeHP = new ArrayList<Hypothesis>(); //ipotesi associate
+    Node Father; //puntatore al padre
+    View.OnClickListener handler; //touchHandler per far comparire il pop-up delle regole
+    View.OnLongClickListener longHandler; //touchHandler per far comparire il menu con tutte le regole
+    boolean hasFocus; //indica se questo nodo è quello selezionato
+    int status; //stato del nodo (chiuso, aperto,fake...)
+    RelativeLayout global; //layout in cui si trova l'albero
+    BorderedTextView view; //view contenente questo oggetto
+    TextView ruleView; //view contenente l'intestazione della regola
+
+    float baseLine; //baseLine del Node: corrisponde alla lunghezza dell'overline
+    float leftOffset; //leftOffset: corrisponde alla larghezza della porzione di albero a sinistra del nodo
+    float rightOffset; //rightOffset: porzione di albero a destra del nodo
+    float maxWidth; //larghezza del sottoalbero di questo nodo (comprensiva del nodo stesso)
+
+    Node(Formula F) {
+        this.F = F;
+        view = null;
+        handler = null;
+        ruleName="";
+        Father = null;
+        status=OPEN;
+        hasFocus = false;
+        leftOffset = 0;
+        rightOffset = 0;
+        baseLine = getBaseWidth();
+        maxWidth = baseLine;
+    }
+
+    /**************SetView**************+*****/
+    /*****************************************/
+    /*******Setta la TextView del node  ******/
+    /** e il layout in cui deve comparire  ***/
+    /*****************************************/
+
+    public void setView(BorderedTextView t,RelativeLayout r) {
+        view = t;
+        ruleView =new TextView(t.getContext());
+        global=r;
+    }
+
+
+    /**************Count****************+*****/
+    /*****************************************/
+    /*******Restituisce il numero di    ******/
+    /*************nodi dell'albero ***********/
+    /*****************************************/
+
+    int count()
+    {
+        int ris=1;
+        for (Node n:Children)
+            ris+=n.count();
+        return ris;
+    }
+    /**************addHP****************+*****/
+    /*****************************************/
+    /*******Metodi per aggiungere ipotesi*****/
+    /*******sotto forma di Hypothesis o di****/
+    /*************Formula*********************/
+    /*****************************************/
+
+    public void addHPFormula(List<Formula>List,boolean deleted) {
+        loop:for (Formula newHp:List) {
+            for (Hypothesis oldHp: NodeHP) {
+                if (oldHp.HP.toString().equals(newHp.toString())) { //ipotesi già presente: passo alla prossima
+                    continue loop;
+                }
+            }
+            NodeHP.add(new Hypothesis(newHp, deleted));
+        }
+    }
+
+    public void addHPList(List<Hypothesis>List) {
+        loop:for (Hypothesis newHp:List) {
+            for (Hypothesis oldHp: NodeHP) {
+                if (oldHp.HP.toString().equals(newHp.HP.toString())) { //ipotesi già presente: passo alla prossima
+                    continue loop;
+                }
+            }
+            Hypothesis copyHP=new Hypothesis(newHp.HP, newHp.isDeleted);
+            copyHP.fromNode=newHp.fromNode;
+            NodeHP.add(copyHP);
+        }
+    }
+
+    /*****************************************/
+    /******* Algoritmo di ricerca del ********/
+    /******* focus: restituisce false ********/
+    /******* se la dimostrazione è completa***/
+
+    public boolean searchFocus(Node caller)
+    {
+        if (Children.size()==0) //caso base: controllo se il focus può essere su di me
+        {
+            if (status!=OPEN && status!=FAKE) //nodo chiuso: il focus non può essere su di me
+                return false;
+            hasFocus=true;                             //posso assumere il focus
+            if (handler!=null)
+                handler.onClick(view);
+            return true;
+        }
+        //passo induttivo: vado su tutti i miei figli, poi su mio padre. Termino se il padre è null.
+        for (Node n:Children) {
+            if (caller != null)
+                if (n == caller) //per ogni figlio diverso dal chiamante
+                {
+                    continue;
+                }
+            if(n.searchFocus(null))
+                return true;
+        }
+        if (caller==null) //ero stato chiamato da mio padre: è inutile richiamarlo
+            return false;
+        else if (Father==null)
+            return false; //padre null: l'albero è dimostrato e non ci sono nodi a cui dare il focus.
+        else
+            return Father.searchFocus(this); //propaga il searchFocus sul padre
+    }
+    public void addChild(Node N) {
+        N.Father = this;
+        Children.add(N);
+        Node tmp=Father;
+        //c'è un nuovo nodo nell'albero: tutti i campi dell'algoritmo di disegno sono da ricalcolare per questo ramo
+        baseLine=FIELD_UNSET;
+        maxWidth=FIELD_UNSET;
+        leftOffset=FIELD_UNSET;
+        rightOffset=FIELD_UNSET;
+        while (tmp!=null)
+        {
+            tmp.baseLine=FIELD_UNSET;
+            tmp.leftOffset=FIELD_UNSET;
+            tmp.rightOffset=FIELD_UNSET;
+            tmp.maxWidth=FIELD_UNSET;
+            tmp=tmp.Father;
+        }
+    }
+
+    public float getBaseWidth() {
+        return F.size();
+    }
+
+    public float getMaxWidth() //ritorna la larghezza massima del sottoalbero
+    {
+        if (maxWidth!=FIELD_UNSET)
+            return maxWidth;
+        else
+            maxWidth=getLeftOffset()+getBaseWidth()+getRightOffset();
+        return (maxWidth);
+    }
+
+    public float getLineWidth()
+    {
+        if (baseLine!=FIELD_UNSET)
+            return baseLine;
+        else
+        {
+            baseLine=Math.max(getUpLine(),getBaseWidth()); //la baseline è il massimo valore tra la upLine e la baseWidth
+            return baseLine;
+        }
+    }
+    public float getUpLine() //calcola la upLine, ovvero la dimensione prevista del sottoalbero assumendo il nodo attuale di lunghezza unitaria
+    {
+        float spaceSize= DrawActivity.spaceSize;
+        if (Children.size()==0)
+            return(getBaseWidth());
+        int res=0;
+        for(Node n:Children)
+            res+=(n.getMaxWidth())+spaceSize;
+        res-=spaceSize;
+        res-=Children.get(0).getLeftOffset(); //la linea deve fermarsi all'inizio della formula del primo figlio sinistro
+        res-=Children.get(Children.size()-1).getRightOffset(); //la linea deve finire alla fine della formula dell'ultimo figlio destro
+        return res;
+    }
+
+    /**Calcolo del leftOffset
+     * esso è uguale al leftOffset del primo figlio, a cui aggiungere la porzione di overline a sinistra della formula del nodo
+     * o rimuovere la mezza differenza tra la baseWidth e la upLine. Se il leftOffset risulterebbe negativo, diventa nullo.
+     */
+
+    public float getLeftOffset() {
+        if (leftOffset != FIELD_UNSET) {
+            return leftOffset;
+        }
+        else {
+            if (Children.size() == 0) //foglia
+                leftOffset=0;
+            else
+                leftOffset=Math.max(Children.get(0).getLeftOffset() + ((getUpLine() - getBaseWidth()) / 2),0);
+            return leftOffset;
+        }
+    }
+
+    public float getRightOffset()
+    {
+        if (rightOffset!=FIELD_UNSET)
+            return rightOffset;
+        else {
+            if (Children.size() == 0) //foglia
+                rightOffset=0;
+            else
+                rightOffset=Math.max(Children.get(Children.size() - 1).getRightOffset() + ((getUpLine() - getBaseWidth()) / 2),0);
+            return rightOffset;
+        }
+    }
+
+    public float getMaxHeight() //calcolo dell'altezza massima dell'albero attuale.
+    {
+        float baseRes=F.height();
+        float res=baseRes;
+        for (Node n:Children)
+        {
+            float tempH=n.getMaxHeight()+baseRes;
+            if(tempH>res)
+                res=tempH;
+        }
+        return res;
+    }
+
+    void Refactor() //metodo di supporto: svuota i campi dell'intero sottoalbero che verranno ricalcolati dall'algoritmo alla prossima applicazione
+    {
+        baseLine=FIELD_UNSET;
+        leftOffset=FIELD_UNSET;
+        rightOffset=FIELD_UNSET;
+        maxWidth=FIELD_UNSET;
+        for(Node n:Children)
+            n.Refactor();
+    }
+
+
+    public void Clean() //metodo di supporto: rimuove dal layout legato al Node tutte le view presenti
+    {
+        global.removeAllViews();
+    }
+
+    public boolean isCorrect() //controlla per l'intero sottoalbero se esso è privo di nodi fake.
+    {
+        if (status==FAKE || status==FAKE_CANCELED || status==FAKE_CLOSED)
+            return false;
+        else for (Node n:Children)
+            if (!n.isCorrect())
+                return false;
+        return true;
+
+    }
+
+    public void Draw()
+    {
+        float interval=0; //intervallo di spazio da sommare nella creazione dei figli
+        float spaceSize= DrawActivity.spaceSize; //dimensione della spaziatura tra i sottoalberi
+        int childNo=Children.size(); //numero di figli del nodo attuale
+        if (childNo==0) //foglia: possibile ramo dimostrato
+
+        {
+            view.setBorders(null); //le foglie non hanno overline
+            if (status!=OPEN && status!=FAKE) { //nodo chiuso
+                view.setTextColor(Color.GRAY);
+                if (hasFocus) //avevo il focus: provo a darlo ad uno dei miei fratelli
+                {
+                    if (!(Father.searchFocus(this))) { //focus inapplicabile nell'albero: dimostrazione completata.
+                        DrawActivity.finishedTree(view.getContext());
+                        return;
+                    }
+                    hasFocus = false;
+                }
+                if (status==CANCELED || status==FAKE_CANCELED) { //nodo cancellato
+                    view.setWidth((int) F.sizeDeleted());
+                    view.setText(F.toStringDeleted());
+                    view.setOnClickListener(null); //rimuove eventuali listener per evitare il proseguimento dell'albero
+                    /**NOTA: è possibile permettere all'utente di proseguire la dimostrazione
+                     * di un ramo chiuso commentando la riga precedente e aggiungendo nel touchnodeHandler
+                     * un'controllo che, in caso di nodo chiuso cliccato, lo riapre e gli riaffida il focus.
+                     */
+                }
+                return;
+            }
+            if (hasFocus && DrawActivity.selectedNode!=this)
+                handler.onClick(view);
+            else if (hasFocus) //hasFocus: must be colored red anyway
+                view.setTextColor(Color.RED);
+            return;
+        }
+
+        ruleView.setText(ruleName);
+        ruleView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize / 2);
+        RelativeLayout.LayoutParams intlp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        intlp.addRule(RelativeLayout.RIGHT_OF,view.getId());
+        intlp.addRule(RelativeLayout.ABOVE,view.getId());
+        ruleView.setLayoutParams(intlp);
+        global.addView(ruleView);
+
+        hasFocus=false; //se sono arrivato a questo punto il nodo non è una foglia e non può avere il focus di default
+
+        for (int i=0;i<childNo;i++) {
+            final Node newChild=Children.get(i); //recupero l'i-esimo figlio
+            RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            final BorderedTextView childView=new BorderedTextView(view.getContext());
+            childView.setBorders(DrawActivity.b);
+            lp.addRule(RelativeLayout.ABOVE, view.getId());
+            if (i==0) //first child
+            {
+                float leftPos= view.getLeft()-Math.max((newChild.getLineWidth()-newChild.getBaseWidth())/2,0); //il primo figlio è posizionato a sinistra del padre, con un ulteriore offset
+                                                                                                               // sinistro pari allo scarto della sua overline
+                if (getLineWidth()>getUpLine()) //sono più grande dell'overline prevista: aggiungo un ulteriore offset al figlio
+                    leftPos+=((getLineWidth()-getUpLine())/2);
+                lp.setMargins(Math.round(leftPos), 0, 0, 0); //leftPos è il margine sinistro del figlio
+                childView.setLeft(Math.round(leftPos));
+            }
+            else {
+                lp.setMargins(Math.round(view.getLeft() + interval), 0, 0, 0); //figlio intermedio: basta aggiungere l'interval alla posizione sinistra del padre
+                childView.setLeft(Math.round(view.getLeft() + interval));
+            }
+            childView.setLayoutParams(lp);
+            childView.setId(DrawActivity.globalId++);
+            childView.setText(newChild.F.toString());
+            childView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize);
+            childView.setGravity(Gravity.CENTER); //formula al centro della sua overline
+            childView.setWidth(Math.round(newChild.getLineWidth()));
+            global.addView(childView);
+            childView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+                @Override
+                public void onGlobalLayout() {
+                    newChild.setView(childView,global);
+                    if(newChild.handler==null)
+                        newChild.handler=new touchnodeHandler(newChild);
+                    newChild.longHandler=new longnodeHandler(newChild);
+                    newChild.view.setOnClickListener(newChild.handler);
+                    newChild.view.setOnLongClickListener(newChild.longHandler);
+                    childView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
+                    newChild.Draw();
+                }
+            });
+            if (i!=childNo-1) //l'ultimo figlio non ha intervalli
+            {
+                float leftOverflow=Math.max((Children.get(i+1).getLineWidth()-Children.get(i+1).getBaseWidth())/2,0);
+                interval += (newChild.getBaseWidth()+newChild.getRightOffset()+Children.get(i+1).getLeftOffset()-(leftOverflow)); //devo aggiungere all'interval la basewidth del figlio attuale, il rightoffset del figlio attuale e il leftOffset del figlio successivo.
+                interval+=spaceSize;
+                if (i!=0) //devo sommare anche il leftOverflow del nuovo figlio
+                    interval+=newChild.getLeftOffset();
+            }
+        }
+    }
+    void Resize() //metodo per ridisegnare l'albero dopo un pinch zoom: l'algoritmo applicato è uguale a quello del metodo Draw()
+    {
+        int i;
+        float interval=0; //intervallo di spazio da sommare nella creazione dei figli
+        float spaceSize= DrawActivity.spaceSize;
+        int childNo=Children.size();
+        if (childNo!=0)
+        {
+
+            ruleView.setText(ruleName);
+            ruleView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize / 2);
+            RelativeLayout.LayoutParams intlp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            intlp.addRule(RelativeLayout.RIGHT_OF,view.getId());
+            int sum=0;
+            sum+=F.height();
+            Node tmp=Father;
+            while (tmp!=null)
+            {
+                sum+=tmp.F.height();
+                tmp=tmp.Father;
+            }
+            intlp.setMargins(0,0,0,sum);
+            intlp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
+            ruleView.setLayoutParams(intlp);
+        }
+        for (i=0;i<childNo;i++) {
+            Node newChild=Children.get(i);
+            RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            TextView childView=Children.get(i).view;
+            lp.addRule(RelativeLayout.ABOVE,view.getId());
+            if (i==0) //first child
+            {
+                float leftPos= view.getLeft()-Math.max((newChild.getLineWidth()-newChild.getBaseWidth())/2,0);
+                if (getLineWidth()>getUpLine())
+                    leftPos+=((getLineWidth()-getUpLine())/2);
+                lp.setMargins(Math.round(leftPos), 0, 0, 0);
+                childView.setLeft(Math.round(leftPos));
+            }
+            else {
+                lp.setMargins(Math.round(view.getLeft() + interval), 0, 0, 0);
+                childView.setLeft(Math.round(view.getLeft() + interval));
+            }
+            childView.setLayoutParams(lp);
+            childView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize);
+
+            if(newChild.status==CANCELED || newChild.status==FAKE_CANCELED)
+                childView.setWidth((int) ((newChild.F.sizeDeleted())));
+            else
+                childView.setWidth(Math.round(newChild.getLineWidth()));
+
+            newChild.Resize();
+
+            if (i!=childNo-1) //l'ultimo figlio non ha intervalli
+            {
+                float leftOverflow=(Children.get(i+1).getLineWidth()-Children.get(i+1).getBaseWidth())/2;
+                interval += (newChild.getBaseWidth()+newChild.getRightOffset()+Children.get(i+1).getLeftOffset()-(leftOverflow));
+                interval+=spaceSize;
+                if (i!=0) //devo sommare anche il leftOverflow del nuovo figlio
+                    interval+=newChild.getLeftOffset();
+            }
+
+        }
+
+    }
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleAndElimination.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleAndElimination.java
new file mode 100644 (file)
index 0000000..5970a86
--- /dev/null
@@ -0,0 +1,41 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RuleAndElimination implements EliminationRule
+{
+    String ruleName;
+    FormulaAnd Fn;
+    RuleAndElimination(FormulaAnd F){
+        Fn=F;
+        ruleName="∧e";
+    }
+    public Node createNodes(Formula F,askFormula ask)
+    {
+            Formula C;
+            if (F==null) //applicazione Top-Down: chiamo la callback
+                C=ask.Ask();
+            else
+                C=F; //applicazione bottom-up: il nuovo nodo è la formula F passata
+            Node cNode=new Node(C);
+            if ((C.toString().equals(Fn.leftF.toString())) || (C.toString().equals(Fn.rightF.toString()))) //Posso utilizzare le regole di eliminazione sinistra o destra
+            {
+                cNode.addChild(new Node(Fn));
+                cNode.ruleName=ruleName;
+                return cNode;
+            }
+            Node elNode=new Node(Fn);
+            List<Formula> HP=new ArrayList<Formula>();
+            HP.add(Fn.leftF);
+            HP.add(Fn.rightF);
+            cNode.addHPFormula(HP,true);
+            Node rNode=new Node(C);
+            rNode.addChild(elNode);
+            rNode.addChild(cNode);
+            rNode.ruleName=ruleName;
+            return rNode;
+    }
+}
+
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleBotElimination.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleBotElimination.java
new file mode 100644 (file)
index 0000000..501dfe5
--- /dev/null
@@ -0,0 +1,25 @@
+package com.example.furt.myapplication;
+
+public class RuleBotElimination implements EliminationRule
+{
+    String ruleName;
+    FormulaBOT Fn;
+    RuleBotElimination(FormulaBOT F)
+    {
+        Fn=F;
+        ruleName="⊥e";
+    }
+    public Node createNodes(Formula F,askFormula ask)
+    {
+        Formula C;
+        if (F!=null)
+            C=F;
+        else
+            C=ask.Ask();
+        Node elNode=new Node(Fn);
+        Node rNode=new Node(C);
+        rNode.addChild(elNode);
+        rNode.ruleName=ruleName;
+        return rNode;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleDialog.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleDialog.java
new file mode 100644 (file)
index 0000000..1cffd89
--- /dev/null
@@ -0,0 +1,168 @@
+package com.example.furt.myapplication;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.RelativeLayout;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RuleDialog extends DialogFragment {
+    List<IntroductionRule> rules;
+    boolean showAllRules;
+    public RuleDialog(List<IntroductionRule> r)
+    {
+        rules=new ArrayList<IntroductionRule>();
+        rules.addAll(r);
+        showAllRules=false;
+    }
+    @Override
+    public Dialog onCreateDialog(final Bundle savedInstanceState) {
+        // Use the Builder class for convenient dialog construction
+        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        int prules=0;
+        for (IntroductionRule r:rules)
+            if (r.getPriority()>0)
+                prules++;
+        if (prules==0 && !showAllRules)
+        {
+            showAllRules=true;
+            reboot();
+            dismiss();
+            return builder.create();
+        }
+        LayoutInflater inflater=getActivity().getLayoutInflater();
+        View view=inflater.inflate(R.layout.ruledialog,null);
+        RelativeLayout layout=(RelativeLayout)((ViewGroup)((ViewGroup)view).getChildAt(0)).getChildAt(0);
+        int ruleInterval=50;
+        for (IntroductionRule rule : rules) {
+            if (!showAllRules && rule.getPriority() == 0)
+                continue; //only high priority: skip this node
+            final Node drawNode = rule.createNodes(new askFormula());
+            BorderedTextView t = new BorderedTextView(layout.getContext());
+            t.setId(DrawActivity.globalId);
+            DrawActivity.globalId++;
+            drawNode.setView(t, layout);
+            RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            lp.setMargins(ruleInterval, 0, 0, 0);
+            ruleInterval += 2 * drawNode.getMaxWidth();
+            lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, drawNode.view.getId());
+            drawNode.view.setLayoutParams(lp);
+            drawNode.view.setBorders(DrawActivity.b);
+            drawNode.view.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize);
+            drawNode.view.setWidth(Math.round(drawNode.getLineWidth())); //setto la larghezza della view al contenuto della linea
+            drawNode.view.setGravity(Gravity.CENTER); //formula al centro della sua overline
+            drawNode.view.setText(drawNode.F.toString()); //setta il contenuto della formula
+            drawNode.global.addView(drawNode.view);
+            drawNode.handler = new DialogTouchHandler(drawNode);
+            for (Node n : drawNode.Children) {
+                n.handler = new DialogTouchHandler(drawNode);
+            }
+            //inserisco un listener a rootView da attivare quando sono state fissate le coordinate nel RelativeLayout
+            drawNode.view.getViewTreeObserver().addOnGlobalLayoutListener(
+                    new ViewTreeObserver.OnGlobalLayoutListener() {
+                        @Override
+                        public void onGlobalLayout() {
+                            drawNode.global.setPadding(0, 0, (int) Math.max(drawNode.getRightOffset(), 50), 0); //MAXWIDTH non provoca lo scroll involontario dello schermo.
+                            drawNode.global.getLayoutParams().height = (int) Math.max(100, drawNode.getMaxHeight());
+                            drawNode.global.requestLayout();
+                            drawNode.view.setOnClickListener(drawNode.handler);
+                            drawNode.hasFocus = true;
+                            drawNode.view.getViewTreeObserver().removeOnGlobalLayoutListener(this); //rimuove il listener per evitare che l'albero sia creato ad ogni modifica del layout
+                            drawNode.Draw();
+                        }
+                    });
+        }
+        builder.setView(view);
+        builder.setTitle("Scegli una regola:");
+        builder.setPositiveButton("Incolla sottoalbero",new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                if (DrawActivity.copiedNode == null) //non ci sono nodi da copiare
+                {
+                    Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile incollare: nessun nodo copiato",Toast.LENGTH_LONG).show();
+                }
+                else if (!checkHP(DrawActivity.copiedNode, DrawActivity.selectedNode)) //ipotesi incompatibili: impossibile incollare in questo punto
+                    Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile incollare: sottoalberi incompatibili",Toast.LENGTH_LONG).show();
+                else {
+                    Node tmp = duplicateNode(DrawActivity.copiedNode); //duplica il nodo copiato
+                    DrawActivity.selectedNode.ruleName=tmp.ruleName; //eredita il nome della regola
+                    DrawActivity.selectedNode.Children = new ArrayList<Node>();
+                    for (Node c:tmp.Children)
+                        DrawActivity.selectedNode.addChild(c); //incolla il sottoalbero del nodo copiato nella posizione richiesta
+                    DrawActivity.rootNode.Clean();
+                    DrawActivity.startDraw();
+                }
+            }
+        });
+        if (!showAllRules) {
+            builder.setNeutralButton("Mostra tutte", new DialogInterface.OnClickListener() {
+                public void onClick(DialogInterface dialog, int id) {
+                    showAllRules=true;
+                    reboot();
+                }
+            });
+        }
+        else {
+            builder.setNeutralButton("Nascondi", new DialogInterface.OnClickListener() {
+                public void onClick(DialogInterface dialog, int id) {
+                    showAllRules=false;
+                    reboot();
+                }
+            });
+        }
+        builder.setNegativeButton("Annulla", new DialogInterface.OnClickListener() {
+            public void onClick(DialogInterface dialog, int id) {
+            }
+        });
+        // Create the AlertDialog object and return it
+        return builder.create();
+    }
+    void reboot()
+    {
+        touchnodeHandler.ruleDialog=new RuleDialog(rules);
+        touchnodeHandler.ruleDialog.showAllRules=showAllRules;
+        touchnodeHandler.ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
+    }
+
+    public boolean checkHP(Node source,Node target) //controlla se le ipotesi di source sono compatibili per una copia in target
+    {
+        boolean found=false;
+        if (!source.F.toString().equals(target.F.toString())) //se i nodi non hanno la stessa formula la copia è automaticamente impossibile
+            return false;
+        for (Hypothesis sourceHp:source.NodeHP) {
+            for (Hypothesis destHp : target.NodeHP) {
+                if (destHp.HP.toString().equals(sourceHp.HP.toString())) { //per ogni ipotesi nel nodo sorgente cerco se è disponibile nel nodo destinazione: in caso affermativo, proseguo il ciclo (found=true).
+                    found = true;
+                    break;
+                }
+            }
+            if (!found)
+                return false;
+            else found=false;
+        }
+        return true;
+    }
+
+    public Node duplicateNode(Node src) //metodo di supporto che duplica un nodo
+    {
+        Node tmp=new Node(src.F);
+        tmp.addHPList(src.NodeHP);
+        tmp.ruleName=src.ruleName;
+        for (Node n:src.Children) {
+            tmp.addChild(duplicateNode(n));
+        }
+        return tmp;
+    }
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleImplElimination.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleImplElimination.java
new file mode 100644 (file)
index 0000000..f2fd1ff
--- /dev/null
@@ -0,0 +1,31 @@
+package com.example.furt.myapplication;
+
+public class RuleImplElimination implements EliminationRule
+{
+    String ruleName;
+    FormulaImpl Fn;
+    RuleImplElimination(FormulaImpl F)
+    {
+        Fn=F;
+        ruleName="⇒e";
+    }
+    public Node createNodes(Formula F,askFormula ask)
+    {
+        Formula C;
+        if (F==null) {
+            C=ask.Ask();
+            if (!(C.toString().equals(Fn.rightF.toString())))
+                return null;
+        }
+        else
+            if (!(F.toString().equals(Fn.rightF.toString())))
+                return null;
+            Node elNode=new Node(Fn);
+            Node lNode=new Node(Fn.leftF);
+            Node bNode=new Node(Fn.rightF);
+            bNode.addChild(elNode);
+            bNode.addChild(lNode);
+            bNode.ruleName=ruleName;
+            return bNode;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleIntroduction.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleIntroduction.java
new file mode 100644 (file)
index 0000000..ed0b6a1
--- /dev/null
@@ -0,0 +1,30 @@
+package com.example.furt.myapplication;
+
+//Regole di introduzione per la deduzione top-down: la formula è sempre applicabile, per cui la regola si limita
+//a chiamare la callback e restituire il sottoalbero di nodi conseguente all'applicazione della regola
+public class RuleIntroduction implements IntroductionRule
+{
+    int priority;
+    Node tempRule;
+    String ruleName;
+    public RuleIntroduction(String name,int p)
+    {
+        ruleName=name; priority=p;
+    }
+    public Node createNodes(askFormula ask)
+    {
+        Formula C=ask.Ask();
+        for (Node n:tempRule.Children)
+        {
+            if (n.F.toString().equals(" ")) //undefined formula
+                n.F=C;
+            n.ruleName=ruleName;
+        }
+        tempRule.ruleName=ruleName;
+        return tempRule;
+    }
+    public int getPriority()
+    {
+        return priority;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleNotElimination.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleNotElimination.java
new file mode 100644 (file)
index 0000000..7c7aaca
--- /dev/null
@@ -0,0 +1,29 @@
+package com.example.furt.myapplication;
+
+public class RuleNotElimination implements EliminationRule
+{
+    String ruleName;
+    FormulaNot Fn;
+    RuleNotElimination(FormulaNot F)
+    {
+        Fn=F;
+        ruleName="¬e";
+    }
+    public Node createNodes(Formula F,askFormula ask)
+    {
+        Formula C=ask.Ask();
+        if ((C.toString().equals("⊥"))&&(F==null ||F==Fn.Operand)) //top-down con nodo attuale bottom o bottom-up con nodi attuali Fn e !Fn
+        {
+            Node elNode=new Node(Fn);
+            Node cNode=new Node(Fn.Operand);
+            Node rNode=new Node(C);
+            rNode.addChild(elNode);
+            rNode.addChild(cNode);
+            rNode.ruleName=ruleName;
+            return rNode;
+        }
+        else
+            return null;
+    }
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleOrElimination.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/RuleOrElimination.java
new file mode 100644 (file)
index 0000000..75d1a77
--- /dev/null
@@ -0,0 +1,38 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RuleOrElimination implements EliminationRule
+{
+    String ruleName;
+    FormulaOr Fn;
+    RuleOrElimination(FormulaOr F)
+    {
+        Fn=F;
+        ruleName="∨e";
+    }
+    public Node createNodes(Formula F,askFormula ask)
+    {
+        Formula C;
+        if (F==null)
+            C=ask.Ask();
+        else
+            C=F;
+            Node elNode=new Node(Fn);
+            Node c1Node=new Node(C);
+            Node c2Node=new Node(C);
+            List<Formula> HP1=new ArrayList<Formula>();
+            List<Formula> HP2=new ArrayList<Formula>();
+            HP1.add(Fn.leftF);
+            HP2.add(Fn.rightF);
+            c1Node.addHPFormula(HP1,true);
+            c2Node.addHPFormula(HP2,true);
+            Node rNode=new Node(C);
+            rNode.addChild(elNode);
+            rNode.addChild(c1Node);
+            rNode.addChild(c2Node);
+            rNode.ruleName=ruleName;
+            return rNode;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/ServerData.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/ServerData.java
new file mode 100644 (file)
index 0000000..2466f27
--- /dev/null
@@ -0,0 +1,40 @@
+package com.example.furt.myapplication;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+// simple class that just has one member property as an example
+public class ServerData implements Parcelable {
+    private static List<String> L;
+
+    ServerData(List<String> List)
+    {
+        L=List;
+    }
+    /* everything below here is for implementing Parcelable */
+
+    // 99.9% of the time you can just ignore this
+    public int describeContents() {
+        return 0;
+    }
+
+    // write your object's data to the passed-in Parcel
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeList(L);
+    }
+
+    // this is used to regenerate your object. All Parcelables must have a CREATOR that implements these two methods
+    public static final Creator<ServerData> CREATOR = new Creator<ServerData>() {
+        public ServerData createFromParcel(Parcel in) {
+            return new ServerData(L);
+        }
+
+        public ServerData[] newArray(int size) {
+            return new ServerData[size];
+        }
+    };
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/Tree.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/Tree.java
new file mode 100644 (file)
index 0000000..87c2b28
--- /dev/null
@@ -0,0 +1,12 @@
+package com.example.furt.myapplication;
+
+public interface Tree
+{
+        float getBaseWidth();
+        float getMaxWidth();
+        float getLineWidth();
+        float getUpLine();
+        float getLeftOffset() ;
+        float getRightOffset();
+        void Draw();
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/UndefinedFormula.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/UndefinedFormula.java
new file mode 100644 (file)
index 0000000..c5885a0
--- /dev/null
@@ -0,0 +1,59 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Paint;
+
+import java.util.List;
+
+public class UndefinedFormula implements Formula{
+
+    Paint p=new Paint();
+    int priority;
+    boolean currentF; //indica se la formula è quella su cui sta lavorando il parser per l'inserimento di ipotesi
+    UndefinedFormula()
+    {
+        priority=100;
+        currentF=false;
+    }
+    public String Draw(int x)
+    {
+        if(currentF) //la formula corrente visualizza un _
+            return "_";
+        else
+           return " ";
+    }
+    public String toString(){return Draw(0);}
+    public String toStringDeleted(){return null;} //UndefinedFormula non può essere scaricata
+    public float size(){
+        p.setTextSize(DrawActivity.textSize);
+        return p.measureText(toString());
+    }
+    public float height()
+    {
+        return 0;
+    } //UndefinedFormula non ha dimensioni e non accetta regole
+    public float sizeDeleted(){return(0);}
+    public List<IntroductionRule> introductionRules(){
+        return null;
+    }
+    public List<EliminationRule> EliminationRules(){
+        return null;
+    }
+
+    @Override
+    public boolean Fill(Formula F) {
+        return false;
+    }
+
+    @Override
+    public boolean setCursor() {
+        currentF=true;
+        return true;
+    }
+
+    @Override
+    public Formula duplicate() {
+        UndefinedFormula tmp=new UndefinedFormula();
+        tmp.currentF=this.currentF;
+        return tmp;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/aggiorna.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/aggiorna.java
new file mode 100644 (file)
index 0000000..7ea276d
--- /dev/null
@@ -0,0 +1,239 @@
+package com.example.furt.myapplication;
+
+
+import android.content.Context;
+import android.os.AsyncTask;
+import android.os.Environment;
+import android.widget.Toast;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+public class aggiorna {
+
+    aggiorna(){}
+
+    public String sincronizza(String sessionKey,String user,String pass) {
+        String ritorno = null;
+        String login = "1/" + user + "/" + pass;
+        while (ritorno == null || ritorno.contains("request-login"))
+        {
+            ritorno = serverSync(sessionKey, user);
+            if(ritorno == null || ritorno.contains("request-login"))
+            {
+                sessionKey= serverComunication.connessione(login);
+            }
+            else if(ritorno.contains("error"))
+                Toast.makeText(aggiornamento.t.getContext().getApplicationContext(), "errore di connessione", Toast.LENGTH_SHORT).show();
+        }
+        ritorno=null;
+        while (ritorno == null || ritorno.contains("request-login"))
+        {
+            ritorno = syncLocaldb(sessionKey, user);
+            if(ritorno == null || ritorno.contains("request-login"))
+            {
+                sessionKey= serverComunication.connessione(login);
+            }
+            else if(ritorno.contains("error"))
+                Toast.makeText(aggiornamento.t.getContext().getApplicationContext(), "errore di connessione", Toast.LENGTH_SHORT).show();
+        }
+        ritorno=null;
+        while (ritorno == null || ritorno.contains("request-login"))
+        {
+            ritorno=downloadEX(sessionKey);
+            if(ritorno == null || ritorno.contains("request-login"))
+            {
+                sessionKey= serverComunication.connessione(login);
+            }
+            else if(ritorno.contains("error"))
+                Toast.makeText(aggiornamento.t.getContext().getApplicationContext(), "errore di connessione", Toast.LENGTH_SHORT).show();
+        }
+        return sessionKey;
+    }
+
+    public String serverSync(String sessionKey, String user)
+    {
+        personalDBHelper connessione = new personalDBHelper(aggiornamento.t.getContext());
+        List<listElem> esercizi=connessione.getElem(user);
+        if(esercizi!=null && !esercizi.isEmpty()) {
+
+            for (listElem esercizio : esercizi) {
+                String richiesta = "8/" + sessionKey + "/" + esercizio.getEsercizio() + "/" + esercizio.getMd5() + "/" + esercizio.getTime() + "/" + esercizio.getClick();
+                String ritorno = serverComunication.connessione(richiesta);
+                if (ritorno.contains("es-ok"))
+                    connessione.updateElem(esercizio.getMd5(), user, esercizio.getTime());
+                else if (ritorno.contains("request-login") || ritorno.contains("es-err")){
+                   if(ritorno.contains("es-err"))
+                        connessione.remove(esercizio.getUtente(),esercizio.getTime());
+                    return ritorno;
+                 }
+            }
+        }
+        return "sync-ok";
+    }
+
+    public String syncLocaldb(String sessionKey, String utente)
+    {
+        String richiesta = "9/" + sessionKey;
+        String ritorno = serverComunication.connessione(richiesta);
+        if(ritorno.contains("request-login"))
+            return ritorno;
+        else
+        {
+            personalDBHelper connessione=new personalDBHelper(aggiornamento.t.getContext().getApplicationContext());
+            ArrayList<String> allExercise=suString.stringToMultiArray(ritorno);
+            List<listElem> localExercise=connessione.getAllElem(utente);
+            if(localExercise!=null && !localExercise.isEmpty()) {
+                for (String ex : allExercise) {
+                    ArrayList<String> tmp = suString.stringToArrayList(ex);
+                    boolean add = true;
+                    for (listElem elem : localExercise) {
+                        if (tmp.get(0).equals(elem.getEsercizio()) && Double.valueOf(tmp.get(2)) == elem.getTime()) {
+                            if (elem.getCheck() == 0)
+                                connessione.updateElem(tmp.get(1), utente, Double.valueOf(tmp.get(2)));
+                            add = false;
+                        }
+                    }
+                    if (add)
+                        if(tmp.size()>3)
+                            connessione.add(utente, tmp.get(0), tmp.get(1), Double.valueOf(tmp.get(2)), Integer.valueOf(tmp.get(3)), 1);
+                }
+            }
+            else{
+                for (String ex : allExercise) {
+                    ArrayList<String> tmp = suString.stringToArrayList(ex);
+                    if(tmp.size()>3)
+                        connessione.add(utente, tmp.get(0), tmp.get(1), Double.valueOf(tmp.get(2)), Integer.valueOf(tmp.get(3)), 1);
+                }
+            }
+        }
+        return "local-sync-ok";
+    }
+
+    public String downloadEX(String sessionKey)
+    {
+        Context context = aggiornamento.t.getContext();
+        File SDCardRoot = Environment.getExternalStorageDirectory();
+        String[] names = SDCardRoot.list();
+        String ritorno=null;
+        boolean go = true;
+        for (String name : names) {
+            if (name.compareTo("tesiEs") == 0) {
+                go = false;
+                break;
+            }
+        }
+        if (go) {
+            File dir = new File(global.esDir);
+            dir.mkdir();
+        }
+        try {
+            ritorno = serverComunication.connessione("7/" + sessionKey);
+            if (!ritorno.contains("error") && !ritorno.contains("request-login"))
+            {
+                ArrayList<String> esercizi= suString.stringToMultiArray(ritorno);
+                File dir = new File(global.esDir);
+                String[] presenti = dir.list();
+                boolean tmp = true;
+                for(String esercizio : esercizi)
+                {
+                    ArrayList<String> es=suString.stringToArrayList(esercizio);
+                    tmp = true;
+                    for (String nome : presenti) {
+                        if (nome.contentEquals(es.get(0))) {
+                            if ((MD5.digest(nome)).contentEquals(es.get(1))) {
+                                tmp = false;
+                            }
+                            else {
+                                File file = new File(global.esDir + nome);
+                                file.delete();
+                            }
+                        }
+                    }
+                    if (tmp) {
+                        String request = new download().execute(es.get(0)).get();
+                    }
+                }
+            }
+        }catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+        return ritorno;
+    }
+}
+class download extends AsyncTask<String,String,String>
+{
+    @Override
+    protected String doInBackground(String... params)
+    {
+        try {
+            //set the download URL, a url that points to a file on the internet
+            //this is the file to be downloaded
+            URL url = new URL(global.httpHost+params[0]);
+
+            //create the new connection
+            HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+
+            //set up some things on the connection
+            urlConnection.setRequestMethod("GET");
+            urlConnection.setDoOutput(true);
+
+            //and connect!
+            urlConnection.connect();
+
+            //set the path where we want to save the file
+            //in this case, going to save it on the root directory of the
+            //sd card.
+            File SDCardRoot = Environment.getExternalStorageDirectory();
+            File esDir = new File(global.esDir);
+            //create a new file, specifying the path, and the filename
+            //which we want to save the file as.
+
+
+            File file = new File(esDir,params[0]);
+            //this will be used to write the downloaded data into the file we created
+            FileOutputStream fileOutput = new FileOutputStream(file);
+
+            //this will be used in reading the data from the internet
+            InputStream inputStream = urlConnection.getInputStream();
+
+            //this is the total size of the file
+            int totalSize = urlConnection.getContentLength();
+            //variable to store total downloaded bytes
+            int downloadedSize = 0;
+
+            //create a buffer...
+            byte[] buffer = new byte[1024];
+            int bufferLength = 0; //used to store a temporary size of the buffer
+
+            //now, read through the input buffer and write the contents to the file
+            while ( (bufferLength = inputStream.read(buffer)) > 0 ) {
+                //add the data in the buffer to the file in the file output stream (the file on the sd card
+                fileOutput.write(buffer, 0, bufferLength);
+                //add up the size so we know how much is downloaded
+                downloadedSize += bufferLength;
+                //this is where you would do something to report the prgress, like this maybe
+                //updateProgress(downloadedSize, totalSize);
+
+            }
+            //close the output stream when done
+            fileOutput.close();
+
+//catch some possible errors...
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/aggiornamento.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/aggiornamento.java
new file mode 100644 (file)
index 0000000..ee114a9
--- /dev/null
@@ -0,0 +1,51 @@
+package com.example.furt.myapplication;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.widget.RelativeLayout;
+
+
+public class aggiornamento extends Activity
+{
+    static RelativeLayout t; //for context
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.aggiornamento);
+        t=(RelativeLayout)findViewById(R.id.glob_agg);
+        Bundle dati=getIntent().getExtras();
+        String user=dati.getString("user");
+        String pass=dati.getString("pass");
+        String sessionKey=dati.getString("sessionKey");
+        if(sessionKey.contentEquals("000000000"))//controllo se le credenziali memorizzate sono corrette
+        {
+            sessionKey = serverComunication.connessione("1/" + user + "/" + pass);
+            if(sessionKey.contentEquals("request-login") || sessionKey.contains("err"))
+            {
+                Intent i = new Intent(getApplicationContext(), mainActivity.class);
+                i.putExtra("logout", "si");
+                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                getApplicationContext().startActivity(i);
+                return;
+            }
+        }
+        aggiorna agg=new aggiorna();
+        sessionKey=agg.sincronizza(sessionKey,user,pass);
+        if(sessionKey.contains("err") || sessionKey.contentEquals("000000000"))
+        {
+            Intent i = new Intent(getApplicationContext(), mainActivity.class);
+            i.putExtra("logout", "si");
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            getApplicationContext().startActivity(i);
+        }
+        else {
+            Intent i = new Intent(getApplicationContext(), download_page.class);
+            i.putExtra("user", user);
+            i.putExtra("pass", pass);
+            i.putExtra("sessionKey", sessionKey);
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            getApplicationContext().startActivity(i);
+        }
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/askFormula.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/askFormula.java
new file mode 100644 (file)
index 0000000..ca15a35
--- /dev/null
@@ -0,0 +1,8 @@
+package com.example.furt.myapplication;
+
+/**
+ * askFormula(): callback per ottenere informazioni aggiuntive sulla regola da applicare
+ */
+public class askFormula{
+    public Formula Ask(){return DrawActivity.selectedNode.F;};
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/download_page.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/download_page.java
new file mode 100644 (file)
index 0000000..4541b31
--- /dev/null
@@ -0,0 +1,132 @@
+package com.example.furt.myapplication;
+
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import java.io.File;
+import java.util.List;
+
+public class download_page extends Activity
+{
+    static String user=null;
+    static String pass=null;
+    static String sessionKey=null;
+    static RelativeLayout globalDownload;
+    static TextView rootDownload;
+    static TextView dw;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        dw=(TextView)findViewById(R.id.startEs);
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.download);
+        final Context context=getApplicationContext();
+        Bundle dati=getIntent().getExtras();
+        globalDownload=(RelativeLayout)findViewById(R.id.dlglobal);
+        rootDownload=(TextView)findViewById(R.id.startEs);
+        user=dati.getString("user");
+        pass=dati.getString("pass");
+        sessionKey=dati.getString("sessionKey");
+        File dir = new File(global.esDir);
+        String[] presenti = dir.list();
+        ArrayAdapter<String> vievList=new ArrayAdapter<String>(this,R.layout.textviewgeneral);
+        ListView lista= (ListView) findViewById(R.id.listView);
+        for (String nome : presenti) {
+            String aggiungi="non risolto";
+            boolean min=false;
+            boolean check=false;
+            personalDBHelper db=new personalDBHelper(context);
+            List<listElem> risolti=db.getElemForName(user, nome);
+            if(risolti!=null && !risolti.isEmpty()) {
+
+                for (listElem elem : risolti) {
+                    if (!min && elem.getCheck() == 0) {
+                        min = true;
+                        aggiungi = "da confermare: " + elem.getClick() + "/30";
+                    } else if (!check && elem.getCheck() == 1) {
+                        min = true;
+                        check = true;
+                        aggiungi = elem.getClick() + "/30";
+                    }
+
+                }
+            }
+            vievList.add(nome+"\n"+aggiungi);
+        }
+        lista.setAdapter(vievList);
+        lista.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                TextView t=(TextView)view;
+                String valore=t.getText().toString();
+                String nomeEs = null;
+                for(int i=0;i<valore.length();i++)
+                {
+                    if(valore.charAt(i)=='.')
+                    {
+                        nomeEs=valore.substring(0,i)+".xml";
+                        i=valore.length();
+                    }
+                }
+                Intent i = new Intent(getApplicationContext(), DrawActivity.class);
+                i.putExtra("nomeEs", nomeEs);
+                i.putExtra("user",user);
+                i.putExtra("pass",pass);
+                i.putExtra("sessionKey",sessionKey);
+                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                getApplicationContext().startActivity(i);
+            }
+        });
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.menu_dow, menu);
+        return true;
+    }
+    @Override
+    public void onBackPressed() {
+        Intent i = new Intent(getApplicationContext(), mainActivity.class);
+        i.putExtra("logout","si");
+        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        getApplicationContext().startActivity(i);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+
+        if(id==R.id.aggiorna)
+        {
+            Intent i = new Intent(getApplicationContext(), aggiornamento.class);
+            i.putExtra("user", user);
+            i.putExtra("pass", pass);
+            i.putExtra("sessionKey", sessionKey);
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            getApplicationContext().startActivity(i);
+        }
+        else if (id==R.id.esci)
+        {
+            Intent i = new Intent(getApplicationContext(), mainActivity.class);
+            i.putExtra("logout","si");
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            getApplicationContext().startActivity(i);
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/global.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/global.java
new file mode 100644 (file)
index 0000000..ccfe2fb
--- /dev/null
@@ -0,0 +1,12 @@
+package com.example.furt.myapplication;
+
+
+import android.os.Environment;
+
+public class global {
+    public static String hostName = "130.136.129.1";
+    public static String esDir= Environment.getExternalStorageDirectory()+"/tesiEs/";
+    public static String httpHost="http://logicplayer.helm.cs.unibo.it/esercizi/";
+    public static int port=25000;
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/listElem.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/listElem.java
new file mode 100644 (file)
index 0000000..bbedd8a
--- /dev/null
@@ -0,0 +1,49 @@
+package com.example.furt.myapplication;
+
+
+public class listElem {
+    private String esercizio;
+    private double time;
+    private int check;
+    private  String md5;
+    private String utente;
+    private int click;
+
+    listElem()
+    {}
+
+    public void setEsercizio(String esercizio)
+    {
+        this.esercizio=esercizio;
+    }
+    public void setTime(double time)
+    {
+        this.time=time;
+    }
+    public void setCheck(int check)
+    {
+        this.check=check;
+    }
+    public void setMd5(String md5){this.md5=md5;}
+    public void setUtente(String utente){this.utente=utente;}
+    public void setClick(int click){this.click=click;}
+
+    public String getUtente(){return  this.utente;}
+    public String getEsercizio()
+    {
+        return this.esercizio;
+    }
+    public String getMd5()
+    {
+        return this.md5;
+    }
+    public double getTime()
+    {
+        return this.time;
+    }
+    public int getCheck()
+    {
+        return this.check;
+    }
+    public int getClick(){return this.click;}
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/longnodeHandler.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/longnodeHandler.java
new file mode 100644 (file)
index 0000000..b17796d
--- /dev/null
@@ -0,0 +1,26 @@
+package com.example.furt.myapplication;
+
+import android.view.View;
+
+/**LongNodeHandler: handler per la pressione prolungata di un nodo**/
+
+public class longnodeHandler implements View.OnLongClickListener {
+    Node n; //nodo a cui è legato questo handler
+
+    longnodeHandler(Node node) {
+        n = node;
+    }
+
+    @Override
+    public boolean onLongClick(View view) {
+        if (DrawActivity.selectedNode != null)
+            if (DrawActivity.selectedNode.view == view) {
+                if (DrawActivity.selectedNode.Children.size() == 0) { //se l'hold click è stato fatto sul selectedNode ed esso è un nodo foglia
+                        touchnodeHandler.ruleDialog = new RuleDialog(DrawActivity.selectedNode.F.introductionRules());
+                        touchnodeHandler.ruleDialog.showAllRules=true; //nuovo ruleDialog con l'opzione showAllRules già settata
+                        touchnodeHandler.ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
+                }
+            }
+        return true;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/mainActivity.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/mainActivity.java
new file mode 100644 (file)
index 0000000..3f456a5
--- /dev/null
@@ -0,0 +1,153 @@
+package com.example.furt.myapplication;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+/*possiamo chiavare la mainActiviti in due casi, il primo è aprendo l'applicazione, il secondo è effettuando il
+* logout. nel primo caso viene controllato se sono state memorizzate delle credenziali e nel caso, il login viene
+* efetttuato direttamente. nel caso in cui si effettua il logout o non sono state memorizzate le credenziali,
+* viene data la possibilità di registrarsi o loggarsi, è possibile tramite il menù recuperare la password o aggiornarla
+* una volta effettuato il login viene passato il controllo ad "aggiorna.java"*/
+
+public class mainActivity extends Activity {
+
+    static TextView t;
+    public static final String PREFS_NAME = "MyPrefsFile";
+    private static final String PREF_USERNAME = "username";
+    private static final String PREF_PASSWORD = "password";
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_login);
+        t = (TextView) findViewById(R.id.login);
+        SharedPreferences pref = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);//recupero le ultime credenziali valide inserite
+        String username = pref.getString(PREF_USERNAME, null);
+        String password = pref.getString(PREF_PASSWORD, null);
+        String logout=null;
+        Bundle dati=getIntent().getExtras();
+        if(dati!=null)//controllo se la mainActivity è stata chiamata dopo un logout
+            logout=dati.getString("logout");
+        if(logout!=null)
+        {
+            username=null;
+            password=null;
+        }
+
+        if (username == null && password == null) {//viene effettuato solo se ci sono delle credenziali memorizzate e se mainActivity non è stata chiamata da un logout
+            Button b = (Button) findViewById(R.id.logout);
+            b.setOnClickListener(new View.OnClickListener() {//routin di gestione del login
+                @Override
+                public void onClick(View v) {
+                    try {
+                        EditText txt = (EditText) findViewById(R.id.userId);//recupero username inserito
+                        EditText txt2 = (EditText) findViewById(R.id.oldPass);//recupero la password inserita
+                        String testo = txt.getText().toString();
+                        String testo2 = txt2.getText().toString();
+                        if(testo.contains("/") || testo2.contains("/"))//controllo che non siano inseriti valori vietati
+                            Toast.makeText(getApplicationContext(),"il carattere '/' non è consentito", Toast.LENGTH_SHORT).show();
+                        else if(testo.isEmpty() || testo2.isEmpty())//controllo che tutti i campi siano completati
+                            Toast.makeText(getApplicationContext(),"riempi i campi", Toast.LENGTH_SHORT).show();
+                        else {//login effettuato con successo
+                            String request = serverComunication.connessioneMain("1/" + testo + "/" + testo2);//richiedo il login al server
+                            if (!request.contains("error")) {
+                                getSharedPreferences(PREFS_NAME, MODE_PRIVATE)//salvo username e password per i prossimi accessi
+                                        .edit()
+                                        .putString(PREF_USERNAME, testo)
+                                        .putString(PREF_PASSWORD, testo2)
+                                        .commit();
+                                Intent i = new Intent(getApplicationContext(), aggiornamento.class);
+                                i.putExtra("user", testo);
+                                i.putExtra("pass", testo2);
+                                i.putExtra("sessionKey", request);
+                                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                                getApplicationContext().startActivity(i);//avvio la "aggiornamento.class"
+                            }
+                            else
+                                Toast.makeText(getApplicationContext(),"credenziali errate", Toast.LENGTH_SHORT).show();
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            });
+            Button b2 = (Button) findViewById(R.id.button2);
+            b2.setOnClickListener(new View.OnClickListener() {//routine di gestione della registrazione
+                @Override
+                public void onClick(View v) {
+
+                    EditText txt = (EditText) findViewById(R.id.userId);
+                    EditText txt2 = (EditText) findViewById(R.id.oldPass);
+                    String testo = txt.getText().toString();
+                    String testo2 = txt2.getText().toString();
+                    if(testo.isEmpty() || testo2.isEmpty())
+                        Toast.makeText(getApplicationContext(),"riempi i campi", Toast.LENGTH_SHORT).show();
+                    else {
+                        try {
+                            serverComunication connect = new serverComunication();
+                            String request = connect.connessioneMain("0/" + testo + "/" + testo2);
+                            Toast.makeText(getApplicationContext(), request, Toast.LENGTH_SHORT).show();
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            });
+        } else {
+            Intent i = new Intent(getApplicationContext(), aggiornamento.class);
+            i.putExtra("user", username);
+            i.putExtra("pass", password);
+            i.putExtra("sessionKey", "000000000");
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            getApplicationContext().startActivity(i);
+        }
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.login_set, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+        if(id==R.id.recupera)//routine di gestione di recupero password
+        {
+            EditText txt = (EditText) findViewById(R.id.userId);
+            String testo = txt.getText().toString();
+            if(testo.isEmpty())
+                Toast.makeText(getApplicationContext(),"inserisci l'indirizzo email", Toast.LENGTH_SHORT).show();
+            else {
+                try {
+                    serverComunication connect = new serverComunication();
+                    String request = connect.connessioneMain("2/" + testo);
+                    Toast.makeText(getApplicationContext(), request, Toast.LENGTH_SHORT).show();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        if(id==R.id.reimposta)
+        {
+            Intent i = new Intent(getApplicationContext(), recuperaPass.class);
+            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            getApplicationContext().startActivity(i);
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/operandClick.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/operandClick.java
new file mode 100644 (file)
index 0000000..d5f26e3
--- /dev/null
@@ -0,0 +1,32 @@
+package com.example.furt.myapplication;
+
+import android.view.View;
+
+public class operandClick implements View.OnClickListener
+{
+    Node L;
+    operandClick(Node n)
+    {
+        L=n;
+    }
+    public void onClick(View view)
+    {
+        if (DrawActivity.selectedNode.Children.size()!=0) //not a leaf: can't add children
+            return;
+        if (L==null) //incompatible elimination
+            return;
+        for (Node n:L.Children) {
+            for (Hypothesis hp:n.NodeHP)
+                hp.fromNode= DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
+            n.addHPList(DrawActivity.selectedNode.NodeHP);
+            DrawActivity.selectedNode.addChild(n);
+        }
+        DrawActivity.selectedNode.hasFocus=false;
+        DrawActivity.selectedNode.Children.get(0).hasFocus=true;
+        DrawActivity.selectedNode.hasFocus=false;
+        DrawActivity.selectedNode.ruleName=L.ruleName;
+        DrawActivity.nmoves++;
+        DrawActivity.rootNode.Clean();
+        DrawActivity.startDraw();
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/parser.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/parser.java
new file mode 100644 (file)
index 0000000..0722a30
--- /dev/null
@@ -0,0 +1,246 @@
+package com.example.furt.myapplication;
+
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathFactory;
+
+public class parser {
+    parser(){}
+
+    protected static Node root(String esercizio)
+    {
+        Node returnNode=null;
+        try {
+            String cartellaEs=global.esDir;
+            FileInputStream file = new FileInputStream(new File(cartellaEs+esercizio));
+            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = builderFactory.newDocumentBuilder();
+            Document xmlDocument = builder.parse(file);
+            returnNode=new Node(createFormula(xmlDocument,"/esercizio/tesi/formula[1]"));
+            returnNode.addHPList(ipotesi(xmlDocument));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return returnNode;
+    }
+
+    static public ArrayList<String> getLiteral(String esercizio)
+    {
+        String cartellaEs=global.esDir;
+        ArrayList<String> listValue=new ArrayList<String>();
+        ArrayList<String> returnValue=new ArrayList<String>();
+        try {
+            FileInputStream file = new FileInputStream(new File(cartellaEs + esercizio));
+            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = builderFactory.newDocumentBuilder();
+            Document xmlDocument = builder.parse(file);
+            listValue.add("Ț");
+            listValue.add("⊥");
+            listValue.addAll(getLiteralAtFormula(xmlDocument, "/esercizio/tesi/formula[1]"));
+            listValue.addAll(getLiteralAtHypotesis(xmlDocument));
+            for(String elem : listValue)
+            {
+                if(!returnValue.isEmpty())
+                {
+                    if(!returnValue.contains(elem))
+                        returnValue.add(elem);
+                }
+                else
+                    returnValue.add(elem);
+            }
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            e.printStackTrace();
+        } catch (SAXException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return returnValue;
+    }
+
+    static public ArrayList<String> getLiteralAtFormula(Document xmlDocument, String position)
+    {
+        ArrayList<String> returnList=new ArrayList<String>();
+        try {
+            XPath xPath = XPathFactory.newInstance().newXPath();
+            if(Integer.parseInt(xPath.compile("count(" + position + ")").evaluate(xmlDocument))==1) {
+                String type = xPath.compile(position + "/@type").evaluate(xmlDocument);
+                int numbOfElements = 5;
+                if (type.contentEquals("and") || type.contentEquals("or") || type.contentEquals("impl"))
+                    numbOfElements = 2;
+                else if (type.contentEquals("not"))
+                    numbOfElements = 1;
+                else if (type.contentEquals("literal") || type.contentEquals("atomic"))
+                    numbOfElements = 0;
+                int count = Integer.parseInt(xPath.compile("count(" + position + "/formula)").evaluate(xmlDocument));
+                if (count == numbOfElements) {
+                    if (numbOfElements == 2) {
+                        returnList.addAll(getLiteralAtFormula(xmlDocument, position + "/formula[1]"));
+                        returnList.addAll(getLiteralAtFormula(xmlDocument, position + "/formula[2]"));
+
+                        return returnList;
+                    } else if (numbOfElements == 1) {
+                        return getLiteralAtFormula(xmlDocument, position + "/formula[1]");
+                    } else if (numbOfElements == 0) {
+                        String child = xPath.compile(position).evaluate(xmlDocument);
+                        if (child == null || child.isEmpty())
+                            return null;
+                        else if (child.contentEquals("top")) {
+                            returnList.add("Ț");
+                            return returnList;
+                        }
+                        else if (child.contentEquals("bot")){
+                            returnList.add("⊥");
+                            return returnList;
+                        }
+                        else{
+                            returnList.add(String.valueOf(child.charAt(0)));
+                            return returnList;
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    static public Formula createFormula(Document xmlDocument, String position) {
+        try {
+            XPath xPath = XPathFactory.newInstance().newXPath();
+            if(Integer.parseInt(xPath.compile("count(" + position + ")").evaluate(xmlDocument))==1) {
+                String type = xPath.compile(position + "/@type").evaluate(xmlDocument);
+                int numbOfElements = 5;
+                if (type.contentEquals("and") || type.contentEquals("or") || type.contentEquals("impl"))
+                    numbOfElements = 2;
+                else if (type.contentEquals("not"))
+                    numbOfElements = 1;
+                else if (type.contentEquals("literal") || type.contentEquals("atomic"))
+                    numbOfElements = 0;
+                int count = Integer.parseInt(xPath.compile("count(" + position + "/formula)").evaluate(xmlDocument));
+                if (count == numbOfElements) {
+                    if (numbOfElements == 2) {
+                        Formula firstChild = createFormula(xmlDocument, position + "/formula[1]");
+                        Formula secondChild = createFormula(xmlDocument, position + "/formula[2]");
+                        if (firstChild == null || secondChild == null)
+                            return null;
+                        else if (type.contentEquals("and"))
+                            return new FormulaAnd(createFormula(xmlDocument, position + "/formula[1]"), createFormula(xmlDocument, position + "/formula[2]"));
+                        else if (type.contentEquals("or"))
+                            return new FormulaOr(createFormula(xmlDocument, position + "/formula[1]"), createFormula(xmlDocument, position + "/formula[2]"));
+                        else if (type.contentEquals("impl"))
+                            return new FormulaImpl(createFormula(xmlDocument, position + "/formula[1]"), createFormula(xmlDocument, position + "/formula[2]"));
+                    } else if (numbOfElements == 1) {
+                        Formula child = createFormula(xmlDocument, position + "/formula[1]");
+                        if (child == null)
+                            return null;
+                        return new FormulaNot(createFormula(xmlDocument, position + "/formula[1]"));
+                    } else if (numbOfElements == 0) {
+                        String child = xPath.compile(position).evaluate(xmlDocument);
+                        if (child == null || child.isEmpty())
+                            return null;
+                        else if (child.length()>=3 && child.substring(0,3).equals("top"))
+                            return new FormulaTOP();
+                        else if (child.length()>=3 && child.substring(0,3).equals("bot"))
+                            return new FormulaBOT();
+                        else
+                            return new Literal(child.charAt(0));
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    static public List<Hypothesis> ipotesi(Document xmlDocument)
+    {
+        List<Hypothesis> returnValue=new ArrayList<Hypothesis>();
+        XPath xPath = XPathFactory.newInstance().newXPath();
+        try
+        {
+            int count = Integer.parseInt(xPath.compile("count(/esercizio/ipotesi/formula)").evaluate(xmlDocument));
+            for(int i=1;i<=count;i++)
+            {
+                Formula F=createFormula(xmlDocument,"/esercizio/ipotesi/formula["+i+"]");
+                Hypothesis valore;
+                if(F==null)
+                    valore=null;
+                else
+                    valore=new Hypothesis(F,false);
+                if(valore!=null)
+                    returnValue.add(valore);
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
+        return returnValue;
+    }
+
+    static public ArrayList<String> getLiteralAtHypotesis(Document xmlDocument)
+    {
+        ArrayList<String> returnValue=new ArrayList<String>();
+        XPath xPath = XPathFactory.newInstance().newXPath();
+        try
+        {
+            int count = Integer.parseInt(xPath.compile("count(/esercizio/ipotesi/formula)").evaluate(xmlDocument));
+            for(int i=1;i<=count;i++)
+                returnValue.addAll(getLiteralAtFormula(xmlDocument, "/esercizio/ipotesi/formula[" + i + "]"));
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
+        return returnValue;
+    }
+
+    static public ArrayList<String> getParameters(String esercizio)
+    {
+        ArrayList<String> value=new ArrayList<String>();
+        try {
+            String cartellaEs=global.esDir;
+            FileInputStream file = new FileInputStream(new File(cartellaEs+esercizio));
+            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = builderFactory.newDocumentBuilder();
+            Document xmlDocument = builder.parse(file);
+            return parameters(xmlDocument);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return value;
+    }
+
+    static private ArrayList<String> parameters(Document xmlDocument)
+    {
+        ArrayList<String> returnValue= new ArrayList<String>();
+        XPath xPath = XPathFactory.newInstance().newXPath();
+        try
+        {
+             if(        Integer.parseInt(xPath.compile("count(/esercizio/valutazione/click)").evaluate(xmlDocument))==1 &&
+                        Integer.parseInt(xPath.compile("count(/esercizio/valutazione/tempo)").evaluate(xmlDocument))==1 &&
+                        Integer.parseInt(xPath.compile("count(/esercizio/valutazione/altezza)").evaluate(xmlDocument))==1)
+                {
+                    returnValue.add(xPath.compile("/esercizio/valutazione/click").evaluate(xmlDocument));
+                    returnValue.add(xPath.compile("/esercizio/valutazione/tempo").evaluate(xmlDocument));
+                    returnValue.add(xPath.compile("/esercizio/valutazione/altezza").evaluate(xmlDocument));
+                }
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
+        return returnValue;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/parserDialog.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/parserDialog.java
new file mode 100644 (file)
index 0000000..ccc18cc
--- /dev/null
@@ -0,0 +1,159 @@
+package com.example.furt.myapplication;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class parserDialog extends DialogFragment {
+    static Formula F=null; //formula che sto costruendo
+    static RelativeLayout formulaLayout;
+    static TextView FView; //View contenente la formula che sto visualizzando
+    static boolean reload=false;
+    static ArrayList<String> esliter=new ArrayList<String>();
+    static ArrayList<Formula> undo=new ArrayList<Formula>();
+    public parserDialog()
+    {
+        esliter.removeAll(esliter);
+        if(!reload)
+            undo.removeAll(undo);
+        reload=false;
+        if(F==null) {
+            F = new UndefinedFormula();
+            F.setCursor();
+        }
+        esliter.addAll(parser.getLiteral(DrawActivity.nomeEs));
+    }
+    @Override
+    public Dialog onCreateDialog(final Bundle savedInstanceState) {
+        // Use the Builder class for convenient dialog construction
+        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        LayoutInflater inflater=getActivity().getLayoutInflater();
+        View view=inflater.inflate(R.layout.string_layout, null);
+        RelativeLayout litersLayout=(RelativeLayout)((ViewGroup)((ViewGroup)view).getChildAt(0)).getChildAt(0);
+        RelativeLayout operatorsLayout=(RelativeLayout)(((ViewGroup)view).getChildAt(1));
+        formulaLayout=(RelativeLayout)((ViewGroup)((ViewGroup)view).getChildAt(2)).getChildAt(0);
+        FView=new TextView(formulaLayout.getContext());
+        FView.setText(F.toString());
+        FView.setTextSize(DrawActivity.textSize);
+        formulaLayout.addView(FView);
+        int leftId=0;
+        if(!esliter.isEmpty()) {
+            for (String liter : esliter) {
+                Button lit = new Button(litersLayout.getContext());
+                RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+                lit.setText(liter);
+                if (leftId != 0) {
+                    lp.addRule(RelativeLayout.RIGHT_OF, leftId);
+                }
+                lit.setLayoutParams(lp);
+                lit.setId(DrawActivity.globalId++);
+                leftId = lit.getId();
+                litersLayout.addView(lit);
+                lit.setOnClickListener(new touchParserHandler(4, liter.charAt(0)));
+            }
+        }
+        Button bImpl=new Button(operatorsLayout.getContext());
+        Button bAnd=new Button(operatorsLayout.getContext());
+        Button bOr=new Button(operatorsLayout.getContext());
+        Button bNot=new Button(operatorsLayout.getContext());
+        RelativeLayout.LayoutParams lpImpl=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        RelativeLayout.LayoutParams lpAnd=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        RelativeLayout.LayoutParams lpNot=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        RelativeLayout.LayoutParams lpOr=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+
+        bImpl.setText("⇒");
+        bImpl.setLayoutParams(lpImpl);
+        bImpl.setId(DrawActivity.globalId++);
+        leftId=bImpl.getId();
+
+        bOr.setText("∨");
+        lpOr.addRule(RelativeLayout.RIGHT_OF, leftId);
+        bOr.setLayoutParams(lpOr);
+        bOr.setId(DrawActivity.globalId++);
+        leftId=bOr.getId();
+
+        bAnd.setText("∧");
+        lpAnd.addRule(RelativeLayout.RIGHT_OF, leftId);
+        bAnd.setLayoutParams(lpAnd);
+        bAnd.setId(DrawActivity.globalId++);
+        leftId=bAnd.getId();
+
+        bNot.setText("¬");
+        lpNot.addRule(RelativeLayout.RIGHT_OF, leftId);
+        bNot.setLayoutParams(lpNot);
+        bNot.setId(DrawActivity.globalId++);
+
+        operatorsLayout.addView(bImpl);
+        operatorsLayout.addView(bAnd);
+        operatorsLayout.addView(bNot);
+        operatorsLayout.addView(bOr);
+        bImpl.setOnClickListener(new touchParserHandler(2,' '));
+        bAnd.setOnClickListener(new touchParserHandler(0,' '));
+        bNot.setOnClickListener(new touchParserHandler(3, ' '));
+        bOr.setOnClickListener(new touchParserHandler(1, ' '));
+        builder.setView(view);
+        builder.setTitle("Inserisci una formula").setPositiveButton("Ok", new DialogInterface.OnClickListener() {
+            public void onClick(DialogInterface dialog, int id) {
+                if(!F.toString().contains("_")) {
+                    List<EliminationRule> L = F.EliminationRules();
+                    if (L.size()==0){
+                        F=null;
+                        Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare questa ipotesi ora",Toast.LENGTH_LONG).show();
+                        return;
+                    }
+                    if (F.toString().equals(DrawActivity.selectedNode.F.toString())) //sto provando a scaricare il nodo selezionato
+                    {
+                        Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare un nodo aperto senza dimostrarlo",Toast.LENGTH_LONG).show();
+                        F=null;
+                        return;
+                    }
+                    touchHPHandler t = new touchHPHandler(L.get(0).createNodes(null, new askFormula()),new Hypothesis(F,true));
+                    F = null;
+                    t.discard=false;
+                    t.onClick(null);
+                }
+                else{
+                    Toast.makeText(DrawActivity.rootNode.view.getContext(),"Completa l'inserimento!",Toast.LENGTH_SHORT).show();
+                    reboot();
+                }
+            }
+        });
+        builder.setNeutralButton("Undo", new DialogInterface.OnClickListener() {
+            public void onClick(DialogInterface dialog, int id) {
+                if(undo.size()>1) {
+                    F = undo.remove(undo.size() - 1);
+                }
+                else
+                    F=null;
+                reboot();
+            }
+        });
+        builder.setNegativeButton("Annulla", new DialogInterface.OnClickListener() {
+            public void onClick(DialogInterface dialog, int id) {
+                F=null;
+            }
+        });
+        // Create the AlertDialog object and return it
+        return builder.create();
+    }
+    static void reboot()
+    {
+        reload=true;
+        parserDialog p=new parserDialog();
+        p.F=F;
+        p.show(DrawActivity.fragmentManager, "CIAO");
+    }
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/personalDBHelper.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/personalDBHelper.java
new file mode 100644 (file)
index 0000000..2af2653
--- /dev/null
@@ -0,0 +1,189 @@
+package com.example.furt.myapplication;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.util.Log;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.example.furt.myapplication.personalTrackerContract.DATABASE_NAME;
+import static com.example.furt.myapplication.personalTrackerContract.DATABASE_VERSION;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_CHECK;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_CLICK;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_ESERCIZIO;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_MD5;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_TIME;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_UTENTE;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.SQL_CREATE_ENTRIES;
+import static com.example.furt.myapplication.personalTrackerContract.esercizi.TABLE_NAME;
+
+
+
+public class personalDBHelper extends SQLiteOpenHelper{
+    public personalDBHelper(Context context) {
+        super(context, DATABASE_NAME, null, DATABASE_VERSION);
+    }
+
+    public void onCreate(SQLiteDatabase db) {
+
+        db.execSQL(SQL_CREATE_ENTRIES);
+        Log.e("dphelper", SQL_CREATE_ENTRIES);
+    }
+
+    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+        // This database is only a cache for online data, so its upgrade policy is
+        // to simply to discard the data and start over
+        db.execSQL(SQL_CREATE_ENTRIES);
+        onCreate(db);
+    }
+
+    public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+        onUpgrade(db, oldVersion, newVersion);
+    }
+
+    public void add(String utente, String esercizio, String md5, Double time, int ckick, int check)
+    {
+        SQLiteDatabase db=this.getWritableDatabase();
+        ContentValues values=new ContentValues();
+        values.put(COLUMN_MD5,md5);
+        if(time==0)
+            values.put(COLUMN_TIME,(double)time());
+        else
+            values.put(COLUMN_TIME,(time));
+        values.put(COLUMN_CHECK,check);
+        values.put(COLUMN_UTENTE,utente);
+        values.put(COLUMN_ESERCIZIO,esercizio);
+        values.put(COLUMN_CLICK, ckick);
+        db.insert(TABLE_NAME, null, values);
+        db.close();
+    }
+
+    public void remove(String user, double time)
+    {
+        SQLiteDatabase db = this.getWritableDatabase();
+        String request=COLUMN_MD5 + "=? AND " + COLUMN_TIME + "=? AND " + COLUMN_UTENTE + "=?";
+        String[] condition=new String[]{
+                String.valueOf(time),
+                String.valueOf(user)
+        };
+        db.delete(TABLE_NAME,request,condition);
+        db.close();
+    }
+
+    public static Long time()
+    {
+        java.util.Date date= new java.util.Date();
+        Timestamp now=new Timestamp(date.getTime());
+        return now.getTime();
+    }
+
+    public void removeAll(){
+        SQLiteDatabase db=this.getWritableDatabase();
+        String request="TRUNCATE "+TABLE_NAME;
+    }
+
+    public List<listElem> getElem(String user)
+    {
+        List<listElem> elem=null;
+        SQLiteDatabase db=this.getReadableDatabase();
+        String[] tableColums={
+            esercizi.COLUMN_MD5,
+            esercizi.COLUMN_TIME,
+            esercizi.COLUMN_CLICK,
+            esercizi.COLUMN_ESERCIZIO
+        };
+        String whereClause= COLUMN_UTENTE +"=? AND " + COLUMN_CHECK +"=?";
+        String[] whereArgs=new String[]{
+                String.valueOf(user),
+                String.valueOf("0")
+        };
+        Cursor cursor=db.query(TABLE_NAME,tableColums,whereClause,whereArgs,null,null,null);
+        if(cursor.moveToFirst()) {
+            elem = new ArrayList<listElem>();
+            listElem el=new listElem();
+            do {
+                el.setMd5 (cursor.getString(0));
+                el.setTime(cursor.getDouble(1));
+                el.setClick(cursor.getInt(2));
+                el.setEsercizio(cursor.getString(3));
+                elem.add(el);
+            }while(cursor.moveToNext());
+        }
+        return elem;
+    }
+
+    public List<listElem> getElemForName(String user, String esName)
+    {
+        List<listElem> elem=null;
+        SQLiteDatabase db=this.getReadableDatabase();
+        String[] tableColums={
+                esercizi.COLUMN_MD5,
+                esercizi.COLUMN_TIME,
+                esercizi.COLUMN_CLICK,
+                esercizi.COLUMN_CHECK
+        };
+        String whereClause= COLUMN_UTENTE +"=? AND " + COLUMN_ESERCIZIO +"=? ORDER BY "+COLUMN_CLICK;
+        String[] whereArgs=new String[]{
+                String.valueOf(user),
+                String.valueOf(esName)
+        };
+        Cursor cursor=db.query(TABLE_NAME,tableColums,whereClause,whereArgs,null,null,null);
+        if(cursor.moveToFirst()) {
+            elem = new ArrayList<listElem>();
+            listElem el=new listElem();
+            do {
+                el.setMd5 (cursor.getString(0));
+                el.setTime(cursor.getDouble(1));
+                el.setClick(cursor.getInt(2));
+                el.setCheck(cursor.getInt(3));
+                elem.add(el);
+            }while(cursor.moveToNext());
+        }
+        return elem;
+    }
+
+    public List<listElem> getAllElem(String user)
+    {
+        List<listElem> elem=null;
+        SQLiteDatabase db=this.getReadableDatabase();
+        String[] tableColums={
+                esercizi.COLUMN_MD5,
+                esercizi.COLUMN_TIME,
+                esercizi.COLUMN_CLICK,
+                esercizi.COLUMN_ESERCIZIO,
+                esercizi.COLUMN_CHECK
+        };
+        String whereClause= COLUMN_UTENTE +"=?";
+        String[] whereArgs=new String[]{
+                String.valueOf(user)
+        };
+        Cursor cursor=db.query(TABLE_NAME,tableColums,whereClause,whereArgs,null,null,null);
+        if(cursor.moveToFirst()) {
+            elem = new ArrayList<listElem>();
+            listElem el=new listElem();
+            do {
+                el.setMd5 (cursor.getString(0));
+                el.setTime(cursor.getDouble(1));
+                el.setClick(cursor.getInt(2));
+                el.setEsercizio(cursor.getString(3));
+                el.setCheck(cursor.getInt(4));
+                elem.add(el);
+            }while(cursor.moveToNext());
+        }
+        return elem;
+    }
+
+    public void updateElem(String md5, String user, double time)
+    {
+        SQLiteDatabase db=this.getWritableDatabase();
+        String request="UPDATE "+TABLE_NAME+" set "+COLUMN_CHECK+"=1 WHERE "+COLUMN_UTENTE+"='"+user+"' AND "+COLUMN_MD5+"='"+md5+"' AND "+COLUMN_TIME+"="+time;
+        db.execSQL(request);
+    }
+
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/personalTrackerContract.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/personalTrackerContract.java
new file mode 100644 (file)
index 0000000..2b2d87e
--- /dev/null
@@ -0,0 +1,46 @@
+package com.example.furt.myapplication;
+
+import android.provider.BaseColumns;
+
+
+public final class personalTrackerContract {
+    // To prevent someone from accidentally instantiating the contract class,
+    // give it an empty constructor.
+    public personalTrackerContract() {
+    }
+
+    public static final int DATABASE_VERSION = 1;
+    public static final String DATABASE_NAME = "exercise.db";
+
+    private static final String TEXT_TYPE = " TEXT";
+    private static final String VALUE_TYPE=" DECIMAL";
+    private static final String COMMA_SEP = ",";
+    private static final String INT_TYPE = " INTEGER";
+    private static final String DOUBLE_TYPE=" DOUBLE";
+
+    /* Inner class that defines the table contents */
+    public static abstract class esercizi implements BaseColumns {
+
+        public static final String TABLE_NAME = " esercizi ";
+        public static final String COLUMN_ESERCIZIO = " esercizio ";
+        public static final String COLUMN_MD5 = " md5 ";
+        public static final String COLUMN_UTENTE = " utente ";
+        public static final String COLUMN_TIME = " time ";
+        public static final String COLUMN_CHECK = " checks ";
+        public static final String COLUMN_CLICK = " click ";
+
+        public static final String SQL_CREATE_ENTRIES =
+                "CREATE TABLE " + TABLE_NAME + " (" +
+                        COLUMN_UTENTE + TEXT_TYPE + COMMA_SEP +
+                        COLUMN_MD5 + TEXT_TYPE + COMMA_SEP +
+                        COLUMN_TIME + DOUBLE_TYPE + COMMA_SEP +
+                        COLUMN_CLICK + INT_TYPE + COMMA_SEP +
+                        COLUMN_ESERCIZIO + TEXT_TYPE + COMMA_SEP +
+                        COLUMN_CHECK + INT_TYPE +
+                        " )";
+
+        public static final String SQL_DELETE_ENTRIES =
+                "DROP TABLE IF EXISTS " + TABLE_NAME;
+
+    }
+}
\ No newline at end of file
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/recuperaPass.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/recuperaPass.java
new file mode 100644 (file)
index 0000000..0dfe425
--- /dev/null
@@ -0,0 +1,61 @@
+package com.example.furt.myapplication;
+
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+public class recuperaPass extends Activity{
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.reimpostapass);
+        Button invia=(Button) findViewById(R.id.invia);
+        invia.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                EditText ut=(EditText) findViewById(R.id.userId);
+                EditText oP=(EditText) findViewById(R.id.oldPass);
+                EditText nP=(EditText) findViewById(R.id.newPass);
+                String utente=ut.getText().toString();
+                String oldPass=oP.getText().toString();
+                String newPass=nP.getText().toString();
+                if(utente==null || oldPass==null || newPass==null)
+                    Toast.makeText(getApplicationContext(), "devi riempire tutti i campi", Toast.LENGTH_SHORT).show();
+                else if(!utente.contains("@studio.unibo.it"))
+                    Toast.makeText(getApplicationContext(), "email non valida", Toast.LENGTH_SHORT).show();
+                else if(newPass.contains("/"))
+                    Toast.makeText(getApplicationContext(), "la password non deve contenere /", Toast.LENGTH_SHORT).show();
+                else
+                {
+                    String request = serverComunication.connessioneMain("a0/" + utente + "/" + oldPass + "/" + newPass );
+                    if(!request.contains("error"))
+                    {
+                        Toast.makeText(getApplicationContext(), "password cambiata", Toast.LENGTH_SHORT).show();
+                        Intent i = new Intent(getApplicationContext(), mainActivity.class);
+                        i.putExtra("logout", "si");
+                        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                        getApplicationContext().startActivity(i);
+                    }
+                    else
+                        Toast.makeText(getApplicationContext(), "errore", Toast.LENGTH_SHORT).show();
+                }
+            }
+        });
+        Button annulla=(Button) findViewById(R.id.annulla);
+        annulla.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent i = new Intent(getApplicationContext(), mainActivity.class);
+                i.putExtra("logout", "si");
+                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                getApplicationContext().startActivity(i);
+            }
+        });
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/serverComunication.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/serverComunication.java
new file mode 100644 (file)
index 0000000..a82ea27
--- /dev/null
@@ -0,0 +1,177 @@
+package com.example.furt.myapplication;
+
+
+import android.content.res.Resources;
+import android.os.AsyncTask;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.net.Socket;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.concurrent.ExecutionException;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManagerFactory;
+
+public class serverComunication
+{
+
+    serverComunication(){}
+
+    public static String connessione(String parametri)
+    {
+        try {
+            return new richiestaServer().execute(parametri).get();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        } catch (ExecutionException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    static String connessioneMain(String parametri)
+    {
+        try {
+            return new richiestaServerMain().execute(parametri).get();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        } catch (ExecutionException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    static class richiestaServer extends AsyncTask<String, String, String> {
+        @Override
+        protected String doInBackground(String... params)
+        {
+            Resources risorse= aggiornamento.t.getResources();
+            try {
+// (could be from a resource or ByteArrayInputStream or ...)
+                CertificateFactory cf = CertificateFactory.getInstance("X.509");
+// From https://www.washington.edu/itconnect/security/ca/load-der.crt
+                InputStream caInput = risorse.openRawResource(R.raw.halloween);
+                Certificate ca;
+                try {
+                    ca = cf.generateCertificate(caInput);
+                    System.out.println("ca=" + ((X509Certificate) ca).getSubjectDN());
+                } finally {
+                    caInput.close();
+                }
+
+// Create a KeyStore containing our trusted CAs
+                String keyStoreType = KeyStore.getDefaultType();
+                KeyStore keyStore = KeyStore.getInstance(keyStoreType);
+                keyStore.load(null, null);
+                keyStore.setCertificateEntry("ca", ca);
+
+// Create a TrustManager that trusts the CAs in our KeyStore
+                String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
+                TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
+                tmf.init(keyStore);
+
+// Create an SSLContext that uses our TrustManager
+                SSLContext context = SSLContext.getInstance("TLS");
+                context.init(null, tmf.getTrustManagers(), null);
+
+                Socket socket;
+                SSLSocketFactory sf=context.getSocketFactory();
+                socket=sf.createSocket(global.hostName,global.port);
+                OutputStream os = socket.getOutputStream();
+                OutputStreamWriter osw = new OutputStreamWriter(os);
+                BufferedWriter bw = new BufferedWriter(osw);
+                bw.write(params[0]+"\n");
+                bw.flush();
+                BufferedReader r = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+                String returnValue=r.readLine();
+                socket.close();
+                return returnValue;
+            } catch (KeyStoreException g) {
+                g.printStackTrace();
+            } catch (CertificateException a) {
+                a.printStackTrace();
+            } catch (NoSuchAlgorithmException b) {
+                b.printStackTrace();
+            } catch (IOException c) {
+                c.printStackTrace();
+            } catch (KeyManagementException f) {
+                f.printStackTrace();
+            }
+            return "error";
+        }
+    }
+
+   public static class richiestaServerMain extends AsyncTask<String, String, String> {
+        @Override
+        protected String doInBackground(String... params)
+        {
+            Resources risorse= mainActivity.t.getResources();
+            try {
+// (could be from a resource or ByteArrayInputStream or ...)
+                CertificateFactory cf = CertificateFactory.getInstance("X.509");
+// From https://www.washington.edu/itconnect/security/ca/load-der.crt
+                InputStream caInput = risorse.openRawResource(R.raw.halloween);
+                Certificate ca;
+                try {
+                    ca = cf.generateCertificate(caInput);
+                    System.out.println("ca=" + ((X509Certificate) ca).getSubjectDN());
+                } finally {
+                    caInput.close();
+                }
+
+// Create a KeyStore containing our trusted CAs
+                String keyStoreType = KeyStore.getDefaultType();
+                KeyStore keyStore = KeyStore.getInstance(keyStoreType);
+                keyStore.load(null, null);
+                keyStore.setCertificateEntry("ca", ca);
+
+// Create a TrustManager that trusts the CAs in our KeyStore
+                String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
+                TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
+                tmf.init(keyStore);
+
+// Create an SSLContext that uses our TrustManager
+                SSLContext context = SSLContext.getInstance("TLS");
+                context.init(null, tmf.getTrustManagers(), null);
+
+                Socket socket;
+                SSLSocketFactory sf=context.getSocketFactory();
+                socket=sf.createSocket(global.hostName,global.port);
+                OutputStream os = socket.getOutputStream();
+                OutputStreamWriter osw = new OutputStreamWriter(os);
+                BufferedWriter bw = new BufferedWriter(osw);
+                bw.write(params[0]+"\n");
+                bw.flush();
+                BufferedReader r = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+                String returnValue=r.readLine();
+                socket.close();
+                return returnValue;
+            } catch (KeyStoreException g) {
+                g.printStackTrace();
+            } catch (CertificateException a) {
+                a.printStackTrace();
+            } catch (NoSuchAlgorithmException b) {
+                b.printStackTrace();
+            } catch (IOException c) {
+                c.printStackTrace();
+            } catch (KeyManagementException f) {
+                f.printStackTrace();
+            }
+            return "error";
+        }
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/suString.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/suString.java
new file mode 100644 (file)
index 0000000..2d5fe33
--- /dev/null
@@ -0,0 +1,100 @@
+package com.example.furt.myapplication;
+
+import java.util.ArrayList;
+
+class suString
+{
+       suString()
+       {};
+       
+       public static ArrayList<String> stringToArrayList(String string)
+       {
+               ArrayList<String> returnValue=new ArrayList<String>();
+               int j=0;
+               for(int i=0;i<string.length();i++)
+               {
+                       if(string.charAt(i)=='/')
+                       {
+                                       returnValue.add(string.substring(j,i));
+                                       j=i+1;
+                       }
+                       else if(i==string.length()-1)
+                               returnValue.add(string.substring(j));
+               }
+               return returnValue;
+       }
+       
+       public static ArrayList<String> vectorStringToArrayList(String[] vectorString)
+       {
+               ArrayList<String> returnValue=new ArrayList<String>();
+               for(String name : vectorString)
+                       returnValue.add(name);
+               return returnValue;
+       }
+       
+       public static String arrayListToString (ArrayList<String> arraylist)
+       {
+               String returnValue=new String();
+               for(int i=0;i<arraylist.size();i++)
+               {
+                       if(i<arraylist.size()-1)
+                               returnValue=returnValue+arraylist.get(i)+"/";
+                       else
+                               returnValue=returnValue+arraylist.get(i);
+               }
+               return returnValue;
+       }
+       
+       public static String vectorStringToString(String[] vectorString)
+       {
+               return arrayListToString(vectorStringToArrayList(vectorString));
+       }
+       
+       public static String[] arrayListToVectorString (ArrayList<String> arraylist)
+       {
+               String[] returnValue=new String[arraylist.size()];
+               for(int i=0;i<arraylist.size();i++)
+                       returnValue[i]=arraylist.get(i);
+               return returnValue;
+       }
+       
+       public static String[] stringToVectorString(String string)
+       {
+               return arrayListToVectorString(stringToArrayList(string));
+       }
+
+    public static String multiToString(ArrayList<String> input)
+    {
+        String returnValue=null;
+        for(int i=0;i<input.size();i++)
+        {
+            if(i==0)
+                returnValue=input.get(i)+"//";
+            else if(i==input.size()-1)
+                returnValue=returnValue+input.get(i);
+            else
+                returnValue=returnValue+input.get(i)+"//";
+        }
+        return returnValue;
+    }
+
+    public static ArrayList<String> stringToMultiArray(String input)
+    {
+        ArrayList<String> result=new ArrayList<String>();
+        int j=0;
+        if(input==null)
+            return result;
+        for(int i=0;i<input.length();i++)
+        {
+            if(input.charAt(i)=='/') {
+                if (input.charAt(i + 1) == '/') {
+                    result.add(input.substring(j, i));
+                    j=i+2;
+                }
+            }
+        }
+        if(j<input.length())
+            result.add(input.substring(j,input.length()-1));
+        return result;
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/touchHPHandler.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/touchHPHandler.java
new file mode 100644 (file)
index 0000000..0e62a53
--- /dev/null
@@ -0,0 +1,70 @@
+package com.example.furt.myapplication;
+
+import android.view.View;
+import android.widget.Toast;
+
+public class touchHPHandler implements View.OnClickListener
+{
+    Node L; //nodo contenente il sottoalbero successivo all'eliminazione dell'ipotesi
+    boolean discard;
+    Hypothesis thisHP; //ipotesi che sto eliminando
+    touchHPHandler(Node n,Hypothesis hp)
+    {
+        L=n;
+        thisHP=hp;
+        discard=true;//di default il ramo della formula scartata viene chiuso
+    }
+    public void onClick(View view)
+    {
+        if (DrawActivity.selectedNode==null) //selectedNode non esiste (non dovrebbe mai succedere)
+            return;
+        if (DrawActivity.selectedNode.Children.size()!=0) //non è una foglia: non si possono applicare regole.
+        {
+            Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare ipotesi su nodi intermedi",Toast.LENGTH_LONG).show();
+            return;
+        }
+        if (thisHP.HP.toString().equals(DrawActivity.selectedNode.F.toString())) //sto scaricando una formula uguale al nodo corrente: lo chiudo aggiornando lo stato del nodo
+        {
+            if (thisHP.isDeleted) {
+                if (DrawActivity.selectedNode.status == Node.OPEN)
+                    DrawActivity.selectedNode.status = Node.CANCELED;
+                else if (DrawActivity.selectedNode.status == Node.FAKE)
+                    DrawActivity.selectedNode.status = Node.FAKE_CANCELED;
+            } else {
+                if (DrawActivity.selectedNode.status == Node.OPEN)
+                    DrawActivity.selectedNode.status = Node.CLOSED;
+                else if (DrawActivity.selectedNode.status == Node.FAKE)
+                    DrawActivity.selectedNode.status = Node.FAKE_CLOSED;
+            }
+            DrawActivity.nmoves++;
+            DrawActivity.rootNode.Clean();
+            DrawActivity.startDraw();
+            return;
+        }
+        if (L==null) //eliminazione incompatibile con il nodo attuale
+        {
+            Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare questa ipotesi ora",Toast.LENGTH_LONG).show();
+            return;
+        }
+        for (Node n:L.Children) { //aggiungo al sottoalbero della regola da applicare tutte le ipotesi del selectedNode. In più aggiungo alle ipotesi introdotte da questa regola il fromNode corretto.
+            for (Hypothesis hp:n.NodeHP)
+                hp.fromNode= DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
+            n.addHPList(DrawActivity.selectedNode.NodeHP);
+            DrawActivity.selectedNode.addChild(n);
+        }
+        DrawActivity.selectedNode.hasFocus=false; //il nodo su cui ho applicato la regola non è più una foglia e non ha più focus
+        DrawActivity.selectedNode.ruleName = L.ruleName;
+        DrawActivity.selectedNode.Children.get(0).hasFocus=true; //il primo figlio dell'applicazione della regola ha di default il focus
+        if(discard) { //sto scaricando un'ipotesi: il primo figlio è automaticamente chiuso
+            if (thisHP.isDeleted)
+                DrawActivity.selectedNode.Children.get(0).status = Node.CANCELED;
+            else
+                DrawActivity.selectedNode.Children.get(0).status = Node.CLOSED;
+        }
+        else
+            DrawActivity.selectedNode.Children.get(0).status= Node.OPEN;
+        DrawActivity.nmoves++;
+        DrawActivity.rootNode.Clean();
+        DrawActivity.startDraw();
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/touchParserHandler.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/touchParserHandler.java
new file mode 100644 (file)
index 0000000..655901f
--- /dev/null
@@ -0,0 +1,102 @@
+package com.example.furt.myapplication;
+
+import android.view.View;
+import android.widget.TextView;
+import android.widget.Toast;
+
+public class touchParserHandler implements View.OnClickListener
+{
+    int type; //0=and 1=or 2=impl 3=not 4=literal
+    char l; //for literals
+    touchParserHandler(int t,char l)
+    {
+        type=t;
+        this.l=l;
+    }
+    public void onClick(View view)
+    {
+        if(!parserDialog.F.toString().contains("_"))
+        {
+            Toast.makeText(DrawActivity.rootNode.view.getContext(),"Formula completa! Premere \"Undo\" per modificare", Toast.LENGTH_SHORT).show();
+            return;
+        }
+        parserDialog.undo.add(parserDialog.F.duplicate());
+        parserDialog.formulaLayout.removeAllViews();
+        if(type==0)
+        {
+            UndefinedFormula newCursor=new UndefinedFormula();
+            newCursor.currentF=true;
+            Formula newF=new FormulaAnd(newCursor,new UndefinedFormula());
+            if ((parserDialog.F).toString().equals("_"))
+            {
+                parserDialog.F=newF;
+            }
+            else {
+                parserDialog.F.Fill(newF);
+                parserDialog.F.setCursor();
+            }
+        }
+        else if(type==1)
+        {
+            UndefinedFormula newCursor=new UndefinedFormula();
+            newCursor.currentF=true;
+            Formula newF=new FormulaOr(newCursor,new UndefinedFormula());
+            if ((parserDialog.F).toString().equals("_"))
+            {
+                parserDialog.F=newF;
+            }
+            else
+                parserDialog.F.Fill(newF);
+        }
+        else if(type==2)
+        {
+            UndefinedFormula newCursor=new UndefinedFormula();
+            newCursor.currentF=true;
+            Formula newF=new FormulaImpl(newCursor,new UndefinedFormula());
+            if ((parserDialog.F).toString().equals("_"))
+            {
+                parserDialog.F=newF;
+            }
+            else {
+                parserDialog.F.Fill(newF);
+                parserDialog.F.setCursor();
+            }
+        }
+        else if(type==3)
+        {
+            UndefinedFormula newCursor=new UndefinedFormula();
+            newCursor.currentF=true;
+            Formula newF=new FormulaNot(newCursor);
+            if ((parserDialog.F).toString().equals("_"))
+            {
+                parserDialog.F=newF;
+            }
+            else {
+                parserDialog.F.Fill(newF);
+                parserDialog.F.setCursor();
+            }
+        }
+        else if(type==4)
+        {
+            Formula newF;
+            if(l=='⊥')
+                newF=new FormulaBOT();
+            else if(l=='T')
+                newF=new FormulaTOP();
+            else
+                newF=new Literal(l);
+            if ((parserDialog.F).toString().equals("_"))
+            {
+                parserDialog.F=newF;
+            }
+            else {
+                parserDialog.F.Fill(newF);
+                parserDialog.F.setCursor();
+            }
+        }
+        TextView FView=new TextView(parserDialog.formulaLayout.getContext());
+        FView.setText(parserDialog.F.toString());
+        FView.setTextSize(DrawActivity.textSize);
+        parserDialog.formulaLayout.addView(FView);
+    }
+}
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/touchnodeHandler.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/touchnodeHandler.java
new file mode 100644 (file)
index 0000000..237a7cd
--- /dev/null
@@ -0,0 +1,148 @@
+package com.example.furt.myapplication;
+
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.util.TypedValue;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class touchnodeHandler implements View.OnClickListener {
+    static RuleDialog ruleDialog; //il ruleDialog da far comparire nel caso in cui l'utente voglia visualizzare le regole di introduzione disponibili
+    Node n; //nodo a cui è legato questo handler
+    touchnodeHandler(Node node) {
+        n=node; ruleDialog=null;
+    }
+    @Override
+    public void onClick(View view) {
+        Paint p=new Paint();
+        n.hasFocus=true; //il nodo cliccato ha il focus
+        TextView v=(TextView)view;
+        v.setTextColor(Color.RED); //colorazione rossa per il nodo
+        if (DrawActivity.selectedNode!=null)
+            if (DrawActivity.selectedNode.view==view) { //doppio clic sul nodo: parte il Dialog per le regole di introduzione
+                if (DrawActivity.selectedNode.Children.size()==0){
+                    List<IntroductionRule> L=new ArrayList<IntroductionRule>();
+                    for (IntroductionRule r: DrawActivity.selectedNode.F.introductionRules())
+                    {
+                        if (r.getPriority()!=0) //short click: aggiungo solo le regole a priorità alta
+                            L.add(r);
+                    }
+                    if (L.size()==1) //c'è una sola regola: la applico immediatamente.
+                    {
+                        Node selectedRule=L.get(0).createNodes(new askFormula());
+                        for (Node n : selectedRule.Children) {
+                            for (Hypothesis hp : n.NodeHP)
+                                hp.fromNode = DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
+                            n.addHPList(DrawActivity.selectedNode.NodeHP);
+                            n.handler = null;
+                            DrawActivity.selectedNode.addChild(n);
+                        }
+                        DrawActivity.selectedNode.hasFocus = false;
+                        DrawActivity.selectedNode.ruleName = selectedRule.Children.get(0).ruleName;
+                        DrawActivity.selectedNode.Children.get(0).hasFocus = true;
+                        DrawActivity.nmoves++;
+                        DrawActivity.rootNode.Clean();
+                        DrawActivity.startDraw();
+                        return;
+                    }
+                    else {
+                        //parte il ruleDialog
+                        ruleDialog = new RuleDialog(DrawActivity.selectedNode.F.introductionRules());
+                        ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
+                    }
+                }
+                else //nodo intermedio: parte il Dialog per le operazioni di copia/cancella
+                {
+                    CopyPasteDialog copyPasteDialog=new CopyPasteDialog(DrawActivity.selectedNode);
+                    copyPasteDialog.show(DrawActivity.fragmentManager,"");
+                }
+                return;
+            }
+        int i,size;
+        if (DrawActivity.selectedNode!=null) { //c'era già un selectedNode: lo ricoloro adeguatamente.
+            if(DrawActivity.selectedNode.status==Node.OPEN || DrawActivity.selectedNode.status==Node.FAKE)
+                DrawActivity.selectedNode.view.setTextColor(Color.BLACK);
+            else
+                DrawActivity.selectedNode.view.setTextColor(Color.GRAY);
+        }
+        DrawActivity.selectedNode = n;
+        DrawActivity.globalHP.removeAllViews(); //rimuovo le eventuali vecchie ipotesi per mostrare quelle del nuovo selectedNode
+        size = n.NodeHP.size(); //numero di ipotesi
+        int leftID=0; //ID dell'eventuale ipotesi a destra della quale dev'essere posizionata l'ipotesi (0=assente)
+        int headID=0; //ID dell'eventuale ipotesi sotto la quale deve comparire l'ipotesi (0=assente)
+        float sum=0; //lunghezza raggiunta finora: se supera la larghezza dello schermo devo andare a capo
+        for (i = 0; i<size; i++) //fa apparire le ipotesi cancellate
+        {
+            final TextView newT=new TextView(view.getContext());
+            RelativeLayout.LayoutParams myP=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            newT.setText(n.NodeHP.get(i).HP.toString());
+            newT.setTextSize(20);
+            newT.setId(DrawActivity.globalId++);
+            if (i==0) //prima ipotesi: sarà il leftID per le successive
+                leftID=newT.getId();
+            myP.setMargins(50,0,0,0);
+            float thisSize;
+            p.setTextSize(20);
+            thisSize=p.measureText(newT.getText().toString()); //misuro la larghezza dell'ipotesi inserita
+            thisSize+=thisSize*0.2; //con un'approssimazione per eccesso del 20%
+            sum+=thisSize; //aggiungo alla somma totale la larghezza di questa ipotesi e della spaziatura
+            sum+=100;
+            if (sum>(DrawActivity.v.widthPixels+20)) //ho superato la larghezza dello schermo: devo andare a capo
+            {
+                sum=thisSize; //il nuovo nodo è il primo della nuova riga
+                headID=leftID; //tutti gli altri devono stare sotto un nodo della riga precedente
+            }
+            else
+                myP.addRule(RelativeLayout.RIGHT_OF,leftID); //non vado a capo: mi limito a posizionarmi a destra del leftID
+            if (headID!=0)
+                myP.addRule(RelativeLayout.BELOW,headID); //mi posiziono sotto l'headID se esiste
+            newT.setLayoutParams(myP);
+            List<EliminationRule> R=n.NodeHP.get(i).HP.EliminationRules();
+            if (R.size()!=0) { //ci sono regole di eliminazione per questa formula
+                Node L= R.get(0).createNodes(null,new askFormula());
+                newT.setOnClickListener(new touchHPHandler(L,n.NodeHP.get(i)));
+            }
+            else //setto comunuqe il listener nel caso in cui la formula venga scaricata
+                newT.setOnClickListener(new touchHPHandler(null,n.NodeHP.get(i)));
+            newT.setOnLongClickListener(new LongHPClick(n.NodeHP.get(i).fromNode)); //setto un longclick listener che mostra il nodo da cui viene l'ipotesi
+            leftID=newT.getId(); //aggiorno il leftID
+            DrawActivity.globalHP.addView(newT);
+        }
+        //disegno il bottone utilizzando lo stesso algoritmo utilizzato per le ipotesi
+
+        final Button elim=new Button(view.getContext());
+        RelativeLayout.LayoutParams myP=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        elim.setText("Nuova...");
+        elim.setTextSize(TypedValue.COMPLEX_UNIT_SP,16);
+        elim.setId(DrawActivity.globalId++);
+        myP.setMargins(50,0,0,0);
+        p.setTextSize(16);
+        float buttonSize=p.measureText("Nuova...");
+        sum+=buttonSize;
+        if (sum>(DrawActivity.v.widthPixels/1.5)) //ho superato la larghezza dello schermo: devo andare a capo
+        {
+            headID=leftID;
+        }
+        else
+            myP.addRule(RelativeLayout.RIGHT_OF,leftID);
+        if (headID!=0)
+            myP.addRule(RelativeLayout.BELOW, headID);
+        elim.setLayoutParams(myP);
+        elim.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                parserDialog p=new parserDialog();
+                p.show(DrawActivity.fragmentManager, ""); //parte l'editor per inserire nuove formule
+            }
+        });
+        DrawActivity.globalHP.addView(elim);
+    }
+}
+
+
diff --git a/mainActivity/app/src/main/java/com/example/furt/myapplication/valutazione.java b/mainActivity/app/src/main/java/com/example/furt/myapplication/valutazione.java
new file mode 100644 (file)
index 0000000..86aa5fd
--- /dev/null
@@ -0,0 +1,28 @@
+package com.example.furt.myapplication;
+
+
+import java.util.ArrayList;
+
+public class valutazione {
+    valutazione(){}
+
+    public static int voto (String esercizio, int click, int tempo, int altezza, int errori)
+    {
+        int value=0;
+        ArrayList<String> parametri= parser.getParameters(esercizio);
+        int minClick, minTempo, minAltezza;
+        if(parametri!=null && !parametri.isEmpty())
+        {
+            minClick=Integer.valueOf(parametri.get(0));
+            minTempo=Integer.valueOf(parametri.get(1));
+            minAltezza=Integer.valueOf(parametri.get(2));
+            // minClick : click = x : 14
+            // minTempo : tempo = x : 8
+            // minAltezza : altezza= x : 8
+            value=((minClick*14)/click)+((minTempo*8)/tempo)+((minAltezza*8)/altezza)-errori;
+            if (value>30)
+                value=30;
+        }
+        return value;
+    }
+}
diff --git a/mainActivity/app/src/main/res/._drawable-hdpi b/mainActivity/app/src/main/res/._drawable-hdpi
new file mode 100644 (file)
index 0000000..2f4e437
Binary files /dev/null and b/mainActivity/app/src/main/res/._drawable-hdpi differ
diff --git a/mainActivity/app/src/main/res/._drawable-mdpi b/mainActivity/app/src/main/res/._drawable-mdpi
new file mode 100644 (file)
index 0000000..2f4e437
Binary files /dev/null and b/mainActivity/app/src/main/res/._drawable-mdpi differ
diff --git a/mainActivity/app/src/main/res/._drawable-xxhdpi b/mainActivity/app/src/main/res/._drawable-xxhdpi
new file mode 100644 (file)
index 0000000..2f4e437
Binary files /dev/null and b/mainActivity/app/src/main/res/._drawable-xxhdpi differ
diff --git a/mainActivity/app/src/main/res/._values b/mainActivity/app/src/main/res/._values
new file mode 100644 (file)
index 0000000..2f4e437
Binary files /dev/null and b/mainActivity/app/src/main/res/._values differ
diff --git a/mainActivity/app/src/main/res/drawable-hdpi/._ic_launcher.png b/mainActivity/app/src/main/res/drawable-hdpi/._ic_launcher.png
new file mode 100644 (file)
index 0000000..0dfce20
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-hdpi/._ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-hdpi/def.jpg b/mainActivity/app/src/main/res/drawable-hdpi/def.jpg
new file mode 100644 (file)
index 0000000..e81ddc1
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-hdpi/def.jpg differ
diff --git a/mainActivity/app/src/main/res/drawable-hdpi/ic_launcher.png b/mainActivity/app/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..96a442e
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-hdpi/ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-mdpi/._ic_launcher.png b/mainActivity/app/src/main/res/drawable-mdpi/._ic_launcher.png
new file mode 100644 (file)
index 0000000..0dfce20
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-mdpi/._ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-mdpi/def.jpg b/mainActivity/app/src/main/res/drawable-mdpi/def.jpg
new file mode 100644 (file)
index 0000000..39cdd6e
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-mdpi/def.jpg differ
diff --git a/mainActivity/app/src/main/res/drawable-mdpi/ic_launcher.png b/mainActivity/app/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..359047d
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-mdpi/ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-xhdpi/._ic_launcher.png b/mainActivity/app/src/main/res/drawable-xhdpi/._ic_launcher.png
new file mode 100644 (file)
index 0000000..0dfce20
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-xhdpi/._ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-xhdpi/def.jpg b/mainActivity/app/src/main/res/drawable-xhdpi/def.jpg
new file mode 100644 (file)
index 0000000..47e817d
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-xhdpi/def.jpg differ
diff --git a/mainActivity/app/src/main/res/drawable-xhdpi/ic_launcher.png b/mainActivity/app/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..71c6d76
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-xxhdpi/._ic_launcher.png b/mainActivity/app/src/main/res/drawable-xxhdpi/._ic_launcher.png
new file mode 100644 (file)
index 0000000..0dfce20
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-xxhdpi/._ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/drawable-xxhdpi/def.jpg b/mainActivity/app/src/main/res/drawable-xxhdpi/def.jpg
new file mode 100644 (file)
index 0000000..8d7903d
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-xxhdpi/def.jpg differ
diff --git a/mainActivity/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/mainActivity/app/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..4df1894
Binary files /dev/null and b/mainActivity/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/mainActivity/app/src/main/res/layout-land/download.xml b/mainActivity/app/src/main/res/layout-land/download.xml
new file mode 100644 (file)
index 0000000..73858f8
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:id="@+id/dlglobal">
+
+    <Button
+        style="?android:attr/buttonStyleSmall"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="aggiorna"
+        android:paddingRight="10dp"
+        android:layout_marginRight="10dp"
+        android:id="@+id/aggiorna" />
+
+    <Button
+        style="?android:attr/buttonStyleSmall"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="logout"
+        android:id="@+id/logout"
+        android:layout_alignParentTop="true"
+        android:layout_toRightOf="@+id/aggiorna"
+        android:layout_toEndOf="@+id/aggiorna" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/startEs"
+        android:text="Lista degli Esercizi:"
+        android:textSize="30sp"
+        android:layout_below="@+id/aggiorna"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/activity_login.xml b/mainActivity/app/src/main/res/layout/activity_login.xml
new file mode 100644 (file)
index 0000000..0a37209
--- /dev/null
@@ -0,0 +1,72 @@
+<RelativeLayout
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <ScrollView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/scrollView3">
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:paddingLeft="@dimen/activity_horizontal_margin"
+            android:paddingRight="@dimen/activity_horizontal_margin"
+            android:paddingTop="@dimen/activity_vertical_margin"
+            android:paddingBottom="@dimen/activity_vertical_margin"
+            tools:context=".activity_login">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Inserisci le tue credenziali:"
+                android:id="@+id/login"/>
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/invia"
+                android:id="@+id/logout"
+                android:layout_below="@+id/oldPass"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="61dp"
+                android:width="120dp" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textPassword"
+                android:ems="10"
+                android:id="@+id/oldPass"
+                android:hint="@string/pass"
+                android:layout_below="@+id/userId"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true"
+                android:layout_marginTop="29dp"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true" />
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textEmailAddress"
+                android:ems="10"
+                android:id="@+id/userId"
+                android:hint="nome.cognome@studio.unibo.it"
+                android:layout_alignParentTop="true"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_marginTop="31dp"
+                android:layout_alignRight="@+id/oldPass"
+                android:layout_alignEnd="@+id/oldPass"
+                android:autoText="false" />
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/registrati"
+                android:id="@+id/button2"
+                android:layout_below="@+id/logout"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="31dp"
+                android:width="120dp" />
+        </RelativeLayout>
+    </ScrollView>
+</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/activity_my.xml b/mainActivity/app/src/main/res/layout/activity_my.xml
new file mode 100644 (file)
index 0000000..8dd0ae8
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_width="match_parent"
+        android:background="@android:color/holo_blue_light"
+        android:id="@+id/hpscroll"
+        android:layout_height="wrap_content"
+        tools:context=".MyActivity">
+    </RelativeLayout>
+    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:id="@+id/vscroll"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_height="fill_parent"
+        android:fillViewport="false"
+        tools:context=".MainActivity">
+
+        <HorizontalScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:id="@+id/window"
+            android:fillViewport="true">
+            <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                xmlns:tools="http://schemas.android.com/tools"
+                android:layout_width="wrap_content"
+                android:layout_height="7000dp"
+                android:id="@+id/global"
+                tools:context=".MyActivity">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_centerHorizontal="true" />
+            </RelativeLayout>
+        </HorizontalScrollView>
+    </ScrollView>
+</LinearLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/aggiornamento.xml b/mainActivity/app/src/main/res/layout/aggiornamento.xml
new file mode 100644 (file)
index 0000000..9b55ff3
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:id="@+id/glob_agg">
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/aggiornamento"
+        android:textSize="20sp"
+        android:id="@+id/loading"
+        android:layout_gravity="center_horizontal"
+        android:layout_alignParentTop="true"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="192dp" />
+
+    <ProgressBar
+        style="?android:attr/progressBarStyleLarge"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/progressBar"
+        android:layout_marginTop="39dp"
+        android:layout_centerHorizontal="true" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/download.xml b/mainActivity/app/src/main/res/layout/download.xml
new file mode 100644 (file)
index 0000000..daa59fa
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <ListView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/listView"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/reimpostapass.xml b/mainActivity/app/src/main/res/layout/reimpostapass.xml
new file mode 100644 (file)
index 0000000..5a44271
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_height="fill_parent"
+        android:fillViewport="false"
+        tools:context=".recuperaPass">
+        <RelativeLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            xmlns:android="http://schemas.android.com/apk/res/android">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Inserisci le tue credenziali:"
+                android:id="@+id/passreim"
+                android:layout_alignParentTop="true"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:textSize="24dp" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textEmailAddress"
+                android:ems="10"
+                android:id="@+id/userId"
+                android:hint="nome.cognome@studio.unibo.it"
+                android:layout_below="@+id/passreim"
+                android:layout_marginTop="69dp"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textPassword"
+                android:ems="10"
+                android:id="@+id/oldPass"
+                android:hint="vecchia password"
+                android:layout_below="@+id/userId"
+                android:layout_marginTop="50dp"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true" />
+
+            <EditText
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:inputType="textPassword"
+                android:ems="10"
+                android:id="@+id/newPass"
+                android:layout_below="@+id/oldPass"
+                android:layout_marginTop="56dp"
+                android:hint="nuova password"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true" />
+
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Invia"
+                android:id="@+id/invia"
+                android:layout_marginTop="30dp"
+                android:width="120dp"
+                android:layout_below="@+id/newPass"
+                android:layout_centerHorizontal="true" />
+
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="annulla"
+                android:id="@+id/annulla"
+                android:layout_below="@+id/invia"
+                android:layout_alignLeft="@+id/invia"
+                android:layout_alignStart="@+id/invia"
+                android:layout_marginTop="30dp"
+                android:width="120dp" />
+        </RelativeLayout>
+    </ScrollView>
+</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/ruledialog.xml b/mainActivity/app/src/main/res/layout/ruledialog.xml
new file mode 100644 (file)
index 0000000..d2eaea9
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="fill_parent"
+    android:fillViewport="false"
+    tools:context=".MainActivity">
+
+    <HorizontalScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/window"
+        android:fillViewport="true">
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="wrap_content"
+            android:layout_height="1dp"
+            android:id="@+id/global"
+            tools:context=".MyActivity">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true" />
+        </RelativeLayout>
+    </HorizontalScrollView>
+
+</ScrollView>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/string_layout.xml b/mainActivity/app/src/main/res/layout/string_layout.xml
new file mode 100644 (file)
index 0000000..833a712
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <HorizontalScrollView
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:background="@android:color/holo_blue_light"
+        android:fillViewport="true">
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="wrap_content"
+            android:id="@+id/literals"
+            android:layout_height="match_parent">
+        </RelativeLayout>
+    </HorizontalScrollView>
+        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="match_parent"
+            android:background="@android:color/holo_orange_light"
+            android:id="@+id/operators"
+            android:layout_height="40dp"
+            tools:context=".MyActivity">
+        </RelativeLayout>
+
+        <HorizontalScrollView
+            android:layout_width="match_parent"
+            android:layout_height="100dp"
+            android:fillViewport="true">
+            <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                xmlns:tools="http://schemas.android.com/tools"
+                android:layout_width="wrap_content"
+                android:layout_height="100dp"
+                android:id="@+id/formulaLayout"
+                tools:context=".MyActivity">
+            </RelativeLayout>
+        </HorizontalScrollView>
+</LinearLayout>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/layout/textviewgeneral.xml b/mainActivity/app/src/main/res/layout/textviewgeneral.xml
new file mode 100644 (file)
index 0000000..818d2d7
--- /dev/null
@@ -0,0 +1,9 @@
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/rowTextView"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:padding="10dp"
+    android:textSize="20sp"
+    android:textColor="@android:color/black">
+</TextView>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/menu/._my.xml b/mainActivity/app/src/main/res/menu/._my.xml
new file mode 100644 (file)
index 0000000..5c1db22
Binary files /dev/null and b/mainActivity/app/src/main/res/menu/._my.xml differ
diff --git a/mainActivity/app/src/main/res/menu/login_set.xml b/mainActivity/app/src/main/res/menu/login_set.xml
new file mode 100644 (file)
index 0000000..2c4a06b
--- /dev/null
@@ -0,0 +1,12 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MyActivity" >
+    <item android:id="@+id/recupera"
+        android:title="@string/recuperapass"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+    <item android:id="@+id/reimposta"
+        android:title="@string/reimposta"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
diff --git a/mainActivity/app/src/main/res/menu/menu_dow.xml b/mainActivity/app/src/main/res/menu/menu_dow.xml
new file mode 100644 (file)
index 0000000..4a7a73e
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<menu
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MyActivity" >
+    <item android:id="@+id/aggiorna"
+    android:title="@string/sync"
+    android:orderInCategory="100"
+    android:showAsAction="never" />
+    <item android:id="@+id/esci"
+    android:title="@string/esci"
+    android:orderInCategory="100"
+    android:showAsAction="never" />
+</menu>
\ No newline at end of file
diff --git a/mainActivity/app/src/main/res/menu/my.xml b/mainActivity/app/src/main/res/menu/my.xml
new file mode 100644 (file)
index 0000000..74a83a1
--- /dev/null
@@ -0,0 +1,8 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MyActivity" >
+    <item android:id="@+id/abandon"
+        android:title="Abbandona esercizio"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
diff --git a/mainActivity/app/src/main/res/raw/._halloween.crt b/mainActivity/app/src/main/res/raw/._halloween.crt
new file mode 100644 (file)
index 0000000..0dfce20
Binary files /dev/null and b/mainActivity/app/src/main/res/raw/._halloween.crt differ
diff --git a/mainActivity/app/src/main/res/raw/._keystore.bks b/mainActivity/app/src/main/res/raw/._keystore.bks
new file mode 100644 (file)
index 0000000..0dfce20
Binary files /dev/null and b/mainActivity/app/src/main/res/raw/._keystore.bks differ
diff --git a/mainActivity/app/src/main/res/raw/halloween.crt b/mainActivity/app/src/main/res/raw/halloween.crt
new file mode 100644 (file)
index 0000000..e60e9db
Binary files /dev/null and b/mainActivity/app/src/main/res/raw/halloween.crt differ
diff --git a/mainActivity/app/src/main/res/raw/keystore.bks b/mainActivity/app/src/main/res/raw/keystore.bks
new file mode 100644 (file)
index 0000000..1d03af4
Binary files /dev/null and b/mainActivity/app/src/main/res/raw/keystore.bks differ
diff --git a/mainActivity/app/src/main/res/values-w820dp/._dimens.xml b/mainActivity/app/src/main/res/values-w820dp/._dimens.xml
new file mode 100644 (file)
index 0000000..5c1db22
Binary files /dev/null and b/mainActivity/app/src/main/res/values-w820dp/._dimens.xml differ
diff --git a/mainActivity/app/src/main/res/values-w820dp/dimens.xml b/mainActivity/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644 (file)
index 0000000..63fc816
--- /dev/null
@@ -0,0 +1,6 @@
+<resources>
+    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
+         (such as screen margins) for screens with more than 820dp of available width. This
+         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
+    <dimen name="activity_horizontal_margin">64dp</dimen>
+</resources>
diff --git a/mainActivity/app/src/main/res/values/._dimens.xml b/mainActivity/app/src/main/res/values/._dimens.xml
new file mode 100644 (file)
index 0000000..5c1db22
Binary files /dev/null and b/mainActivity/app/src/main/res/values/._dimens.xml differ
diff --git a/mainActivity/app/src/main/res/values/._strings.xml b/mainActivity/app/src/main/res/values/._strings.xml
new file mode 100644 (file)
index 0000000..5c1db22
Binary files /dev/null and b/mainActivity/app/src/main/res/values/._strings.xml differ
diff --git a/mainActivity/app/src/main/res/values/._styles.xml b/mainActivity/app/src/main/res/values/._styles.xml
new file mode 100644 (file)
index 0000000..5c1db22
Binary files /dev/null and b/mainActivity/app/src/main/res/values/._styles.xml differ
diff --git a/mainActivity/app/src/main/res/values/dimens.xml b/mainActivity/app/src/main/res/values/dimens.xml
new file mode 100644 (file)
index 0000000..47c8224
--- /dev/null
@@ -0,0 +1,5 @@
+<resources>
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/mainActivity/app/src/main/res/values/strings.xml b/mainActivity/app/src/main/res/values/strings.xml
new file mode 100644 (file)
index 0000000..c956b22
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="app_name">LogicPlayer</string>
+    <string name="hello_world">inserisci una stringa</string>
+    <string name="action_settings">Settings</string>
+    <string name="invia">accedi</string>
+    <string name="pass">password</string>
+    <string name="sync">Aggiorna</string>
+    <string name="esci">Esci</string>
+    <string name="user">Username</string>
+    <string name="listEs">Lista esercizi:</string>
+    <string name="registrati">registrati</string>
+    <string name="recuperapass">recupera password</string>
+    <string name="first">download disponibili:</string>
+    <string name="reimposta">Reimposta password</string>
+    <string name="listaEsercizi">Lista esercizi:</string>
+    <string name="Credenziali">Inserisci le tue credenziali:</string>
+    <string name="aggiornamento">sto aggiornando</string>
+
+</resources>
diff --git a/mainActivity/app/src/main/res/values/styles.xml b/mainActivity/app/src/main/res/values/styles.xml
new file mode 100644 (file)
index 0000000..ff6c9d2
--- /dev/null
@@ -0,0 +1,8 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+    </style>
+
+</resources>
diff --git a/mainActivity/bin/AndroidManifest.xml b/mainActivity/bin/AndroidManifest.xml
deleted file mode 100644 (file)
index b9b6088..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.furt.myapplication" >
-    <uses-sdk
-        android:minSdkVersion="16"
-        android:targetSdkVersion="19" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/def"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".mainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity
-            android:name=".DrawActivity"
-            android:label="@string/app_name"
-            android:configChanges="orientation|screenSize">
-
-        </activity>
-        <service
-            android:name=".MyService"
-            android:exported="false"/>
-        <activity
-            android:name=".download_page"
-            android:configChanges="orientation|screenSize">
-            android:label="@string/listEs" >
-        </activity>
-        <activity
-            android:name=".aggiornamento"
-            android:label="@string/app_name" >
-        </activity>
-        <activity
-            android:name=".recuperaPass"
-            android:label="@string/app_name" >
-        </activity>
-    </application>
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
-</manifest>
diff --git a/mainActivity/bin/classes.dex b/mainActivity/bin/classes.dex
deleted file mode 100644 (file)
index 2655b97..0000000
Binary files a/mainActivity/bin/classes.dex and /dev/null differ
diff --git a/mainActivity/bin/dexedLibs/android-support-v4-70fb0600066156aa2b6d08c87cc768e7.jar b/mainActivity/bin/dexedLibs/android-support-v4-70fb0600066156aa2b6d08c87cc768e7.jar
deleted file mode 100644 (file)
index 5c061d9..0000000
Binary files a/mainActivity/bin/dexedLibs/android-support-v4-70fb0600066156aa2b6d08c87cc768e7.jar and /dev/null differ
diff --git a/mainActivity/bin/mainActivity.apk b/mainActivity/bin/mainActivity.apk
deleted file mode 100644 (file)
index e59dcc2..0000000
Binary files a/mainActivity/bin/mainActivity.apk and /dev/null differ
diff --git a/mainActivity/bin/res/crunch/drawable-hdpi/ic_launcher.png b/mainActivity/bin/res/crunch/drawable-hdpi/ic_launcher.png
deleted file mode 100644 (file)
index bcfa058..0000000
Binary files a/mainActivity/bin/res/crunch/drawable-hdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/bin/res/crunch/drawable-mdpi/ic_launcher.png b/mainActivity/bin/res/crunch/drawable-mdpi/ic_launcher.png
deleted file mode 100644 (file)
index 85848ff..0000000
Binary files a/mainActivity/bin/res/crunch/drawable-mdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/bin/res/crunch/drawable-xhdpi/ic_launcher.png b/mainActivity/bin/res/crunch/drawable-xhdpi/ic_launcher.png
deleted file mode 100644 (file)
index 916901e..0000000
Binary files a/mainActivity/bin/res/crunch/drawable-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/bin/res/crunch/drawable-xxhdpi/ic_launcher.png b/mainActivity/bin/res/crunch/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644 (file)
index b36186f..0000000
Binary files a/mainActivity/bin/res/crunch/drawable-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/bin/resources.ap_ b/mainActivity/bin/resources.ap_
deleted file mode 100644 (file)
index cb80daa..0000000
Binary files a/mainActivity/bin/resources.ap_ and /dev/null differ
diff --git a/mainActivity/build.gradle b/mainActivity/build.gradle
new file mode 100644 (file)
index 0000000..6a5c233
--- /dev/null
@@ -0,0 +1,15 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+    repositories {
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:1.3.0'
+    }
+}
+
+allprojects {
+    repositories {
+        jcenter()
+    }
+}
diff --git a/mainActivity/build/intermediates/dex-cache/cache.xml b/mainActivity/build/intermediates/dex-cache/cache.xml
new file mode 100644 (file)
index 0000000..57714f4
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<items version="2" >
+
+    <item
+        jar="/home/claudio/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar"
+        jumboMode="false"
+        revision="23.0.1"
+        sha1="85f201b380937e61a9dce6ca90ccf6872abbfb67">
+        <dex dex="/home/claudio/tesi_applet/logicplayer/mainActivity/app/build/intermediates/pre-dexed/debug/support-v4-19.1.0-8faefc2ba4cd5a2975855f5f7f9dd384b0788ebc.jar" />
+    </item>
+
+</items>
diff --git a/mainActivity/gradle/wrapper/gradle-wrapper.jar b/mainActivity/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..8c0fb64
Binary files /dev/null and b/mainActivity/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/mainActivity/gradle/wrapper/gradle-wrapper.properties b/mainActivity/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..0c71e76
--- /dev/null
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/mainActivity/gradlew b/mainActivity/gradlew
new file mode 100755 (executable)
index 0000000..91a7e26
--- /dev/null
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/mainActivity/gradlew.bat b/mainActivity/gradlew.bat
new file mode 100644 (file)
index 0000000..aec9973
--- /dev/null
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off\r
+@rem ##########################################################################\r
+@rem\r
+@rem  Gradle startup script for Windows\r
+@rem\r
+@rem ##########################################################################\r
+\r
+@rem Set local scope for the variables with windows NT shell\r
+if "%OS%"=="Windows_NT" setlocal\r
+\r
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r
+set DEFAULT_JVM_OPTS=\r
+\r
+set DIRNAME=%~dp0\r
+if "%DIRNAME%" == "" set DIRNAME=.\r
+set APP_BASE_NAME=%~n0\r
+set APP_HOME=%DIRNAME%\r
+\r
+@rem Find java.exe\r
+if defined JAVA_HOME goto findJavaFromJavaHome\r
+\r
+set JAVA_EXE=java.exe\r
+%JAVA_EXE% -version >NUL 2>&1\r
+if "%ERRORLEVEL%" == "0" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:findJavaFromJavaHome\r
+set JAVA_HOME=%JAVA_HOME:"=%\r
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe\r
+\r
+if exist "%JAVA_EXE%" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:init\r
+@rem Get command-line arguments, handling Windowz variants\r
+\r
+if not "%OS%" == "Windows_NT" goto win9xME_args\r
+if "%@eval[2+2]" == "4" goto 4NT_args\r
+\r
+:win9xME_args\r
+@rem Slurp the command line arguments.\r
+set CMD_LINE_ARGS=\r
+set _SKIP=2\r
+\r
+:win9xME_args_slurp\r
+if "x%~1" == "x" goto execute\r
+\r
+set CMD_LINE_ARGS=%*\r
+goto execute\r
+\r
+:4NT_args\r
+@rem Get arguments from the 4NT Shell from JP Software\r
+set CMD_LINE_ARGS=%$\r
+\r
+:execute\r
+@rem Setup the command line\r
+\r
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar\r
+\r
+@rem Execute Gradle\r
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r
+\r
+:end\r
+@rem End local scope for the variables with windows NT shell\r
+if "%ERRORLEVEL%"=="0" goto mainEnd\r
+\r
+:fail\r
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r
+rem the _cmd.exe /c_ return code!\r
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1\r
+exit /b 1\r
+\r
+:mainEnd\r
+if "%OS%"=="Windows_NT" endlocal\r
+\r
+:omega\r
diff --git a/mainActivity/import-summary.txt b/mainActivity/import-summary.txt
new file mode 100644 (file)
index 0000000..d01748c
--- /dev/null
@@ -0,0 +1,48 @@
+ECLIPSE ANDROID PROJECT IMPORT SUMMARY
+======================================
+
+Ignored Files:
+--------------
+The following files were *not* copied into the new Gradle project; you
+should evaluate whether these are still needed in your project and if
+so manually move them:
+
+* ._AndroidManifest.xml
+
+Replaced Jars with Dependencies:
+--------------------------------
+The importer recognized the following .jar files as third party
+libraries and replaced them with Gradle dependencies instead. This has
+the advantage that more explicit version information is known, and the
+libraries can be updated automatically. However, it is possible that
+the .jar file in your project was of an older version than the
+dependency we picked, which could render the project not compileable.
+You can disable the jar replacement in the import wizard and try again:
+
+android-support-v4.jar => com.android.support:support-v4:19.1.0
+
+Moved Files:
+------------
+Android Gradle projects use a different directory structure than ADT
+Eclipse projects. Here's how the projects were restructured:
+
+* AndroidManifest.xml => app/src/main/AndroidManifest.xml
+* assets/ => app/src/main/assets
+* lint.xml => app/lint.xml
+* res/ => app/src/main/res/
+* src/ => app/src/main/java/
+
+Next Steps:
+-----------
+You can now build the project. The Gradle project needs network
+connectivity to download dependencies.
+
+Bugs:
+-----
+If for some reason your project does not build, and you determine that
+it is due to a bug or limitation of the Eclipse to Gradle importer,
+please file a bug at http://b.android.com with category
+Component-Tools.
+
+(This import summary is for your information only, and can be deleted
+after import once you are satisfied with the results.)
diff --git a/mainActivity/libs/android-support-v4.jar b/mainActivity/libs/android-support-v4.jar
deleted file mode 100644 (file)
index a7e9919..0000000
Binary files a/mainActivity/libs/android-support-v4.jar and /dev/null differ
diff --git a/mainActivity/lint.xml b/mainActivity/lint.xml
deleted file mode 100644 (file)
index ee0eead..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<lint>
-</lint>
\ No newline at end of file
diff --git a/mainActivity/local.properties b/mainActivity/local.properties
new file mode 100644 (file)
index 0000000..c5e87e8
--- /dev/null
@@ -0,0 +1,11 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Mon Oct 19 16:57:08 CEST 2015
+sdk.dir=/home/claudio/Android/Sdk
diff --git a/mainActivity/mainActivity.iml b/mainActivity/mainActivity.iml
new file mode 100644 (file)
index 0000000..094bb60
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="mainActivity" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="java-gradle" name="Java-Gradle">
+      <configuration>
+        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
+        <option name="BUILDABLE" value="false" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
+    </content>
+    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/mainActivity/project.properties b/mainActivity/project.properties
deleted file mode 100644 (file)
index 4ab1256..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-19
diff --git a/mainActivity/res/._drawable-hdpi b/mainActivity/res/._drawable-hdpi
deleted file mode 100755 (executable)
index 2f4e437..0000000
Binary files a/mainActivity/res/._drawable-hdpi and /dev/null differ
diff --git a/mainActivity/res/._drawable-mdpi b/mainActivity/res/._drawable-mdpi
deleted file mode 100755 (executable)
index 2f4e437..0000000
Binary files a/mainActivity/res/._drawable-mdpi and /dev/null differ
diff --git a/mainActivity/res/._drawable-xxhdpi b/mainActivity/res/._drawable-xxhdpi
deleted file mode 100755 (executable)
index 2f4e437..0000000
Binary files a/mainActivity/res/._drawable-xxhdpi and /dev/null differ
diff --git a/mainActivity/res/._values b/mainActivity/res/._values
deleted file mode 100755 (executable)
index 2f4e437..0000000
Binary files a/mainActivity/res/._values and /dev/null differ
diff --git a/mainActivity/res/drawable-hdpi/._ic_launcher.png b/mainActivity/res/drawable-hdpi/._ic_launcher.png
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/drawable-hdpi/._ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-hdpi/def.jpg b/mainActivity/res/drawable-hdpi/def.jpg
deleted file mode 100644 (file)
index e81ddc1..0000000
Binary files a/mainActivity/res/drawable-hdpi/def.jpg and /dev/null differ
diff --git a/mainActivity/res/drawable-hdpi/ic_launcher.png b/mainActivity/res/drawable-hdpi/ic_launcher.png
deleted file mode 100755 (executable)
index 96a442e..0000000
Binary files a/mainActivity/res/drawable-hdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-mdpi/._ic_launcher.png b/mainActivity/res/drawable-mdpi/._ic_launcher.png
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/drawable-mdpi/._ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-mdpi/def.jpg b/mainActivity/res/drawable-mdpi/def.jpg
deleted file mode 100644 (file)
index 39cdd6e..0000000
Binary files a/mainActivity/res/drawable-mdpi/def.jpg and /dev/null differ
diff --git a/mainActivity/res/drawable-mdpi/ic_launcher.png b/mainActivity/res/drawable-mdpi/ic_launcher.png
deleted file mode 100755 (executable)
index 359047d..0000000
Binary files a/mainActivity/res/drawable-mdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-xhdpi/._ic_launcher.png b/mainActivity/res/drawable-xhdpi/._ic_launcher.png
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/drawable-xhdpi/._ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-xhdpi/def.jpg b/mainActivity/res/drawable-xhdpi/def.jpg
deleted file mode 100644 (file)
index 47e817d..0000000
Binary files a/mainActivity/res/drawable-xhdpi/def.jpg and /dev/null differ
diff --git a/mainActivity/res/drawable-xhdpi/ic_launcher.png b/mainActivity/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100755 (executable)
index 71c6d76..0000000
Binary files a/mainActivity/res/drawable-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-xxhdpi/._ic_launcher.png b/mainActivity/res/drawable-xxhdpi/._ic_launcher.png
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/drawable-xxhdpi/._ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/drawable-xxhdpi/def.jpg b/mainActivity/res/drawable-xxhdpi/def.jpg
deleted file mode 100644 (file)
index 8d7903d..0000000
Binary files a/mainActivity/res/drawable-xxhdpi/def.jpg and /dev/null differ
diff --git a/mainActivity/res/drawable-xxhdpi/ic_launcher.png b/mainActivity/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100755 (executable)
index 4df1894..0000000
Binary files a/mainActivity/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/mainActivity/res/layout-land/download.xml b/mainActivity/res/layout-land/download.xml
deleted file mode 100755 (executable)
index 73858f8..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:id="@+id/dlglobal">
-
-    <Button
-        style="?android:attr/buttonStyleSmall"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="aggiorna"
-        android:paddingRight="10dp"
-        android:layout_marginRight="10dp"
-        android:id="@+id/aggiorna" />
-
-    <Button
-        style="?android:attr/buttonStyleSmall"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="logout"
-        android:id="@+id/logout"
-        android:layout_alignParentTop="true"
-        android:layout_toRightOf="@+id/aggiorna"
-        android:layout_toEndOf="@+id/aggiorna" />
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/startEs"
-        android:text="Lista degli Esercizi:"
-        android:textSize="30sp"
-        android:layout_below="@+id/aggiorna"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true" />
-
-</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/activity_login.xml b/mainActivity/res/layout/activity_login.xml
deleted file mode 100755 (executable)
index 0a37209..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<RelativeLayout
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    xmlns:android="http://schemas.android.com/apk/res/android">
-    <ScrollView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/scrollView3">
-        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-            xmlns:tools="http://schemas.android.com/tools"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:paddingLeft="@dimen/activity_horizontal_margin"
-            android:paddingRight="@dimen/activity_horizontal_margin"
-            android:paddingTop="@dimen/activity_vertical_margin"
-            android:paddingBottom="@dimen/activity_vertical_margin"
-            tools:context=".activity_login">
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="Inserisci le tue credenziali:"
-                android:id="@+id/login"/>
-            <Button
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/invia"
-                android:id="@+id/logout"
-                android:layout_below="@+id/oldPass"
-                android:layout_centerHorizontal="true"
-                android:layout_marginTop="61dp"
-                android:width="120dp" />
-
-            <EditText
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:inputType="textPassword"
-                android:ems="10"
-                android:id="@+id/oldPass"
-                android:hint="@string/pass"
-                android:layout_below="@+id/userId"
-                android:layout_alignParentRight="true"
-                android:layout_alignParentEnd="true"
-                android:layout_marginTop="29dp"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true" />
-            <EditText
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:inputType="textEmailAddress"
-                android:ems="10"
-                android:id="@+id/userId"
-                android:hint="nome.cognome@studio.unibo.it"
-                android:layout_alignParentTop="true"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true"
-                android:layout_marginTop="31dp"
-                android:layout_alignRight="@+id/oldPass"
-                android:layout_alignEnd="@+id/oldPass"
-                android:autoText="false" />
-            <Button
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/registrati"
-                android:id="@+id/button2"
-                android:layout_below="@+id/logout"
-                android:layout_centerHorizontal="true"
-                android:layout_marginTop="31dp"
-                android:width="120dp" />
-        </RelativeLayout>
-    </ScrollView>
-</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/activity_my.xml b/mainActivity/res/layout/activity_my.xml
deleted file mode 100755 (executable)
index 8dd0ae8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:layout_width="match_parent"
-        android:background="@android:color/holo_blue_light"
-        android:id="@+id/hpscroll"
-        android:layout_height="wrap_content"
-        tools:context=".MyActivity">
-    </RelativeLayout>
-    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:id="@+id/vscroll"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:layout_height="fill_parent"
-        android:fillViewport="false"
-        tools:context=".MainActivity">
-
-        <HorizontalScrollView
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:id="@+id/window"
-            android:fillViewport="true">
-            <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                xmlns:tools="http://schemas.android.com/tools"
-                android:layout_width="wrap_content"
-                android:layout_height="7000dp"
-                android:id="@+id/global"
-                tools:context=".MyActivity">
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerHorizontal="true" />
-            </RelativeLayout>
-        </HorizontalScrollView>
-    </ScrollView>
-</LinearLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/aggiornamento.xml b/mainActivity/res/layout/aggiornamento.xml
deleted file mode 100755 (executable)
index 9b55ff3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:id="@+id/glob_agg">
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/aggiornamento"
-        android:textSize="20sp"
-        android:id="@+id/loading"
-        android:layout_gravity="center_horizontal"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="192dp" />
-
-    <ProgressBar
-        style="?android:attr/progressBarStyleLarge"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/progressBar"
-        android:layout_marginTop="39dp"
-        android:layout_centerHorizontal="true" />
-
-</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/download.xml b/mainActivity/res/layout/download.xml
deleted file mode 100755 (executable)
index daa59fa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <ListView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/listView"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true" />
-
-</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/reimpostapass.xml b/mainActivity/res/layout/reimpostapass.xml
deleted file mode 100644 (file)
index 5a44271..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<RelativeLayout
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    xmlns:android="http://schemas.android.com/apk/res/android">
-    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:layout_height="fill_parent"
-        android:fillViewport="false"
-        tools:context=".recuperaPass">
-        <RelativeLayout
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            xmlns:android="http://schemas.android.com/apk/res/android">
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="Inserisci le tue credenziali:"
-                android:id="@+id/passreim"
-                android:layout_alignParentTop="true"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true"
-                android:textSize="24dp" />
-
-            <EditText
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:inputType="textEmailAddress"
-                android:ems="10"
-                android:id="@+id/userId"
-                android:hint="nome.cognome@studio.unibo.it"
-                android:layout_below="@+id/passreim"
-                android:layout_marginTop="69dp"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true"
-                android:layout_alignParentRight="true"
-                android:layout_alignParentEnd="true" />
-
-            <EditText
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:inputType="textPassword"
-                android:ems="10"
-                android:id="@+id/oldPass"
-                android:hint="vecchia password"
-                android:layout_below="@+id/userId"
-                android:layout_marginTop="50dp"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true"
-                android:layout_alignParentRight="true"
-                android:layout_alignParentEnd="true" />
-
-            <EditText
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:inputType="textPassword"
-                android:ems="10"
-                android:id="@+id/newPass"
-                android:layout_below="@+id/oldPass"
-                android:layout_marginTop="56dp"
-                android:hint="nuova password"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true"
-                android:layout_alignParentRight="true"
-                android:layout_alignParentEnd="true" />
-
-            <Button
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="Invia"
-                android:id="@+id/invia"
-                android:layout_marginTop="30dp"
-                android:width="120dp"
-                android:layout_below="@+id/newPass"
-                android:layout_centerHorizontal="true" />
-
-            <Button
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="annulla"
-                android:id="@+id/annulla"
-                android:layout_below="@+id/invia"
-                android:layout_alignLeft="@+id/invia"
-                android:layout_alignStart="@+id/invia"
-                android:layout_marginTop="30dp"
-                android:width="120dp" />
-        </RelativeLayout>
-    </ScrollView>
-</RelativeLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/ruledialog.xml b/mainActivity/res/layout/ruledialog.xml
deleted file mode 100755 (executable)
index d2eaea9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="fill_parent"
-    android:fillViewport="false"
-    tools:context=".MainActivity">
-
-    <HorizontalScrollView
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:id="@+id/window"
-        android:fillViewport="true">
-        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-            xmlns:tools="http://schemas.android.com/tools"
-            android:layout_width="wrap_content"
-            android:layout_height="1dp"
-            android:id="@+id/global"
-            tools:context=".MyActivity">
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerHorizontal="true" />
-        </RelativeLayout>
-    </HorizontalScrollView>
-
-</ScrollView>
\ No newline at end of file
diff --git a/mainActivity/res/layout/string_layout.xml b/mainActivity/res/layout/string_layout.xml
deleted file mode 100755 (executable)
index 833a712..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-    <HorizontalScrollView
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:background="@android:color/holo_blue_light"
-        android:fillViewport="true">
-        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-            xmlns:tools="http://schemas.android.com/tools"
-            android:layout_width="wrap_content"
-            android:id="@+id/literals"
-            android:layout_height="match_parent">
-        </RelativeLayout>
-    </HorizontalScrollView>
-        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-            xmlns:tools="http://schemas.android.com/tools"
-            android:layout_width="match_parent"
-            android:background="@android:color/holo_orange_light"
-            android:id="@+id/operators"
-            android:layout_height="40dp"
-            tools:context=".MyActivity">
-        </RelativeLayout>
-
-        <HorizontalScrollView
-            android:layout_width="match_parent"
-            android:layout_height="100dp"
-            android:fillViewport="true">
-            <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                xmlns:tools="http://schemas.android.com/tools"
-                android:layout_width="wrap_content"
-                android:layout_height="100dp"
-                android:id="@+id/formulaLayout"
-                tools:context=".MyActivity">
-            </RelativeLayout>
-        </HorizontalScrollView>
-</LinearLayout>
\ No newline at end of file
diff --git a/mainActivity/res/layout/textviewgeneral.xml b/mainActivity/res/layout/textviewgeneral.xml
deleted file mode 100644 (file)
index 818d2d7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<TextView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/rowTextView"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:padding="10dp"
-    android:textSize="20sp"
-    android:textColor="@android:color/black">
-</TextView>
\ No newline at end of file
diff --git a/mainActivity/res/menu/._my.xml b/mainActivity/res/menu/._my.xml
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/menu/._my.xml and /dev/null differ
diff --git a/mainActivity/res/menu/login_set.xml b/mainActivity/res/menu/login_set.xml
deleted file mode 100755 (executable)
index 2c4a06b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    tools:context=".MyActivity" >
-    <item android:id="@+id/recupera"
-        android:title="@string/recuperapass"
-        android:orderInCategory="100"
-        android:showAsAction="never" />
-    <item android:id="@+id/reimposta"
-        android:title="@string/reimposta"
-        android:orderInCategory="100"
-        android:showAsAction="never" />
-</menu>
diff --git a/mainActivity/res/menu/menu_dow.xml b/mainActivity/res/menu/menu_dow.xml
deleted file mode 100755 (executable)
index 4a7a73e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<menu
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    tools:context=".MyActivity" >
-    <item android:id="@+id/aggiorna"
-    android:title="@string/sync"
-    android:orderInCategory="100"
-    android:showAsAction="never" />
-    <item android:id="@+id/esci"
-    android:title="@string/esci"
-    android:orderInCategory="100"
-    android:showAsAction="never" />
-</menu>
\ No newline at end of file
diff --git a/mainActivity/res/menu/my.xml b/mainActivity/res/menu/my.xml
deleted file mode 100755 (executable)
index 74a83a1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    tools:context=".MyActivity" >
-    <item android:id="@+id/abandon"
-        android:title="Abbandona esercizio"
-        android:orderInCategory="100"
-        android:showAsAction="never" />
-</menu>
diff --git a/mainActivity/res/raw/._halloween.crt b/mainActivity/res/raw/._halloween.crt
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/raw/._halloween.crt and /dev/null differ
diff --git a/mainActivity/res/raw/._keystore.bks b/mainActivity/res/raw/._keystore.bks
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/raw/._keystore.bks and /dev/null differ
diff --git a/mainActivity/res/raw/halloween.crt b/mainActivity/res/raw/halloween.crt
deleted file mode 100755 (executable)
index e60e9db..0000000
Binary files a/mainActivity/res/raw/halloween.crt and /dev/null differ
diff --git a/mainActivity/res/raw/keystore.bks b/mainActivity/res/raw/keystore.bks
deleted file mode 100755 (executable)
index 1d03af4..0000000
Binary files a/mainActivity/res/raw/keystore.bks and /dev/null differ
diff --git a/mainActivity/res/values-w820dp/._dimens.xml b/mainActivity/res/values-w820dp/._dimens.xml
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/values-w820dp/._dimens.xml and /dev/null differ
diff --git a/mainActivity/res/values-w820dp/dimens.xml b/mainActivity/res/values-w820dp/dimens.xml
deleted file mode 100755 (executable)
index 63fc816..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<resources>
-    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
-         (such as screen margins) for screens with more than 820dp of available width. This
-         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
-    <dimen name="activity_horizontal_margin">64dp</dimen>
-</resources>
diff --git a/mainActivity/res/values/._dimens.xml b/mainActivity/res/values/._dimens.xml
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/values/._dimens.xml and /dev/null differ
diff --git a/mainActivity/res/values/._strings.xml b/mainActivity/res/values/._strings.xml
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/values/._strings.xml and /dev/null differ
diff --git a/mainActivity/res/values/._styles.xml b/mainActivity/res/values/._styles.xml
deleted file mode 100755 (executable)
index 0dfce20..0000000
Binary files a/mainActivity/res/values/._styles.xml and /dev/null differ
diff --git a/mainActivity/res/values/dimens.xml b/mainActivity/res/values/dimens.xml
deleted file mode 100755 (executable)
index 47c8224..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<resources>
-    <!-- Default screen margins, per the Android Design guidelines. -->
-    <dimen name="activity_horizontal_margin">16dp</dimen>
-    <dimen name="activity_vertical_margin">16dp</dimen>
-</resources>
diff --git a/mainActivity/res/values/strings.xml b/mainActivity/res/values/strings.xml
deleted file mode 100755 (executable)
index c956b22..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <string name="app_name">LogicPlayer</string>
-    <string name="hello_world">inserisci una stringa</string>
-    <string name="action_settings">Settings</string>
-    <string name="invia">accedi</string>
-    <string name="pass">password</string>
-    <string name="sync">Aggiorna</string>
-    <string name="esci">Esci</string>
-    <string name="user">Username</string>
-    <string name="listEs">Lista esercizi:</string>
-    <string name="registrati">registrati</string>
-    <string name="recuperapass">recupera password</string>
-    <string name="first">download disponibili:</string>
-    <string name="reimposta">Reimposta password</string>
-    <string name="listaEsercizi">Lista esercizi:</string>
-    <string name="Credenziali">Inserisci le tue credenziali:</string>
-    <string name="aggiornamento">sto aggiornando</string>
-
-</resources>
diff --git a/mainActivity/res/values/styles.xml b/mainActivity/res/values/styles.xml
deleted file mode 100755 (executable)
index ff6c9d2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<resources>
-
-    <!-- Base application theme. -->
-    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
-        <!-- Customize your theme here. -->
-    </style>
-
-</resources>
diff --git a/mainActivity/settings.gradle b/mainActivity/settings.gradle
new file mode 100644 (file)
index 0000000..e7b4def
--- /dev/null
@@ -0,0 +1 @@
+include ':app'
diff --git a/mainActivity/src/com/example/furt/myapplication/Border.java b/mainActivity/src/com/example/furt/myapplication/Border.java
deleted file mode 100755 (executable)
index 532b11a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.graphics.Color;
-import android.os.Bundle;
-
-public  class Border {
-    private int orientation;
-    private int width;
-    private int color = Color.BLACK;
-    private int style;
-    public int getWidth() {
-        return width;
-    }
-    public void setWidth(int width) {
-        this.width = width;
-    }
-    public int getColor() {
-        return color;
-    }
-    public void setColor(int color) {
-        this.color = color;
-    }
-    public int getStyle() {
-        return style;
-    }
-    public void setStyle(int style) {
-        this.style = style;
-    }
-    public int getOrientation() {
-        return orientation;
-    }
-    public void setOrientation(int orientation) {
-        this.orientation = orientation;
-    }
-    public Border(int Style) {
-        this.style = Style;
-    }
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/BorderedTextView.java b/mainActivity/src/com/example/furt/myapplication/BorderedTextView.java
deleted file mode 100755 (executable)
index 40f3852..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.util.AttributeSet;
-import android.widget.TextView;
-
-public class BorderedTextView extends TextView {
-    private Paint paint = new Paint();
-    public static final int BORDER_TOP = 0x00000001;
-    public static final int BORDER_RIGHT = 0x00000002;
-    public static final int BORDER_BOTTOM = 0x00000004;
-    public static final int BORDER_LEFT = 0x00000008;
-    private Border[] borders;
-
-    public BorderedTextView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-        init();
-    }
-
-    public BorderedTextView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        init();
-    }
-
-    public BorderedTextView(Context context) {
-        super(context);
-        init();
-    }
-    private void init(){
-        paint.setStyle(Paint.Style.STROKE);
-        paint.setColor(Color.BLACK);
-        paint.setStrokeWidth(4);
-    }
-    @Override
-    protected void onDraw(Canvas canvas) {
-        super.onDraw(canvas);
-        if(borders == null) return;
-        for(Border border : borders){
-            paint.setColor(border.getColor());
-            paint.setStrokeWidth(border.getWidth());
-
-            if(border.getStyle() == BORDER_TOP){
-                canvas.drawLine(0, 0, getWidth(), 0, paint);
-            } else
-            if(border.getStyle() == BORDER_RIGHT){
-                canvas.drawLine(getWidth(), 0, getWidth(), getHeight(), paint);
-            } else
-            if(border.getStyle() == BORDER_BOTTOM){
-                canvas.drawLine(0, getHeight(), getWidth(), getHeight(), paint);
-            } else
-            if(border.getStyle() == BORDER_LEFT){
-                canvas.drawLine(0, 0, 0, getHeight(), paint);
-            }
-        }
-    }
-
-    public Border[] getBorders() {
-        return borders;
-    }
-
-    public void setBorders(Border[] borders) {
-        this.borders = borders;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/CopyPasteDialog.java b/mainActivity/src/com/example/furt/myapplication/CopyPasteDialog.java
deleted file mode 100755 (executable)
index e40156f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-
-import java.util.ArrayList;
-
-/**CopyPasteDialog: dialog per la gestione delle operazioni di copia e cancellazione su
- * nodi intermedi dell'albero
- */
-public class CopyPasteDialog extends DialogFragment {
-    Node thisNode; //nodo legato a questo Dialog
-    public CopyPasteDialog(Node n)
-    {
-        thisNode=n;
-    }
-    @Override
-    public Dialog onCreateDialog(final Bundle savedInstanceState) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-        builder.setMessage("Seleziona un'operazione:")
-                .setPositiveButton("Copia", new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialog, int id) {
-                        DrawActivity.copiedNode=thisNode; //il nodo viene copiato
-                    }
-                });
-            builder.setNeutralButton("Cancella", new DialogInterface.OnClickListener() {
-                public void onClick(DialogInterface dialog, int id) {
-                    DrawActivity.selectedNode.Children = new ArrayList<Node>(); //eliminazione del sottoalbero
-                    DrawActivity.rootNode.Clean();
-                    DrawActivity.startDraw();
-                }
-            });
-        builder.setNegativeButton("Annulla", new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int id) {
-            }
-        });
-        // Create the AlertDialog object and return it
-        return builder.create();
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/DialogTouchHandler.java b/mainActivity/src/com/example/furt/myapplication/DialogTouchHandler.java
deleted file mode 100755 (executable)
index eba3c67..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.view.View;
-
-/**DialogTouchHandler: Handler per la gestione delle regole cliccate
- * nel Dialog delle regole di introduzione**/
-
-public class DialogTouchHandler implements View.OnClickListener{
-    Node node;
-    DialogTouchHandler(Node n)
-    {
-        node=n;
-    }
-    public void onClick(View view)
-    {
-        Node selectedRule=node;
-        while(selectedRule.Father!=null) //se l'utente ha cliccato su uno dei figli del sottoalbero risalgo alla radice
-            selectedRule=selectedRule.Father;
-        for (Node n : selectedRule.Children) { //incollo i figli del nodo sul selectedNode avendo cura di integrare le ipotesi
-            for (Hypothesis hp : n.NodeHP)
-                hp.fromNode = DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
-            n.addHPList(DrawActivity.selectedNode.NodeHP);
-            n.handler = null; //rimuovo l'handler per il DialogTouchHandler, che è ora inutile
-            DrawActivity.selectedNode.addChild(n);
-        }
-        DrawActivity.selectedNode.hasFocus = false; //il vecchio selectedNode non ha più il focus
-        DrawActivity.selectedNode.ruleName = selectedRule.Children.get(0).ruleName;
-        DrawActivity.selectedNode.Children.get(0).hasFocus = true; //il primo figlio della regola applicata acquisisce il focus
-        DrawActivity.nmoves++;
-        DrawActivity.rootNode.Clean();
-        DrawActivity.startDraw();
-        touchnodeHandler.ruleDialog.dismiss(); //il ruleDialog del touchnodeHandler non è più necessario
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/DrawActivity.java b/mainActivity/src/com/example/furt/myapplication/DrawActivity.java
deleted file mode 100644 (file)
index f9a9c84..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.FragmentManager;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Configuration;
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.util.DisplayMetrics;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.ScaleGestureDetector;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.widget.RelativeLayout;
-import android.widget.ScrollView;
-import android.widget.Toast;
-
-import java.sql.Timestamp;
-
-import static java.lang.Thread.sleep;
-
-public class DrawActivity extends FragmentActivity {
-
-    static RelativeLayout globalHP; //layout delle ipotesi cancellate
-    static ScaleGestureDetector scaleGestureDetector; //zoom listener
-    static float spaceSize; //dimensione della spaziatura tra i sottoalberi
-    static float textSize=40; //dimensione del font iniziale
-    static Node selectedNode; //Node su cui è attualmente il focus
-    static Node copiedNode;//nodo copiato
-    static boolean addFakes;//booleano che segnala se bisogna aggiungere delle regole fake
-    static Border[] b; //bordi per le borderedTextView
-    static FragmentManager fragmentManager;//per i dialog
-    static Node rootNode; //radice dell'albero corrente
-    static ScrollView scroll; //Vertical ScrollView contenente l'albero
-    static int nmoves=0;//numero di mosse
-    static int nerrors=0;//nomero di errori
-    static long startTime;//tempo di inizio dell'esercizio
-    static RelativeLayout globalR; //layout globale contenente l'albero
-    static int globalId =10; //variabile incrementale per l'assegnazione di ID univoci
-    static DisplayMetrics v = new DisplayMetrics();//altezza lunghezza e densità dello schermo
-
-    //Informazioni per la comunicazione client-server: username, password, nome dell'esercizio e chiave di sessione.
-    static String user=null;
-    static String pass=null;
-    static String sessionKey=null;
-    static String nomeEs=null;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        //routine standard per la create
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_my);
-
-        //recupero e setto le variabili globali
-        getWindowManager().getDefaultDisplay().getMetrics(v); //getMetrics() inserisce nella variabile V i dati metrici (altezza,larghezza,densità...) dello schermo del dispositivo
-        globalHP = (RelativeLayout) findViewById(R.id.hpscroll);
-        globalR = (RelativeLayout) findViewById(R.id.global);
-        spaceSize = 2*(textSize/v.density); //lo spazio tra due sottoalberi è di due caratteri vuoti
-        fragmentManager=getFragmentManager();
-        copiedNode=null; //inizialmente non ci sono ovviamente sottoalberi copiati
-        scroll=(ScrollView)findViewById(R.id.vscroll);
-        startTime=time();
-        b=new Border[1];
-        b[0]=new Border(BorderedTextView.BORDER_TOP);
-        b[0].setWidth(2);
-        //Recupero i dati passati dall'Intent: username, password, nome dell'esercizio da visualizzare e chiave di sessione
-        Bundle dati=getIntent().getExtras();
-        nomeEs=dati.getString("nomeEs");
-        user=dati.getString("user");
-        pass=dati.getString("pass");
-        sessionKey=dati.getString("sessionKey");
-
-        //Creazione dell'albero: setto il rootNode e creo la Formula di partenza (F)
-        if(!populateTree()) //populateTree() ha fallito: file dell'esercizio corrotto.
-            return;
-
-        //Creazione dell'albero: setto i campi della view
-        BorderedTextView rootView=new BorderedTextView(this);
-        rootView.setId(globalId);
-        globalId++;
-        selectedNode=null;
-        addFakes=false; //di default non vengono aggiunte regole false
-        rootNode.setView(rootView,globalR); //il rootNode viene legato al globalLayout attuale e alla TextView creata
-        rootNode.handler=new touchnodeHandler(rootNode);
-        rootNode.longHandler=new longnodeHandler(rootNode);
-        rootNode.hasFocus=true; //di default, la radice ha inizialmente il focus.
-        startDraw();
-
-        //imposto il listener per il pinch zoom
-        scaleGestureDetector = new ScaleGestureDetector(this, new simpleOnScaleGestureListener());
-    }
-    @Override
-    public void onConfigurationChanged(Configuration configuration) //rotazione dello schermo: restore dell'albero
-    {
-        super.onConfigurationChanged(configuration);
-        getWindowManager().getDefaultDisplay().getMetrics(v);
-        DrawActivity.rootNode.Clean();
-        DrawActivity.startDraw();
-    }
-    public static void startDraw()
-    {
-        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-        final int halfScreen=Math.round((v.widthPixels / 2) - rootNode.getBaseWidth() / 2); //calcolo la metà dello schermo per il calcolo dei margins della scrollView
-        int leftSubTree=(Math.round(rootNode.getLeftOffset() - rootNode.getUpLine() / 2 + (rootNode.getBaseWidth() / 2)) + 40); //sottoalbero sinistro del rootNode più un padding di 40px
-        lp.setMargins(Math.max(halfScreen,leftSubTree),0, 0, 0);
-        lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, rootNode.view.getId());
-        rootNode.view.setLayoutParams(lp);
-        rootNode.view.setBorders(b);
-        rootNode.view.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-        rootNode.view.setWidth(Math.round(rootNode.getLineWidth())); //setto la larghezza della view al contenuto della linea
-        rootNode.view.setGravity(Gravity.CENTER); //formula al centro della sua overline
-        rootNode.view.setText(rootNode.F.toString()); //setta il contenuto della formula
-        globalR.addView(rootNode.view);
-        //inserisco un listener a rootView da attivare quando sono state fissate le coordinate nel RelativeLayout
-        rootNode.view.getViewTreeObserver().addOnGlobalLayoutListener(
-                new ViewTreeObserver.OnGlobalLayoutListener()
-                {
-                    @Override
-                    public void onGlobalLayout()
-                    {
-                        globalR.setPadding(0,0,(int)Math.max(rootNode.getRightOffset(),halfScreen),0);
-                        globalR.getLayoutParams().height=(int)Math.max((v.heightPixels),(rootNode.getMaxHeight()+rootNode.getMaxHeight()*0.10)); //altezza della view=max(h_screen,h_tree). Aggiungo un 10% all'altezza dell'albero per approssimazione dei calcoli.
-                        globalR.requestLayout(); //aggiorna i parametri e le dimensioni del RelativeLayout
-                        if (rootNode.getMaxHeight()<v.heightPixels/2) //se l'albero non ha raggiunto almeno la metà dello schermo scrollo la view fino in fondo per visualizzarlo interamente
-                            scroll.fullScroll(ScrollView.FOCUS_DOWN);
-                        rootNode.view.setOnClickListener(rootNode.handler);
-                        rootNode.view.setOnLongClickListener(rootNode.longHandler);
-                        rootNode.view.getViewTreeObserver().removeOnGlobalLayoutListener(this); //rimuove il listener per evitare che la funzione parta nuovamente
-                        rootNode.Draw();
-                    }
-                });
-    }
-    @Override
-    public void onBackPressed() {
-        //abbandona esercizio e torna alla view con la lista degli esercizi
-        Intent i = new Intent(globalHP.getContext(), aggiornamento.class);
-        i.putExtra("user", user);
-        i.putExtra("pass", pass);
-        i.putExtra("sessionKey", sessionKey);
-        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        globalHP.getContext().startActivity(i);
-
-    }
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.my, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        // TODO Auto-generated method stub
-        scaleGestureDetector.onTouchEvent(event);
-        return true;
-    }
-
-
-    @Override
-    public boolean dispatchTouchEvent(MotionEvent event) {
-        super.dispatchTouchEvent(event);
-        return (scaleGestureDetector.onTouchEvent(event));
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        int id = item.getItemId();
-        if(id==R.id.abandon)
-        {   //abbandona esercizio e torna alla view con la lista degli esercizi
-            Intent i = new Intent(globalHP.getContext(), aggiornamento.class);
-            i.putExtra("user", user);
-            i.putExtra("pass", pass);
-            i.putExtra("sessionKey", sessionKey);
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            globalHP.getContext().startActivity(i);
-        }
-        return true;
-    }
-
-
-
-    public class simpleOnScaleGestureListener extends
-            ScaleGestureDetector.SimpleOnScaleGestureListener {
-
-        @Override
-        public boolean onScale(ScaleGestureDetector detector) {
-            float factor=detector.getScaleFactor();
-            if (textSize>65 && factor>1) //font troppo grande: impedisco aumento
-                return true;
-            if (textSize<15 && factor<1) //font troppo piccolo: impedisco riduzione
-                return true;
-            rootNode.Refactor();  //risetta i campi dell'albero a FIELD_UNSET
-            RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-            DrawActivity.spaceSize=(DrawActivity.spaceSize*factor);
-            DrawActivity.textSize=(DrawActivity.textSize*factor);
-            int halfScreen=Math.round((v.widthPixels / 2)-rootNode.getBaseWidth()/2);
-            int leftSubTree=(Math.round(rootNode.getLeftOffset() - rootNode.getUpLine() / 2 + (rootNode.getBaseWidth() / 2)) + 40);
-            globalR.setPadding(0,0,(int)Math.max(rootNode.getRightOffset(),halfScreen),0);
-            lp.setMargins(Math.max(halfScreen,leftSubTree),0, 0, 0);
-            lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, rootNode.view.getId());
-            rootNode.view.setLayoutParams(lp);
-            rootNode.view.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-            rootNode.view.setWidth(Math.round(rootNode.getLineWidth())); //setto la larghezza della view al contenuto della linea
-            rootNode.Resize(); //ricorsivamente sistema i fontsize, le larghezze e le posizioni delle view nell'albero
-            return true;
-        }
-    }
-    public static void finishedTree(Context context) {
-        if (!rootNode.isCorrect()) {
-            Toast.makeText(context, "Esercizio errato! Ricontrolla i passaggi fatti e riprova", Toast.LENGTH_LONG).show();
-        } else {
-            long endTime = time();
-            int second= (int) ((endTime-startTime)/1000);
-            int minute=second/60;
-            Toast.makeText(context, "Esercizio completato in " + Integer.toString(nmoves) + " mosse!", Toast.LENGTH_LONG).show();
-            try {
-                sleep(2);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            Toast.makeText(context, "Hai commesso " + Integer.toString(nerrors) + " errori!", Toast.LENGTH_LONG).show();
-            try {
-                sleep(2);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            Toast.makeText(context, "Numero nodi dell'albero: " + Integer.toString(rootNode.count()), Toast.LENGTH_LONG).show();
-            try {
-                sleep(2);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            Toast.makeText(context, "Tempo impiegato: " + Integer.toString(minute) + " minuti e " + Integer.toString(second-(minute*60)) + " secondi", Toast.LENGTH_LONG).show();
-            //aggiungo l'esercizio al database
-            int voto=valutazione.voto(nomeEs,nmoves,second,rootNode.count(),nerrors);
-            personalDBHelper db = new personalDBHelper(context);
-            db.add(user, nomeEs, MD5.digest(nomeEs), 0.0, voto, 0);
-            nmoves = 0;
-            Intent i = new Intent(context, aggiornamento.class);
-            i.putExtra("user", user);
-            i.putExtra("pass", pass);
-            i.putExtra("sessionKey", sessionKey);
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            context.startActivity(i);
-        }
-    }
-    public boolean populateTree() {
-
-        rootNode = parser.root(nomeEs);
-        if(rootNode==null)
-        {
-            Toast.makeText(this, "Errore nell'apertura del file", Toast.LENGTH_LONG).show();
-            Intent i = new Intent(this, aggiornamento.class);
-            i.putExtra("user", user);
-            i.putExtra("pass", pass);
-            i.putExtra("sessionKey", sessionKey);
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            this.startActivity(i);
-            return false;
-        }
-        for (Hypothesis h:rootNode.NodeHP)
-            h.fromNode=rootNode;
-        return true;
-    }
-    public static long time()
-    {
-        java.util.Date date= new java.util.Date();
-        Timestamp now=new Timestamp(date.getTime());
-        return now.getTime();
-    }
-
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/EliminationRule.java b/mainActivity/src/com/example/furt/myapplication/EliminationRule.java
deleted file mode 100755 (executable)
index cc55c45..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.example.furt.myapplication;
-
-/**EliminationRule: interfaccia per le regole di eliminazione**/
-public interface EliminationRule
-{
-    public Node createNodes(Formula F, askFormula ask); //restituisce il sottoalbero successivo all'applicazione della regola sul nodo attualmente selezionato
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/FView.java b/mainActivity/src/com/example/furt/myapplication/FView.java
deleted file mode 100755 (executable)
index 479df78..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.example.furt.myapplication;
-
-public interface FView
-{
-    @Override
-    public String toString();
-    public String toStringDeleted();
-    String Draw(int priority);
-    public float size();
-    public float height();
-    public float sizeDeleted();
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/Formula.java b/mainActivity/src/com/example/furt/myapplication/Formula.java
deleted file mode 100755 (executable)
index 0145444..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.List;
-/**Formula:interfaccia per l'implementazione di formule logiche. Prevede metodi per
- * l'applicazione delle regole e per la gestione dell'editor guidato per l'inserimento.**/
-public interface Formula extends FView{
-    public List<IntroductionRule> introductionRules();
-    public List<EliminationRule> EliminationRules();
-    public boolean Fill(Formula F);
-    public boolean setCursor();
-    public Formula duplicate();
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/FormulaAnd.java b/mainActivity/src/com/example/furt/myapplication/FormulaAnd.java
deleted file mode 100755 (executable)
index fe75584..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FormulaAnd extends GenericFormula implements Formula
-{
-    Formula leftF;
-    Formula rightF;
-    int leftPriority;
-    int rightPriority;
-    FormulaAnd(Formula F1,Formula F2)
-    {
-        leftF=F1;
-        rightF=F2;
-        priority=15;
-        leftPriority=15;
-        rightPriority=16;
-    }
-    @Override
-    public String Draw(int p)
-    {
-        if (priority >= p)
-            return leftF.Draw(leftPriority)+"∧"+rightF.Draw(rightPriority);
-        else
-            return("(")+leftF.Draw(leftPriority)+"∧"+rightF.Draw(rightPriority)+")";
-    }
-
-    @Override
-    public List<IntroductionRule> introductionRules()
-    {
-        List<IntroductionRule> rules=new ArrayList<IntroductionRule>();
-        rules.addAll(super.introductionRules());
-
-        //Regola di introduzione dell'And
-        RuleIntroduction andIntroduction=new RuleIntroduction("∧i",5);
-        Node Left=new Node(leftF);
-        Node Right=new Node(rightF);
-        Node thisNode=new Node(this);
-        thisNode.addChild(Left);
-        thisNode.addChild(Right);
-        andIntroduction.tempRule=thisNode;
-        rules.add(andIntroduction);
-
-        return rules;
-    }
-    public List<EliminationRule> EliminationRules()
-    {
-        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
-        nodes.add(new RuleAndElimination(this));
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula Filler) {
-        if(leftF.toString().equals("_")) {
-            this.leftF = Filler;
-            return true;
-        }
-        else if(rightF.toString().equals("_")) {
-            this.rightF = Filler;
-            return true;
-        }
-        return leftF.Fill(Filler) || rightF.Fill(Filler);
-    }
-
-    @Override
-    public boolean setCursor() {
-        return leftF.setCursor() || rightF.setCursor();
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new FormulaAnd(leftF.duplicate(),rightF.duplicate());
-    }
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/FormulaBOT.java b/mainActivity/src/com/example/furt/myapplication/FormulaBOT.java
deleted file mode 100755 (executable)
index f5e905b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Paint;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FormulaBOT extends GenericFormula implements Formula{
-    Paint p=new Paint();
-    FormulaBOT()
-    {
-        priority=100;
-    }
-
-    @Override
-    public String Draw(int p)
-    {
-        return "⊥";
-    }
-
-    public List<IntroductionRule> introductionRules(){
-        //Bottom non ha regole di introduzione sensate
-        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
-        return nodes;
-    }
-    public List<EliminationRule> EliminationRules()
-    {
-        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
-        nodes.add(new RuleBotElimination(this));
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula F) {
-        return false;
-    }
-
-    @Override
-    public boolean setCursor() {
-        return false;
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new FormulaBOT();
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/FormulaImpl.java b/mainActivity/src/com/example/furt/myapplication/FormulaImpl.java
deleted file mode 100755 (executable)
index efe1714..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FormulaImpl extends GenericFormula implements Formula
-{
-    Formula leftF;
-    Formula rightF;
-    int leftPriority;
-    int rightPriority;
-    FormulaImpl(Formula F1,Formula F2)
-    {
-        priority=10;
-        leftF=F1;
-        rightF=F2;
-        leftPriority=11;
-        rightPriority=10;
-    }
-    @Override
-    public String Draw(int p)
-    {
-        if (priority >= p)
-            return leftF.Draw(leftPriority)+"⇒"+rightF.Draw(rightPriority);
-        else
-            return("(")+leftF.Draw(leftPriority)+"⇒"+rightF.Draw(rightPriority)+")";
-    }
-
-    public List<IntroductionRule> introductionRules(){
-        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
-        nodes.addAll(super.introductionRules()); //aggiunge la regola di R.A.A.
-
-        //Regola di introduzione dell'implicazione
-
-        RuleIntroduction implIntro=new RuleIntroduction("⇒i",10);
-        Node ImplN=new Node(rightF);
-        List<Formula> implHP=new ArrayList<Formula>();
-        implHP.add(leftF);
-        ImplN.addHPFormula(implHP,true);
-        Node thisNode=new Node(this);
-        thisNode.addChild(ImplN);
-        implIntro.tempRule=thisNode;
-        nodes.add(implIntro);
-
-        return nodes;
-    }
-    public List<EliminationRule> EliminationRules()
-    {
-        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
-        nodes.add(new RuleImplElimination(this));
-        return nodes;
-    }
-    @Override
-    public boolean Fill(Formula Filler) {
-        if(leftF.toString().equals("_")) {
-            this.leftF = Filler;
-            return true;
-        }
-        else if(rightF.toString().equals("_")) {
-            this.rightF = Filler;
-            return true;
-        }
-        return leftF.Fill(Filler) || rightF.Fill(Filler);
-    }
-
-    @Override
-    public boolean setCursor() {
-        return leftF.setCursor() || rightF.setCursor();
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new FormulaImpl(leftF.duplicate(),rightF.duplicate());
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/FormulaNot.java b/mainActivity/src/com/example/furt/myapplication/FormulaNot.java
deleted file mode 100755 (executable)
index 6bd80e5..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Paint;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FormulaNot extends GenericFormula implements Formula{
-    Paint p=new Paint();
-    Formula Operand;
-    int priority;
-    int argPriority;
-    FormulaNot(Formula F)
-    {
-        Operand=F;
-        priority=20;
-        argPriority=100;
-    }
-    @Override
-    public String Draw(int p)
-    {
-        if (priority >= p)
-            return "¬"+Operand.Draw(20);
-        else
-            return("¬("+Operand.Draw(20)+")");
-    }
-
-    public List<IntroductionRule> introductionRules(){
-        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
-
-        //Introduzione del not (NOTA: il not non eredita la regola di riduzione ad assurdo)
-        RuleIntroduction notIntro=new RuleIntroduction("¬i",4);
-        Node notN=new Node(new FormulaBOT());
-        List<Formula> notHP=new ArrayList<Formula>();
-        notHP.add(Operand);
-        notN.addHPFormula(notHP,true);
-        Node thisNode=new Node(this);
-        thisNode.addChild(notN);
-        notIntro.tempRule=thisNode;
-        nodes.add(notIntro);
-        return nodes;
-    }
-    public List<EliminationRule> EliminationRules()
-    {
-        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
-        nodes.add(new RuleNotElimination(this));
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula Filler) {
-        if(Operand.toString().equals("_")) {
-            Operand = Filler;
-            return true;
-        }
-        return Operand.Fill(Filler);
-    }
-
-    @Override
-    public boolean setCursor() {
-        return Operand.setCursor();
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new FormulaNot(Operand.duplicate());
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/FormulaOr.java b/mainActivity/src/com/example/furt/myapplication/FormulaOr.java
deleted file mode 100755 (executable)
index 83531cc..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FormulaOr extends GenericFormula implements Formula
-{
-    Formula leftF;
-    Formula rightF;
-    int leftPriority;
-    int rightPriority;
-    FormulaOr(Formula F1,Formula F2)
-    {
-        priority=13;
-        leftF=F1;
-        rightF=F2;
-        leftPriority=13;
-        rightPriority=14;
-    }
-
-    @Override
-    public String Draw(int p)
-    {
-        if (priority >= p)
-            return leftF.Draw(leftPriority)+"∨"+rightF.Draw(rightPriority);
-        else
-            return("(")+leftF.Draw(leftPriority)+"∨"+rightF.Draw(rightPriority)+")";
-    }
-
-    public List<IntroductionRule> introductionRules(){
-        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
-        nodes.addAll(super.introductionRules()); //eredita la R.A.A.
-
-        //Introduzione sinistra dell'or
-        RuleIntroduction orIntroductionLeft=new RuleIntroduction("∨i(L)",6);
-        Node orLeft=new Node(leftF);
-        Node thisNodeL=new Node(this);
-        thisNodeL.addChild(orLeft);
-        orIntroductionLeft.tempRule=thisNodeL;
-        nodes.add(orIntroductionLeft);
-
-        //Introduzione destra dell'or
-        RuleIntroduction orIntroductionRight=new RuleIntroduction("∨i(R)",5);
-        Node orRight=new Node(rightF);
-        Node thisNodeR=new Node(this);
-        thisNodeR.addChild(orRight);
-        orIntroductionRight.tempRule=thisNodeR;
-        nodes.add(orIntroductionRight);
-
-        return nodes;
-    }
-
-    public List<EliminationRule> EliminationRules()
-    {
-        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
-        nodes.add(new RuleOrElimination(this));
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula Filler) {
-        if(leftF.toString().equals("_")) {
-            this.leftF = Filler;
-            return true;
-        }
-        else if(rightF.toString().equals("_")) {
-            this.rightF = Filler;
-            return true;
-        }
-        return leftF.Fill(Filler) || rightF.Fill(Filler);
-    }
-
-    @Override
-    public boolean setCursor() {
-        return leftF.setCursor() || rightF.setCursor();
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new FormulaOr(leftF.duplicate(),rightF.duplicate());
-    }
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/FormulaTOP.java b/mainActivity/src/com/example/furt/myapplication/FormulaTOP.java
deleted file mode 100755 (executable)
index 8d9aa70..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FormulaTOP extends GenericFormula implements Formula{
-
-    FormulaTOP()
-    {
-        priority=100;
-    }
-
-    @Override
-    public String Draw(int p){return "Ț";}
-
-    public List<IntroductionRule> introductionRules(){
-        //le regole di introduzione ed eliminazione per Top non sono implementate in quanto prive
-        //di un'applicazione effettiva nella dimostrazione
-        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula F) {
-        return false;
-    }
-
-    @Override
-    public boolean setCursor() {
-        return false;
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new FormulaTOP();
-    }
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/GenericFormula.java b/mainActivity/src/com/example/furt/myapplication/GenericFormula.java
deleted file mode 100755 (executable)
index b2136ab..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Paint;
-import android.graphics.Rect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericFormula implements Formula
-{
-    Paint p=new Paint();
-    int priority;
-    public String Draw(int p)
-    {
-        return "?";
-    } //la GenericFormula non può essere rappresentata
-    public String toString(){return Draw(0);}
-    public float size(){
-        p.setTextSize(DrawActivity.textSize);
-        return p.measureText(toString())+(float)(p.measureText(toString())*0.20);//ritorna la misura effettuata dalla classe Paint con un padding del 20% per migliorare la stima
-    }
-    public float sizeDeleted()
-    {
-        p.setTextSize(DrawActivity.textSize);
-        return p.measureText(toStringDeleted())+(float)(p.measureText(toStringDeleted())*0.20); //ritorna la misura effettuata dalla classe Paint con un padding del 20% per migliorare la stima
-    }
-    public String toStringDeleted()
-    {
-        return "["+toString()+"]";
-    }
-    public float height()
-    {
-        p.setTextSize(DrawActivity.textSize);
-        Rect bounds=new Rect();
-        p.getTextBounds(toString(),0,toString().length(),bounds);
-        return (float)((bounds.height()+((float)0.20*bounds.height()))*1.5); //l'altezza della formula va moltiplicata per l'inverso della densità dello schermo (circa 1.5)
-    }
-    public List<IntroductionRule> introductionRules(){
-        List<IntroductionRule> rules=new ArrayList<IntroductionRule>();
-        Node thisNode=new Node(this);
-        RuleIntroduction RAA=new RuleIntroduction("RAA",0);                        //R.A.A.
-        Node RAAnode=new Node(new FormulaBOT());                            //Formula=Bottom
-        List<Formula> RAAhp=new ArrayList<Formula>();                             //Tutte le ipotesi del nodo precedente
-        RAAhp.add(new FormulaNot(this));                                    //Più la negazione del nodo attuale
-        RAAnode.addHPFormula(RAAhp,true);
-        thisNode.addChild(RAAnode);
-        RAA.tempRule=thisNode;
-        rules.add(RAA);
-        /*
-        Node thisFakeNode=new Node(this);
-        RuleIntroduction fakeRAA=new RuleIntroduction("RAA",0,true);                        //fake R.A.A.
-        Node fakeRAAnode=new Node(new FormulaNot(this));                            //Formula=!F
-        thisFakeNode.addChild(fakeRAAnode);
-        fakeRAA.tempRule=thisFakeNode;
-        rules.add(fakeRAA);
-        */
-        return rules;
-    }
-    public List<EliminationRule> EliminationRules(){
-        List<EliminationRule> nodes=new ArrayList<EliminationRule>();
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula F) {
-        return false;
-    }
-
-    @Override
-    public boolean setCursor() {
-        return false;
-    }
-
-    @Override
-    public Formula duplicate() {
-        return null;
-    }
-
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/Hypothesis.java b/mainActivity/src/com/example/furt/myapplication/Hypothesis.java
deleted file mode 100755 (executable)
index f951431..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.example.furt.myapplication;
-
-/**Hypothesis: implementa le ipotesi di un nodo. Contiene una formula, un booleano per verificare se si stratta
- * di un'ipotesi scaricata e un puntatore al nodo in cui l'ipotesi è stata introdotta
- */
-public class Hypothesis
-{
-    Formula HP;
-    boolean isDeleted;
-    Node fromNode;
-    Hypothesis(Formula F,boolean d)
-    {
-        HP=F;
-        isDeleted=d;
-        fromNode=null;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/IntroductionRule.java b/mainActivity/src/com/example/furt/myapplication/IntroductionRule.java
deleted file mode 100755 (executable)
index 9799a43..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.example.furt.myapplication;
-
-public interface IntroductionRule
-{
-    int getPriority();
-    public Node createNodes(askFormula ask);
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/Literal.java b/mainActivity/src/com/example/furt/myapplication/Literal.java
deleted file mode 100755 (executable)
index 3da98ce..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Literal extends GenericFormula implements Formula
-{
-    String L;
-    Literal(char c)
-    {
-        priority=100;
-        L=c+"";
-    }
-    @Override
-    public String Draw(int p){return L;}
-
-    public List<IntroductionRule> introductionRules(){
-        List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
-        nodes.addAll(super.introductionRules()); //eredita la R.A.A.
-        return nodes;
-    }
-
-    @Override
-    public boolean Fill(Formula F) {
-        return false;
-    }
-
-    @Override
-    public Formula duplicate() {
-        return new Literal(this.L.charAt(0));
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/LongHPClick.java b/mainActivity/src/com/example/furt/myapplication/LongHPClick.java
deleted file mode 100755 (executable)
index 69ed7c3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Color;
-import android.os.Handler;
-import android.view.View;
-
-/**LongHPClick: handler per il longtouch delle ipotesi. Illumina di giallo il nodo
- * da cui proviene l'ipotesi in oggetto
- */
-public class LongHPClick implements View.OnLongClickListener {
-
-    Node n;
-    LongHPClick(Node node)
-    {
-        n=node;
-    }
-    @Override
-    public boolean onLongClick(View v) {
-        n.view.setTextColor(Color.BLUE);
-        final Handler handler = new Handler();
-        handler.postDelayed(new Runnable() {
-            @Override
-            public void run() {
-                n.view.setTextColor(Color.BLACK);
-            }
-        }, 1000);
-        return true;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/MD5.java b/mainActivity/src/com/example/furt/myapplication/MD5.java
deleted file mode 100755 (executable)
index dc28986..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.os.Environment;
-
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.security.MessageDigest;
-
-
-public class MD5 {
-
-    MD5(){}
-
-    public static String digest(String filePath) {
-        InputStream inputStream = null;
-        try {
-            inputStream = new FileInputStream(Environment.getExternalStorageDirectory()+"/tesiEs/"+filePath);
-            byte[] buffer = new byte[1024];
-            MessageDigest digest = MessageDigest.getInstance("MD5");
-            int numRead = 0;
-            while (numRead != -1) {
-                numRead = inputStream.read(buffer);
-                if (numRead > 0)
-                    digest.update(buffer, 0, numRead);
-            }
-            byte [] md5Bytes = digest.digest();
-            return convertHashToString(md5Bytes);
-        } catch (Exception e) {
-            return null;
-        } finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (Exception e) { }
-            }
-        }
-    }
-
-    private static String convertHashToString(byte[] md5Bytes) {
-        String returnVal = "";
-        for (int i = 0; i < md5Bytes.length; i++) {
-            returnVal += Integer.toString(( md5Bytes[i] & 0xff ) + 0x100, 16).substring(1);
-        }
-        return returnVal;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/MyService.java b/mainActivity/src/com/example/furt/myapplication/MyService.java
deleted file mode 100755 (executable)
index acac481..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.Service;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.IBinder;
-import android.util.Log;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-import java.util.Scanner;
-
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-
-public class MyService extends Service {
-
-    @Override
-    public int onStartCommand(final Intent intent, int flags, int startId)
-    {
-        final Context context=getApplicationContext();
-        /*System.setProperty("javax.net.ssl.trustStore", "mysrvkeystore");
-        //Log.e("onStartCommand",""+R.raw.mysrvkeystore);
-        System.setProperty("javax.net.ssl.trustStorePassword", "123456");
-
-
-
-        String inviotmp = intent.getStringExtra("code") + intent.getStringExtra("varInvio");
-
-        if(intent.getStringExtra("code").charAt(0)!='2')
-            inviotmp = inviotmp + intent.getStringExtra("varInvio2");
-        final String invio=inviotmp;
-        final Thread readthread;
-        readthread = new Thread(new Runnable() {
-            public void run() {
-                SSLSocketFactory sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
-                //Socket socket = null;
-                SSLSocket socket = null;
-                try {
-                    int port = 25000;
-                   // socket = new Socket("10.0.0.2", port);
-                    socket=(SSLSocket) sslsocketfactory.createSocket("10.0.0.2", port);                    //Send the message to the server
-                    OutputStream os = socket.getOutputStream();
-                    OutputStreamWriter osw = new OutputStreamWriter(os);
-                    BufferedWriter bw = new BufferedWriter(osw);
-
-                    //String number = "2";
-
-                    String sendMessage = invio+"\n";
-                    bw.write(sendMessage+"\n");
-                    bw.flush();
-                    System.out.println("Message sent to the server : " + sendMessage);
-
-                    //Get the return message from the server
-                    InputStream is = socket.getInputStream();
-                    InputStreamReader isr = new InputStreamReader(is);
-                    BufferedReader br = new BufferedReader(isr);
-                    String message;
-                    message = br.readLine();
-                    System.out.println("Message received from the server : " + message);
-                } catch (Exception exception) {
-                    exception.printStackTrace();
-                } finally {
-                    //Closing the socket
-                    try {
-                        socket.close();
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-        });
-
-        readthread.start();*/
-        final Thread readthread;
-        readthread = new Thread(new Runnable() {
-            public void run() {
-                InputStream certificato = getResources().openRawResource(R.raw.keystore);
-                KeyStore trustStore = null;
-                try
-                {
-                    trustStore = KeyStore.getInstance("BKS");
-                    trustStore.load(certificato, "123stella".toCharArray());
-                    SSLSocketFactory fs = (SSLSocketFactory) SSLSocketFactory.getDefault();
-                    SSLSocket socket = (SSLSocket) fs.createSocket("10.0.0.2", 25000);
-                    Log.e("", "miracolo");
-
-                    InputStream inputstream = System.in;
-                    InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
-                    BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
-
-                    OutputStream os = socket.getOutputStream();
-                    OutputStreamWriter osw = new OutputStreamWriter(os);
-                    BufferedWriter bw = new BufferedWriter(osw);
-
-                    String sendMessage ="brova";
-                    bw.write(sendMessage+"\n");
-                    bw.flush();
-
-                    System.out.println("Message sent to the server : " + sendMessage);
-                }
-                catch (KeyStoreException e)
-                {
-                    e.printStackTrace();
-                }
-                catch (CertificateException e)
-                {
-                    e.printStackTrace();
-                }
-                catch (NoSuchAlgorithmException e)
-                {
-                    e.printStackTrace();
-                }
-                catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-        readthread.start();
-        return 0;
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return null;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/Node.java b/mainActivity/src/com/example/furt/myapplication/Node.java
deleted file mode 100755 (executable)
index 0a39fdf..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Color;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class Node implements Tree {
-
-    static int FIELD_UNSET = -1;
-    static int OPEN=0;
-    static int FAKE=1;
-    static int CLOSED=2;
-    static int FAKE_CLOSED=3;
-    static int CANCELED=4;
-    static int FAKE_CANCELED=5;
-
-    Formula F; //formula legata al nodo
-    String ruleName; //nome della regola associata a questo nodo
-    List<Node> Children = new ArrayList<Node>(); //Nodi figli
-    List<Hypothesis> NodeHP = new ArrayList<Hypothesis>(); //ipotesi associate
-    Node Father; //puntatore al padre
-    View.OnClickListener handler; //touchHandler per far comparire il pop-up delle regole
-    View.OnLongClickListener longHandler; //touchHandler per far comparire il menu con tutte le regole
-    boolean hasFocus; //indica se questo nodo è quello selezionato
-    int status; //stato del nodo (chiuso, aperto,fake...)
-    RelativeLayout global; //layout in cui si trova l'albero
-    BorderedTextView view; //view contenente questo oggetto
-    TextView ruleView; //view contenente l'intestazione della regola
-
-    float baseLine; //baseLine del Node: corrisponde alla lunghezza dell'overline
-    float leftOffset; //leftOffset: corrisponde alla larghezza della porzione di albero a sinistra del nodo
-    float rightOffset; //rightOffset: porzione di albero a destra del nodo
-    float maxWidth; //larghezza del sottoalbero di questo nodo (comprensiva del nodo stesso)
-
-    Node(Formula F) {
-        this.F = F;
-        view = null;
-        handler = null;
-        ruleName="";
-        Father = null;
-        status=OPEN;
-        hasFocus = false;
-        leftOffset = 0;
-        rightOffset = 0;
-        baseLine = getBaseWidth();
-        maxWidth = baseLine;
-    }
-
-    /**************SetView**************+*****/
-    /*****************************************/
-    /*******Setta la TextView del node  ******/
-    /** e il layout in cui deve comparire  ***/
-    /*****************************************/
-
-    public void setView(BorderedTextView t,RelativeLayout r) {
-        view = t;
-        ruleView =new TextView(t.getContext());
-        global=r;
-    }
-
-
-    /**************Count****************+*****/
-    /*****************************************/
-    /*******Restituisce il numero di    ******/
-    /*************nodi dell'albero ***********/
-    /*****************************************/
-
-    int count()
-    {
-        int ris=1;
-        for (Node n:Children)
-            ris+=n.count();
-        return ris;
-    }
-    /**************addHP****************+*****/
-    /*****************************************/
-    /*******Metodi per aggiungere ipotesi*****/
-    /*******sotto forma di Hypothesis o di****/
-    /*************Formula*********************/
-    /*****************************************/
-
-    public void addHPFormula(List<Formula>List,boolean deleted) {
-        loop:for (Formula newHp:List) {
-            for (Hypothesis oldHp: NodeHP) {
-                if (oldHp.HP.toString().equals(newHp.toString())) { //ipotesi già presente: passo alla prossima
-                    continue loop;
-                }
-            }
-            NodeHP.add(new Hypothesis(newHp, deleted));
-        }
-    }
-
-    public void addHPList(List<Hypothesis>List) {
-        loop:for (Hypothesis newHp:List) {
-            for (Hypothesis oldHp: NodeHP) {
-                if (oldHp.HP.toString().equals(newHp.HP.toString())) { //ipotesi già presente: passo alla prossima
-                    continue loop;
-                }
-            }
-            Hypothesis copyHP=new Hypothesis(newHp.HP, newHp.isDeleted);
-            copyHP.fromNode=newHp.fromNode;
-            NodeHP.add(copyHP);
-        }
-    }
-
-    /*****************************************/
-    /******* Algoritmo di ricerca del ********/
-    /******* focus: restituisce false ********/
-    /******* se la dimostrazione è completa***/
-
-    public boolean searchFocus(Node caller)
-    {
-        if (Children.size()==0) //caso base: controllo se il focus può essere su di me
-        {
-            if (status!=OPEN && status!=FAKE) //nodo chiuso: il focus non può essere su di me
-                return false;
-            hasFocus=true;                             //posso assumere il focus
-            if (handler!=null)
-                handler.onClick(view);
-            return true;
-        }
-        //passo induttivo: vado su tutti i miei figli, poi su mio padre. Termino se il padre è null.
-        for (Node n:Children) {
-            if (caller != null)
-                if (n == caller) //per ogni figlio diverso dal chiamante
-                {
-                    continue;
-                }
-            if(n.searchFocus(null))
-                return true;
-        }
-        if (caller==null) //ero stato chiamato da mio padre: è inutile richiamarlo
-            return false;
-        else if (Father==null)
-            return false; //padre null: l'albero è dimostrato e non ci sono nodi a cui dare il focus.
-        else
-            return Father.searchFocus(this); //propaga il searchFocus sul padre
-    }
-    public void addChild(Node N) {
-        N.Father = this;
-        Children.add(N);
-        Node tmp=Father;
-        //c'è un nuovo nodo nell'albero: tutti i campi dell'algoritmo di disegno sono da ricalcolare per questo ramo
-        baseLine=FIELD_UNSET;
-        maxWidth=FIELD_UNSET;
-        leftOffset=FIELD_UNSET;
-        rightOffset=FIELD_UNSET;
-        while (tmp!=null)
-        {
-            tmp.baseLine=FIELD_UNSET;
-            tmp.leftOffset=FIELD_UNSET;
-            tmp.rightOffset=FIELD_UNSET;
-            tmp.maxWidth=FIELD_UNSET;
-            tmp=tmp.Father;
-        }
-    }
-
-    public float getBaseWidth() {
-        return F.size();
-    }
-
-    public float getMaxWidth() //ritorna la larghezza massima del sottoalbero
-    {
-        if (maxWidth!=FIELD_UNSET)
-            return maxWidth;
-        else
-            maxWidth=getLeftOffset()+getBaseWidth()+getRightOffset();
-        return (maxWidth);
-    }
-
-    public float getLineWidth()
-    {
-        if (baseLine!=FIELD_UNSET)
-            return baseLine;
-        else
-        {
-            baseLine=Math.max(getUpLine(),getBaseWidth()); //la baseline è il massimo valore tra la upLine e la baseWidth
-            return baseLine;
-        }
-    }
-    public float getUpLine() //calcola la upLine, ovvero la dimensione prevista del sottoalbero assumendo il nodo attuale di lunghezza unitaria
-    {
-        float spaceSize= DrawActivity.spaceSize;
-        if (Children.size()==0)
-            return(getBaseWidth());
-        int res=0;
-        for(Node n:Children)
-            res+=(n.getMaxWidth())+spaceSize;
-        res-=spaceSize;
-        res-=Children.get(0).getLeftOffset(); //la linea deve fermarsi all'inizio della formula del primo figlio sinistro
-        res-=Children.get(Children.size()-1).getRightOffset(); //la linea deve finire alla fine della formula dell'ultimo figlio destro
-        return res;
-    }
-
-    /**Calcolo del leftOffset
-     * esso è uguale al leftOffset del primo figlio, a cui aggiungere la porzione di overline a sinistra della formula del nodo
-     * o rimuovere la mezza differenza tra la baseWidth e la upLine. Se il leftOffset risulterebbe negativo, diventa nullo.
-     */
-
-    public float getLeftOffset() {
-        if (leftOffset != FIELD_UNSET) {
-            return leftOffset;
-        }
-        else {
-            if (Children.size() == 0) //foglia
-                leftOffset=0;
-            else
-                leftOffset=Math.max(Children.get(0).getLeftOffset() + ((getUpLine() - getBaseWidth()) / 2),0);
-            return leftOffset;
-        }
-    }
-
-    public float getRightOffset()
-    {
-        if (rightOffset!=FIELD_UNSET)
-            return rightOffset;
-        else {
-            if (Children.size() == 0) //foglia
-                rightOffset=0;
-            else
-                rightOffset=Math.max(Children.get(Children.size() - 1).getRightOffset() + ((getUpLine() - getBaseWidth()) / 2),0);
-            return rightOffset;
-        }
-    }
-
-    public float getMaxHeight() //calcolo dell'altezza massima dell'albero attuale.
-    {
-        float baseRes=F.height();
-        float res=baseRes;
-        for (Node n:Children)
-        {
-            float tempH=n.getMaxHeight()+baseRes;
-            if(tempH>res)
-                res=tempH;
-        }
-        return res;
-    }
-
-    void Refactor() //metodo di supporto: svuota i campi dell'intero sottoalbero che verranno ricalcolati dall'algoritmo alla prossima applicazione
-    {
-        baseLine=FIELD_UNSET;
-        leftOffset=FIELD_UNSET;
-        rightOffset=FIELD_UNSET;
-        maxWidth=FIELD_UNSET;
-        for(Node n:Children)
-            n.Refactor();
-    }
-
-
-    public void Clean() //metodo di supporto: rimuove dal layout legato al Node tutte le view presenti
-    {
-        global.removeAllViews();
-    }
-
-    public boolean isCorrect() //controlla per l'intero sottoalbero se esso è privo di nodi fake.
-    {
-        if (status==FAKE || status==FAKE_CANCELED || status==FAKE_CLOSED)
-            return false;
-        else for (Node n:Children)
-            if (!n.isCorrect())
-                return false;
-        return true;
-
-    }
-
-    public void Draw()
-    {
-        float interval=0; //intervallo di spazio da sommare nella creazione dei figli
-        float spaceSize= DrawActivity.spaceSize; //dimensione della spaziatura tra i sottoalberi
-        int childNo=Children.size(); //numero di figli del nodo attuale
-        if (childNo==0) //foglia: possibile ramo dimostrato
-
-        {
-            view.setBorders(null); //le foglie non hanno overline
-            if (status!=OPEN && status!=FAKE) { //nodo chiuso
-                view.setTextColor(Color.GRAY);
-                if (hasFocus) //avevo il focus: provo a darlo ad uno dei miei fratelli
-                {
-                    if (!(Father.searchFocus(this))) { //focus inapplicabile nell'albero: dimostrazione completata.
-                        DrawActivity.finishedTree(view.getContext());
-                        return;
-                    }
-                    hasFocus = false;
-                }
-                if (status==CANCELED || status==FAKE_CANCELED) { //nodo cancellato
-                    view.setWidth((int) F.sizeDeleted());
-                    view.setText(F.toStringDeleted());
-                    view.setOnClickListener(null); //rimuove eventuali listener per evitare il proseguimento dell'albero
-                    /**NOTA: è possibile permettere all'utente di proseguire la dimostrazione
-                     * di un ramo chiuso commentando la riga precedente e aggiungendo nel touchnodeHandler
-                     * un'controllo che, in caso di nodo chiuso cliccato, lo riapre e gli riaffida il focus.
-                     */
-                }
-                return;
-            }
-            if (hasFocus && DrawActivity.selectedNode!=this)
-                handler.onClick(view);
-            else if (hasFocus) //hasFocus: must be colored red anyway
-                view.setTextColor(Color.RED);
-            return;
-        }
-
-        ruleView.setText(ruleName);
-        ruleView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize / 2);
-        RelativeLayout.LayoutParams intlp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-        intlp.addRule(RelativeLayout.RIGHT_OF,view.getId());
-        intlp.addRule(RelativeLayout.ABOVE,view.getId());
-        ruleView.setLayoutParams(intlp);
-        global.addView(ruleView);
-
-        hasFocus=false; //se sono arrivato a questo punto il nodo non è una foglia e non può avere il focus di default
-
-        for (int i=0;i<childNo;i++) {
-            final Node newChild=Children.get(i); //recupero l'i-esimo figlio
-            RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-            final BorderedTextView childView=new BorderedTextView(view.getContext());
-            childView.setBorders(DrawActivity.b);
-            lp.addRule(RelativeLayout.ABOVE, view.getId());
-            if (i==0) //first child
-            {
-                float leftPos= view.getLeft()-Math.max((newChild.getLineWidth()-newChild.getBaseWidth())/2,0); //il primo figlio è posizionato a sinistra del padre, con un ulteriore offset
-                                                                                                               // sinistro pari allo scarto della sua overline
-                if (getLineWidth()>getUpLine()) //sono più grande dell'overline prevista: aggiungo un ulteriore offset al figlio
-                    leftPos+=((getLineWidth()-getUpLine())/2);
-                lp.setMargins(Math.round(leftPos), 0, 0, 0); //leftPos è il margine sinistro del figlio
-                childView.setLeft(Math.round(leftPos));
-            }
-            else {
-                lp.setMargins(Math.round(view.getLeft() + interval), 0, 0, 0); //figlio intermedio: basta aggiungere l'interval alla posizione sinistra del padre
-                childView.setLeft(Math.round(view.getLeft() + interval));
-            }
-            childView.setLayoutParams(lp);
-            childView.setId(DrawActivity.globalId++);
-            childView.setText(newChild.F.toString());
-            childView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize);
-            childView.setGravity(Gravity.CENTER); //formula al centro della sua overline
-            childView.setWidth(Math.round(newChild.getLineWidth()));
-            global.addView(childView);
-            childView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
-                @Override
-                public void onGlobalLayout() {
-                    newChild.setView(childView,global);
-                    if(newChild.handler==null)
-                        newChild.handler=new touchnodeHandler(newChild);
-                    newChild.longHandler=new longnodeHandler(newChild);
-                    newChild.view.setOnClickListener(newChild.handler);
-                    newChild.view.setOnLongClickListener(newChild.longHandler);
-                    childView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
-                    newChild.Draw();
-                }
-            });
-            if (i!=childNo-1) //l'ultimo figlio non ha intervalli
-            {
-                float leftOverflow=Math.max((Children.get(i+1).getLineWidth()-Children.get(i+1).getBaseWidth())/2,0);
-                interval += (newChild.getBaseWidth()+newChild.getRightOffset()+Children.get(i+1).getLeftOffset()-(leftOverflow)); //devo aggiungere all'interval la basewidth del figlio attuale, il rightoffset del figlio attuale e il leftOffset del figlio successivo.
-                interval+=spaceSize;
-                if (i!=0) //devo sommare anche il leftOverflow del nuovo figlio
-                    interval+=newChild.getLeftOffset();
-            }
-        }
-    }
-    void Resize() //metodo per ridisegnare l'albero dopo un pinch zoom: l'algoritmo applicato è uguale a quello del metodo Draw()
-    {
-        int i;
-        float interval=0; //intervallo di spazio da sommare nella creazione dei figli
-        float spaceSize= DrawActivity.spaceSize;
-        int childNo=Children.size();
-        if (childNo!=0)
-        {
-
-            ruleView.setText(ruleName);
-            ruleView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize / 2);
-            RelativeLayout.LayoutParams intlp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-            intlp.addRule(RelativeLayout.RIGHT_OF,view.getId());
-            int sum=0;
-            sum+=F.height();
-            Node tmp=Father;
-            while (tmp!=null)
-            {
-                sum+=tmp.F.height();
-                tmp=tmp.Father;
-            }
-            intlp.setMargins(0,0,0,sum);
-            intlp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
-            ruleView.setLayoutParams(intlp);
-        }
-        for (i=0;i<childNo;i++) {
-            Node newChild=Children.get(i);
-            RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-            TextView childView=Children.get(i).view;
-            lp.addRule(RelativeLayout.ABOVE,view.getId());
-            if (i==0) //first child
-            {
-                float leftPos= view.getLeft()-Math.max((newChild.getLineWidth()-newChild.getBaseWidth())/2,0);
-                if (getLineWidth()>getUpLine())
-                    leftPos+=((getLineWidth()-getUpLine())/2);
-                lp.setMargins(Math.round(leftPos), 0, 0, 0);
-                childView.setLeft(Math.round(leftPos));
-            }
-            else {
-                lp.setMargins(Math.round(view.getLeft() + interval), 0, 0, 0);
-                childView.setLeft(Math.round(view.getLeft() + interval));
-            }
-            childView.setLayoutParams(lp);
-            childView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize);
-
-            if(newChild.status==CANCELED || newChild.status==FAKE_CANCELED)
-                childView.setWidth((int) ((newChild.F.sizeDeleted())));
-            else
-                childView.setWidth(Math.round(newChild.getLineWidth()));
-
-            newChild.Resize();
-
-            if (i!=childNo-1) //l'ultimo figlio non ha intervalli
-            {
-                float leftOverflow=(Children.get(i+1).getLineWidth()-Children.get(i+1).getBaseWidth())/2;
-                interval += (newChild.getBaseWidth()+newChild.getRightOffset()+Children.get(i+1).getLeftOffset()-(leftOverflow));
-                interval+=spaceSize;
-                if (i!=0) //devo sommare anche il leftOverflow del nuovo figlio
-                    interval+=newChild.getLeftOffset();
-            }
-
-        }
-
-    }
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleAndElimination.java b/mainActivity/src/com/example/furt/myapplication/RuleAndElimination.java
deleted file mode 100755 (executable)
index 5970a86..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class RuleAndElimination implements EliminationRule
-{
-    String ruleName;
-    FormulaAnd Fn;
-    RuleAndElimination(FormulaAnd F){
-        Fn=F;
-        ruleName="∧e";
-    }
-    public Node createNodes(Formula F,askFormula ask)
-    {
-            Formula C;
-            if (F==null) //applicazione Top-Down: chiamo la callback
-                C=ask.Ask();
-            else
-                C=F; //applicazione bottom-up: il nuovo nodo è la formula F passata
-            Node cNode=new Node(C);
-            if ((C.toString().equals(Fn.leftF.toString())) || (C.toString().equals(Fn.rightF.toString()))) //Posso utilizzare le regole di eliminazione sinistra o destra
-            {
-                cNode.addChild(new Node(Fn));
-                cNode.ruleName=ruleName;
-                return cNode;
-            }
-            Node elNode=new Node(Fn);
-            List<Formula> HP=new ArrayList<Formula>();
-            HP.add(Fn.leftF);
-            HP.add(Fn.rightF);
-            cNode.addHPFormula(HP,true);
-            Node rNode=new Node(C);
-            rNode.addChild(elNode);
-            rNode.addChild(cNode);
-            rNode.ruleName=ruleName;
-            return rNode;
-    }
-}
-
-
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleBotElimination.java b/mainActivity/src/com/example/furt/myapplication/RuleBotElimination.java
deleted file mode 100755 (executable)
index 501dfe5..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.example.furt.myapplication;
-
-public class RuleBotElimination implements EliminationRule
-{
-    String ruleName;
-    FormulaBOT Fn;
-    RuleBotElimination(FormulaBOT F)
-    {
-        Fn=F;
-        ruleName="⊥e";
-    }
-    public Node createNodes(Formula F,askFormula ask)
-    {
-        Formula C;
-        if (F!=null)
-            C=F;
-        else
-            C=ask.Ask();
-        Node elNode=new Node(Fn);
-        Node rNode=new Node(C);
-        rNode.addChild(elNode);
-        rNode.ruleName=ruleName;
-        return rNode;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleDialog.java b/mainActivity/src/com/example/furt/myapplication/RuleDialog.java
deleted file mode 100755 (executable)
index 1cffd89..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.widget.RelativeLayout;
-import android.widget.Toast;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class RuleDialog extends DialogFragment {
-    List<IntroductionRule> rules;
-    boolean showAllRules;
-    public RuleDialog(List<IntroductionRule> r)
-    {
-        rules=new ArrayList<IntroductionRule>();
-        rules.addAll(r);
-        showAllRules=false;
-    }
-    @Override
-    public Dialog onCreateDialog(final Bundle savedInstanceState) {
-        // Use the Builder class for convenient dialog construction
-        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-        int prules=0;
-        for (IntroductionRule r:rules)
-            if (r.getPriority()>0)
-                prules++;
-        if (prules==0 && !showAllRules)
-        {
-            showAllRules=true;
-            reboot();
-            dismiss();
-            return builder.create();
-        }
-        LayoutInflater inflater=getActivity().getLayoutInflater();
-        View view=inflater.inflate(R.layout.ruledialog,null);
-        RelativeLayout layout=(RelativeLayout)((ViewGroup)((ViewGroup)view).getChildAt(0)).getChildAt(0);
-        int ruleInterval=50;
-        for (IntroductionRule rule : rules) {
-            if (!showAllRules && rule.getPriority() == 0)
-                continue; //only high priority: skip this node
-            final Node drawNode = rule.createNodes(new askFormula());
-            BorderedTextView t = new BorderedTextView(layout.getContext());
-            t.setId(DrawActivity.globalId);
-            DrawActivity.globalId++;
-            drawNode.setView(t, layout);
-            RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-            lp.setMargins(ruleInterval, 0, 0, 0);
-            ruleInterval += 2 * drawNode.getMaxWidth();
-            lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, drawNode.view.getId());
-            drawNode.view.setLayoutParams(lp);
-            drawNode.view.setBorders(DrawActivity.b);
-            drawNode.view.setTextSize(TypedValue.COMPLEX_UNIT_PX, DrawActivity.textSize);
-            drawNode.view.setWidth(Math.round(drawNode.getLineWidth())); //setto la larghezza della view al contenuto della linea
-            drawNode.view.setGravity(Gravity.CENTER); //formula al centro della sua overline
-            drawNode.view.setText(drawNode.F.toString()); //setta il contenuto della formula
-            drawNode.global.addView(drawNode.view);
-            drawNode.handler = new DialogTouchHandler(drawNode);
-            for (Node n : drawNode.Children) {
-                n.handler = new DialogTouchHandler(drawNode);
-            }
-            //inserisco un listener a rootView da attivare quando sono state fissate le coordinate nel RelativeLayout
-            drawNode.view.getViewTreeObserver().addOnGlobalLayoutListener(
-                    new ViewTreeObserver.OnGlobalLayoutListener() {
-                        @Override
-                        public void onGlobalLayout() {
-                            drawNode.global.setPadding(0, 0, (int) Math.max(drawNode.getRightOffset(), 50), 0); //MAXWIDTH non provoca lo scroll involontario dello schermo.
-                            drawNode.global.getLayoutParams().height = (int) Math.max(100, drawNode.getMaxHeight());
-                            drawNode.global.requestLayout();
-                            drawNode.view.setOnClickListener(drawNode.handler);
-                            drawNode.hasFocus = true;
-                            drawNode.view.getViewTreeObserver().removeOnGlobalLayoutListener(this); //rimuove il listener per evitare che l'albero sia creato ad ogni modifica del layout
-                            drawNode.Draw();
-                        }
-                    });
-        }
-        builder.setView(view);
-        builder.setTitle("Scegli una regola:");
-        builder.setPositiveButton("Incolla sottoalbero",new DialogInterface.OnClickListener() {
-            @Override
-            public void onClick(DialogInterface dialog, int which) {
-                if (DrawActivity.copiedNode == null) //non ci sono nodi da copiare
-                {
-                    Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile incollare: nessun nodo copiato",Toast.LENGTH_LONG).show();
-                }
-                else if (!checkHP(DrawActivity.copiedNode, DrawActivity.selectedNode)) //ipotesi incompatibili: impossibile incollare in questo punto
-                    Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile incollare: sottoalberi incompatibili",Toast.LENGTH_LONG).show();
-                else {
-                    Node tmp = duplicateNode(DrawActivity.copiedNode); //duplica il nodo copiato
-                    DrawActivity.selectedNode.ruleName=tmp.ruleName; //eredita il nome della regola
-                    DrawActivity.selectedNode.Children = new ArrayList<Node>();
-                    for (Node c:tmp.Children)
-                        DrawActivity.selectedNode.addChild(c); //incolla il sottoalbero del nodo copiato nella posizione richiesta
-                    DrawActivity.rootNode.Clean();
-                    DrawActivity.startDraw();
-                }
-            }
-        });
-        if (!showAllRules) {
-            builder.setNeutralButton("Mostra tutte", new DialogInterface.OnClickListener() {
-                public void onClick(DialogInterface dialog, int id) {
-                    showAllRules=true;
-                    reboot();
-                }
-            });
-        }
-        else {
-            builder.setNeutralButton("Nascondi", new DialogInterface.OnClickListener() {
-                public void onClick(DialogInterface dialog, int id) {
-                    showAllRules=false;
-                    reboot();
-                }
-            });
-        }
-        builder.setNegativeButton("Annulla", new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int id) {
-            }
-        });
-        // Create the AlertDialog object and return it
-        return builder.create();
-    }
-    void reboot()
-    {
-        touchnodeHandler.ruleDialog=new RuleDialog(rules);
-        touchnodeHandler.ruleDialog.showAllRules=showAllRules;
-        touchnodeHandler.ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
-    }
-
-    public boolean checkHP(Node source,Node target) //controlla se le ipotesi di source sono compatibili per una copia in target
-    {
-        boolean found=false;
-        if (!source.F.toString().equals(target.F.toString())) //se i nodi non hanno la stessa formula la copia è automaticamente impossibile
-            return false;
-        for (Hypothesis sourceHp:source.NodeHP) {
-            for (Hypothesis destHp : target.NodeHP) {
-                if (destHp.HP.toString().equals(sourceHp.HP.toString())) { //per ogni ipotesi nel nodo sorgente cerco se è disponibile nel nodo destinazione: in caso affermativo, proseguo il ciclo (found=true).
-                    found = true;
-                    break;
-                }
-            }
-            if (!found)
-                return false;
-            else found=false;
-        }
-        return true;
-    }
-
-    public Node duplicateNode(Node src) //metodo di supporto che duplica un nodo
-    {
-        Node tmp=new Node(src.F);
-        tmp.addHPList(src.NodeHP);
-        tmp.ruleName=src.ruleName;
-        for (Node n:src.Children) {
-            tmp.addChild(duplicateNode(n));
-        }
-        return tmp;
-    }
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleImplElimination.java b/mainActivity/src/com/example/furt/myapplication/RuleImplElimination.java
deleted file mode 100755 (executable)
index f2fd1ff..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.example.furt.myapplication;
-
-public class RuleImplElimination implements EliminationRule
-{
-    String ruleName;
-    FormulaImpl Fn;
-    RuleImplElimination(FormulaImpl F)
-    {
-        Fn=F;
-        ruleName="⇒e";
-    }
-    public Node createNodes(Formula F,askFormula ask)
-    {
-        Formula C;
-        if (F==null) {
-            C=ask.Ask();
-            if (!(C.toString().equals(Fn.rightF.toString())))
-                return null;
-        }
-        else
-            if (!(F.toString().equals(Fn.rightF.toString())))
-                return null;
-            Node elNode=new Node(Fn);
-            Node lNode=new Node(Fn.leftF);
-            Node bNode=new Node(Fn.rightF);
-            bNode.addChild(elNode);
-            bNode.addChild(lNode);
-            bNode.ruleName=ruleName;
-            return bNode;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleIntroduction.java b/mainActivity/src/com/example/furt/myapplication/RuleIntroduction.java
deleted file mode 100755 (executable)
index ed0b6a1..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.example.furt.myapplication;
-
-//Regole di introduzione per la deduzione top-down: la formula è sempre applicabile, per cui la regola si limita
-//a chiamare la callback e restituire il sottoalbero di nodi conseguente all'applicazione della regola
-public class RuleIntroduction implements IntroductionRule
-{
-    int priority;
-    Node tempRule;
-    String ruleName;
-    public RuleIntroduction(String name,int p)
-    {
-        ruleName=name; priority=p;
-    }
-    public Node createNodes(askFormula ask)
-    {
-        Formula C=ask.Ask();
-        for (Node n:tempRule.Children)
-        {
-            if (n.F.toString().equals(" ")) //undefined formula
-                n.F=C;
-            n.ruleName=ruleName;
-        }
-        tempRule.ruleName=ruleName;
-        return tempRule;
-    }
-    public int getPriority()
-    {
-        return priority;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleNotElimination.java b/mainActivity/src/com/example/furt/myapplication/RuleNotElimination.java
deleted file mode 100755 (executable)
index 7c7aaca..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.example.furt.myapplication;
-
-public class RuleNotElimination implements EliminationRule
-{
-    String ruleName;
-    FormulaNot Fn;
-    RuleNotElimination(FormulaNot F)
-    {
-        Fn=F;
-        ruleName="¬e";
-    }
-    public Node createNodes(Formula F,askFormula ask)
-    {
-        Formula C=ask.Ask();
-        if ((C.toString().equals("⊥"))&&(F==null ||F==Fn.Operand)) //top-down con nodo attuale bottom o bottom-up con nodi attuali Fn e !Fn
-        {
-            Node elNode=new Node(Fn);
-            Node cNode=new Node(Fn.Operand);
-            Node rNode=new Node(C);
-            rNode.addChild(elNode);
-            rNode.addChild(cNode);
-            rNode.ruleName=ruleName;
-            return rNode;
-        }
-        else
-            return null;
-    }
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/RuleOrElimination.java b/mainActivity/src/com/example/furt/myapplication/RuleOrElimination.java
deleted file mode 100755 (executable)
index 75d1a77..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class RuleOrElimination implements EliminationRule
-{
-    String ruleName;
-    FormulaOr Fn;
-    RuleOrElimination(FormulaOr F)
-    {
-        Fn=F;
-        ruleName="∨e";
-    }
-    public Node createNodes(Formula F,askFormula ask)
-    {
-        Formula C;
-        if (F==null)
-            C=ask.Ask();
-        else
-            C=F;
-            Node elNode=new Node(Fn);
-            Node c1Node=new Node(C);
-            Node c2Node=new Node(C);
-            List<Formula> HP1=new ArrayList<Formula>();
-            List<Formula> HP2=new ArrayList<Formula>();
-            HP1.add(Fn.leftF);
-            HP2.add(Fn.rightF);
-            c1Node.addHPFormula(HP1,true);
-            c2Node.addHPFormula(HP2,true);
-            Node rNode=new Node(C);
-            rNode.addChild(elNode);
-            rNode.addChild(c1Node);
-            rNode.addChild(c2Node);
-            rNode.ruleName=ruleName;
-            return rNode;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/ServerData.java b/mainActivity/src/com/example/furt/myapplication/ServerData.java
deleted file mode 100755 (executable)
index 2466f27..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-// simple class that just has one member property as an example
-public class ServerData implements Parcelable {
-    private static List<String> L;
-
-    ServerData(List<String> List)
-    {
-        L=List;
-    }
-    /* everything below here is for implementing Parcelable */
-
-    // 99.9% of the time you can just ignore this
-    public int describeContents() {
-        return 0;
-    }
-
-    // write your object's data to the passed-in Parcel
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeList(L);
-    }
-
-    // this is used to regenerate your object. All Parcelables must have a CREATOR that implements these two methods
-    public static final Creator<ServerData> CREATOR = new Creator<ServerData>() {
-        public ServerData createFromParcel(Parcel in) {
-            return new ServerData(L);
-        }
-
-        public ServerData[] newArray(int size) {
-            return new ServerData[size];
-        }
-    };
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/Tree.java b/mainActivity/src/com/example/furt/myapplication/Tree.java
deleted file mode 100755 (executable)
index 87c2b28..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.furt.myapplication;
-
-public interface Tree
-{
-        float getBaseWidth();
-        float getMaxWidth();
-        float getLineWidth();
-        float getUpLine();
-        float getLeftOffset() ;
-        float getRightOffset();
-        void Draw();
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/UndefinedFormula.java b/mainActivity/src/com/example/furt/myapplication/UndefinedFormula.java
deleted file mode 100755 (executable)
index c5885a0..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Paint;
-
-import java.util.List;
-
-public class UndefinedFormula implements Formula{
-
-    Paint p=new Paint();
-    int priority;
-    boolean currentF; //indica se la formula è quella su cui sta lavorando il parser per l'inserimento di ipotesi
-    UndefinedFormula()
-    {
-        priority=100;
-        currentF=false;
-    }
-    public String Draw(int x)
-    {
-        if(currentF) //la formula corrente visualizza un _
-            return "_";
-        else
-           return " ";
-    }
-    public String toString(){return Draw(0);}
-    public String toStringDeleted(){return null;} //UndefinedFormula non può essere scaricata
-    public float size(){
-        p.setTextSize(DrawActivity.textSize);
-        return p.measureText(toString());
-    }
-    public float height()
-    {
-        return 0;
-    } //UndefinedFormula non ha dimensioni e non accetta regole
-    public float sizeDeleted(){return(0);}
-    public List<IntroductionRule> introductionRules(){
-        return null;
-    }
-    public List<EliminationRule> EliminationRules(){
-        return null;
-    }
-
-    @Override
-    public boolean Fill(Formula F) {
-        return false;
-    }
-
-    @Override
-    public boolean setCursor() {
-        currentF=true;
-        return true;
-    }
-
-    @Override
-    public Formula duplicate() {
-        UndefinedFormula tmp=new UndefinedFormula();
-        tmp.currentF=this.currentF;
-        return tmp;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/aggiorna.java b/mainActivity/src/com/example/furt/myapplication/aggiorna.java
deleted file mode 100755 (executable)
index 7ea276d..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import android.content.Context;
-import android.os.AsyncTask;
-import android.os.Environment;
-import android.widget.Toast;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-public class aggiorna {
-
-    aggiorna(){}
-
-    public String sincronizza(String sessionKey,String user,String pass) {
-        String ritorno = null;
-        String login = "1/" + user + "/" + pass;
-        while (ritorno == null || ritorno.contains("request-login"))
-        {
-            ritorno = serverSync(sessionKey, user);
-            if(ritorno == null || ritorno.contains("request-login"))
-            {
-                sessionKey= serverComunication.connessione(login);
-            }
-            else if(ritorno.contains("error"))
-                Toast.makeText(aggiornamento.t.getContext().getApplicationContext(), "errore di connessione", Toast.LENGTH_SHORT).show();
-        }
-        ritorno=null;
-        while (ritorno == null || ritorno.contains("request-login"))
-        {
-            ritorno = syncLocaldb(sessionKey, user);
-            if(ritorno == null || ritorno.contains("request-login"))
-            {
-                sessionKey= serverComunication.connessione(login);
-            }
-            else if(ritorno.contains("error"))
-                Toast.makeText(aggiornamento.t.getContext().getApplicationContext(), "errore di connessione", Toast.LENGTH_SHORT).show();
-        }
-        ritorno=null;
-        while (ritorno == null || ritorno.contains("request-login"))
-        {
-            ritorno=downloadEX(sessionKey);
-            if(ritorno == null || ritorno.contains("request-login"))
-            {
-                sessionKey= serverComunication.connessione(login);
-            }
-            else if(ritorno.contains("error"))
-                Toast.makeText(aggiornamento.t.getContext().getApplicationContext(), "errore di connessione", Toast.LENGTH_SHORT).show();
-        }
-        return sessionKey;
-    }
-
-    public String serverSync(String sessionKey, String user)
-    {
-        personalDBHelper connessione = new personalDBHelper(aggiornamento.t.getContext());
-        List<listElem> esercizi=connessione.getElem(user);
-        if(esercizi!=null && !esercizi.isEmpty()) {
-
-            for (listElem esercizio : esercizi) {
-                String richiesta = "8/" + sessionKey + "/" + esercizio.getEsercizio() + "/" + esercizio.getMd5() + "/" + esercizio.getTime() + "/" + esercizio.getClick();
-                String ritorno = serverComunication.connessione(richiesta);
-                if (ritorno.contains("es-ok"))
-                    connessione.updateElem(esercizio.getMd5(), user, esercizio.getTime());
-                else if (ritorno.contains("request-login") || ritorno.contains("es-err")){
-                   if(ritorno.contains("es-err"))
-                        connessione.remove(esercizio.getUtente(),esercizio.getTime());
-                    return ritorno;
-                 }
-            }
-        }
-        return "sync-ok";
-    }
-
-    public String syncLocaldb(String sessionKey, String utente)
-    {
-        String richiesta = "9/" + sessionKey;
-        String ritorno = serverComunication.connessione(richiesta);
-        if(ritorno.contains("request-login"))
-            return ritorno;
-        else
-        {
-            personalDBHelper connessione=new personalDBHelper(aggiornamento.t.getContext().getApplicationContext());
-            ArrayList<String> allExercise=suString.stringToMultiArray(ritorno);
-            List<listElem> localExercise=connessione.getAllElem(utente);
-            if(localExercise!=null && !localExercise.isEmpty()) {
-                for (String ex : allExercise) {
-                    ArrayList<String> tmp = suString.stringToArrayList(ex);
-                    boolean add = true;
-                    for (listElem elem : localExercise) {
-                        if (tmp.get(0).equals(elem.getEsercizio()) && Double.valueOf(tmp.get(2)) == elem.getTime()) {
-                            if (elem.getCheck() == 0)
-                                connessione.updateElem(tmp.get(1), utente, Double.valueOf(tmp.get(2)));
-                            add = false;
-                        }
-                    }
-                    if (add)
-                        if(tmp.size()>3)
-                            connessione.add(utente, tmp.get(0), tmp.get(1), Double.valueOf(tmp.get(2)), Integer.valueOf(tmp.get(3)), 1);
-                }
-            }
-            else{
-                for (String ex : allExercise) {
-                    ArrayList<String> tmp = suString.stringToArrayList(ex);
-                    if(tmp.size()>3)
-                        connessione.add(utente, tmp.get(0), tmp.get(1), Double.valueOf(tmp.get(2)), Integer.valueOf(tmp.get(3)), 1);
-                }
-            }
-        }
-        return "local-sync-ok";
-    }
-
-    public String downloadEX(String sessionKey)
-    {
-        Context context = aggiornamento.t.getContext();
-        File SDCardRoot = Environment.getExternalStorageDirectory();
-        String[] names = SDCardRoot.list();
-        String ritorno=null;
-        boolean go = true;
-        for (String name : names) {
-            if (name.compareTo("tesiEs") == 0) {
-                go = false;
-                break;
-            }
-        }
-        if (go) {
-            File dir = new File(global.esDir);
-            dir.mkdir();
-        }
-        try {
-            ritorno = serverComunication.connessione("7/" + sessionKey);
-            if (!ritorno.contains("error") && !ritorno.contains("request-login"))
-            {
-                ArrayList<String> esercizi= suString.stringToMultiArray(ritorno);
-                File dir = new File(global.esDir);
-                String[] presenti = dir.list();
-                boolean tmp = true;
-                for(String esercizio : esercizi)
-                {
-                    ArrayList<String> es=suString.stringToArrayList(esercizio);
-                    tmp = true;
-                    for (String nome : presenti) {
-                        if (nome.contentEquals(es.get(0))) {
-                            if ((MD5.digest(nome)).contentEquals(es.get(1))) {
-                                tmp = false;
-                            }
-                            else {
-                                File file = new File(global.esDir + nome);
-                                file.delete();
-                            }
-                        }
-                    }
-                    if (tmp) {
-                        String request = new download().execute(es.get(0)).get();
-                    }
-                }
-            }
-        }catch (Exception e)
-        {
-            e.printStackTrace();
-        }
-        return ritorno;
-    }
-}
-class download extends AsyncTask<String,String,String>
-{
-    @Override
-    protected String doInBackground(String... params)
-    {
-        try {
-            //set the download URL, a url that points to a file on the internet
-            //this is the file to be downloaded
-            URL url = new URL(global.httpHost+params[0]);
-
-            //create the new connection
-            HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
-
-            //set up some things on the connection
-            urlConnection.setRequestMethod("GET");
-            urlConnection.setDoOutput(true);
-
-            //and connect!
-            urlConnection.connect();
-
-            //set the path where we want to save the file
-            //in this case, going to save it on the root directory of the
-            //sd card.
-            File SDCardRoot = Environment.getExternalStorageDirectory();
-            File esDir = new File(global.esDir);
-            //create a new file, specifying the path, and the filename
-            //which we want to save the file as.
-
-
-            File file = new File(esDir,params[0]);
-            //this will be used to write the downloaded data into the file we created
-            FileOutputStream fileOutput = new FileOutputStream(file);
-
-            //this will be used in reading the data from the internet
-            InputStream inputStream = urlConnection.getInputStream();
-
-            //this is the total size of the file
-            int totalSize = urlConnection.getContentLength();
-            //variable to store total downloaded bytes
-            int downloadedSize = 0;
-
-            //create a buffer...
-            byte[] buffer = new byte[1024];
-            int bufferLength = 0; //used to store a temporary size of the buffer
-
-            //now, read through the input buffer and write the contents to the file
-            while ( (bufferLength = inputStream.read(buffer)) > 0 ) {
-                //add the data in the buffer to the file in the file output stream (the file on the sd card
-                fileOutput.write(buffer, 0, bufferLength);
-                //add up the size so we know how much is downloaded
-                downloadedSize += bufferLength;
-                //this is where you would do something to report the prgress, like this maybe
-                //updateProgress(downloadedSize, totalSize);
-
-            }
-            //close the output stream when done
-            fileOutput.close();
-
-//catch some possible errors...
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-}
-
diff --git a/mainActivity/src/com/example/furt/myapplication/aggiornamento.java b/mainActivity/src/com/example/furt/myapplication/aggiornamento.java
deleted file mode 100755 (executable)
index ee114a9..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.widget.RelativeLayout;
-
-
-public class aggiornamento extends Activity
-{
-    static RelativeLayout t; //for context
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.aggiornamento);
-        t=(RelativeLayout)findViewById(R.id.glob_agg);
-        Bundle dati=getIntent().getExtras();
-        String user=dati.getString("user");
-        String pass=dati.getString("pass");
-        String sessionKey=dati.getString("sessionKey");
-        if(sessionKey.contentEquals("000000000"))//controllo se le credenziali memorizzate sono corrette
-        {
-            sessionKey = serverComunication.connessione("1/" + user + "/" + pass);
-            if(sessionKey.contentEquals("request-login") || sessionKey.contains("err"))
-            {
-                Intent i = new Intent(getApplicationContext(), mainActivity.class);
-                i.putExtra("logout", "si");
-                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                getApplicationContext().startActivity(i);
-                return;
-            }
-        }
-        aggiorna agg=new aggiorna();
-        sessionKey=agg.sincronizza(sessionKey,user,pass);
-        if(sessionKey.contains("err") || sessionKey.contentEquals("000000000"))
-        {
-            Intent i = new Intent(getApplicationContext(), mainActivity.class);
-            i.putExtra("logout", "si");
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            getApplicationContext().startActivity(i);
-        }
-        else {
-            Intent i = new Intent(getApplicationContext(), download_page.class);
-            i.putExtra("user", user);
-            i.putExtra("pass", pass);
-            i.putExtra("sessionKey", sessionKey);
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            getApplicationContext().startActivity(i);
-        }
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/askFormula.java b/mainActivity/src/com/example/furt/myapplication/askFormula.java
deleted file mode 100755 (executable)
index ca15a35..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.example.furt.myapplication;
-
-/**
- * askFormula(): callback per ottenere informazioni aggiuntive sulla regola da applicare
- */
-public class askFormula{
-    public Formula Ask(){return DrawActivity.selectedNode.F;};
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/download_page.java b/mainActivity/src/com/example/furt/myapplication/download_page.java
deleted file mode 100755 (executable)
index 4541b31..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import java.io.File;
-import java.util.List;
-
-public class download_page extends Activity
-{
-    static String user=null;
-    static String pass=null;
-    static String sessionKey=null;
-    static RelativeLayout globalDownload;
-    static TextView rootDownload;
-    static TextView dw;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        dw=(TextView)findViewById(R.id.startEs);
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.download);
-        final Context context=getApplicationContext();
-        Bundle dati=getIntent().getExtras();
-        globalDownload=(RelativeLayout)findViewById(R.id.dlglobal);
-        rootDownload=(TextView)findViewById(R.id.startEs);
-        user=dati.getString("user");
-        pass=dati.getString("pass");
-        sessionKey=dati.getString("sessionKey");
-        File dir = new File(global.esDir);
-        String[] presenti = dir.list();
-        ArrayAdapter<String> vievList=new ArrayAdapter<String>(this,R.layout.textviewgeneral);
-        ListView lista= (ListView) findViewById(R.id.listView);
-        for (String nome : presenti) {
-            String aggiungi="non risolto";
-            boolean min=false;
-            boolean check=false;
-            personalDBHelper db=new personalDBHelper(context);
-            List<listElem> risolti=db.getElemForName(user, nome);
-            if(risolti!=null && !risolti.isEmpty()) {
-
-                for (listElem elem : risolti) {
-                    if (!min && elem.getCheck() == 0) {
-                        min = true;
-                        aggiungi = "da confermare: " + elem.getClick() + "/30";
-                    } else if (!check && elem.getCheck() == 1) {
-                        min = true;
-                        check = true;
-                        aggiungi = elem.getClick() + "/30";
-                    }
-
-                }
-            }
-            vievList.add(nome+"\n"+aggiungi);
-        }
-        lista.setAdapter(vievList);
-        lista.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                TextView t=(TextView)view;
-                String valore=t.getText().toString();
-                String nomeEs = null;
-                for(int i=0;i<valore.length();i++)
-                {
-                    if(valore.charAt(i)=='.')
-                    {
-                        nomeEs=valore.substring(0,i)+".xml";
-                        i=valore.length();
-                    }
-                }
-                Intent i = new Intent(getApplicationContext(), DrawActivity.class);
-                i.putExtra("nomeEs", nomeEs);
-                i.putExtra("user",user);
-                i.putExtra("pass",pass);
-                i.putExtra("sessionKey",sessionKey);
-                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                getApplicationContext().startActivity(i);
-            }
-        });
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.menu_dow, menu);
-        return true;
-    }
-    @Override
-    public void onBackPressed() {
-        Intent i = new Intent(getApplicationContext(), mainActivity.class);
-        i.putExtra("logout","si");
-        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        getApplicationContext().startActivity(i);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        int id = item.getItemId();
-
-        if(id==R.id.aggiorna)
-        {
-            Intent i = new Intent(getApplicationContext(), aggiornamento.class);
-            i.putExtra("user", user);
-            i.putExtra("pass", pass);
-            i.putExtra("sessionKey", sessionKey);
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            getApplicationContext().startActivity(i);
-        }
-        else if (id==R.id.esci)
-        {
-            Intent i = new Intent(getApplicationContext(), mainActivity.class);
-            i.putExtra("logout","si");
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            getApplicationContext().startActivity(i);
-        }
-        return super.onOptionsItemSelected(item);
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/global.java b/mainActivity/src/com/example/furt/myapplication/global.java
deleted file mode 100755 (executable)
index ccfe2fb..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import android.os.Environment;
-
-public class global {
-    public static String hostName = "130.136.129.1";
-    public static String esDir= Environment.getExternalStorageDirectory()+"/tesiEs/";
-    public static String httpHost="http://logicplayer.helm.cs.unibo.it/esercizi/";
-    public static int port=25000;
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/listElem.java b/mainActivity/src/com/example/furt/myapplication/listElem.java
deleted file mode 100755 (executable)
index bbedd8a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.example.furt.myapplication;
-
-
-public class listElem {
-    private String esercizio;
-    private double time;
-    private int check;
-    private  String md5;
-    private String utente;
-    private int click;
-
-    listElem()
-    {}
-
-    public void setEsercizio(String esercizio)
-    {
-        this.esercizio=esercizio;
-    }
-    public void setTime(double time)
-    {
-        this.time=time;
-    }
-    public void setCheck(int check)
-    {
-        this.check=check;
-    }
-    public void setMd5(String md5){this.md5=md5;}
-    public void setUtente(String utente){this.utente=utente;}
-    public void setClick(int click){this.click=click;}
-
-    public String getUtente(){return  this.utente;}
-    public String getEsercizio()
-    {
-        return this.esercizio;
-    }
-    public String getMd5()
-    {
-        return this.md5;
-    }
-    public double getTime()
-    {
-        return this.time;
-    }
-    public int getCheck()
-    {
-        return this.check;
-    }
-    public int getClick(){return this.click;}
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/longnodeHandler.java b/mainActivity/src/com/example/furt/myapplication/longnodeHandler.java
deleted file mode 100644 (file)
index b17796d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.view.View;
-
-/**LongNodeHandler: handler per la pressione prolungata di un nodo**/
-
-public class longnodeHandler implements View.OnLongClickListener {
-    Node n; //nodo a cui è legato questo handler
-
-    longnodeHandler(Node node) {
-        n = node;
-    }
-
-    @Override
-    public boolean onLongClick(View view) {
-        if (DrawActivity.selectedNode != null)
-            if (DrawActivity.selectedNode.view == view) {
-                if (DrawActivity.selectedNode.Children.size() == 0) { //se l'hold click è stato fatto sul selectedNode ed esso è un nodo foglia
-                        touchnodeHandler.ruleDialog = new RuleDialog(DrawActivity.selectedNode.F.introductionRules());
-                        touchnodeHandler.ruleDialog.showAllRules=true; //nuovo ruleDialog con l'opzione showAllRules già settata
-                        touchnodeHandler.ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
-                }
-            }
-        return true;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/mainActivity.java b/mainActivity/src/com/example/furt/myapplication/mainActivity.java
deleted file mode 100755 (executable)
index 3f456a5..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.TextView;
-import android.widget.Toast;
-
-/*possiamo chiavare la mainActiviti in due casi, il primo è aprendo l'applicazione, il secondo è effettuando il
-* logout. nel primo caso viene controllato se sono state memorizzate delle credenziali e nel caso, il login viene
-* efetttuato direttamente. nel caso in cui si effettua il logout o non sono state memorizzate le credenziali,
-* viene data la possibilità di registrarsi o loggarsi, è possibile tramite il menù recuperare la password o aggiornarla
-* una volta effettuato il login viene passato il controllo ad "aggiorna.java"*/
-
-public class mainActivity extends Activity {
-
-    static TextView t;
-    public static final String PREFS_NAME = "MyPrefsFile";
-    private static final String PREF_USERNAME = "username";
-    private static final String PREF_PASSWORD = "password";
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_login);
-        t = (TextView) findViewById(R.id.login);
-        SharedPreferences pref = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);//recupero le ultime credenziali valide inserite
-        String username = pref.getString(PREF_USERNAME, null);
-        String password = pref.getString(PREF_PASSWORD, null);
-        String logout=null;
-        Bundle dati=getIntent().getExtras();
-        if(dati!=null)//controllo se la mainActivity è stata chiamata dopo un logout
-            logout=dati.getString("logout");
-        if(logout!=null)
-        {
-            username=null;
-            password=null;
-        }
-
-        if (username == null && password == null) {//viene effettuato solo se ci sono delle credenziali memorizzate e se mainActivity non è stata chiamata da un logout
-            Button b = (Button) findViewById(R.id.logout);
-            b.setOnClickListener(new View.OnClickListener() {//routin di gestione del login
-                @Override
-                public void onClick(View v) {
-                    try {
-                        EditText txt = (EditText) findViewById(R.id.userId);//recupero username inserito
-                        EditText txt2 = (EditText) findViewById(R.id.oldPass);//recupero la password inserita
-                        String testo = txt.getText().toString();
-                        String testo2 = txt2.getText().toString();
-                        if(testo.contains("/") || testo2.contains("/"))//controllo che non siano inseriti valori vietati
-                            Toast.makeText(getApplicationContext(),"il carattere '/' non è consentito", Toast.LENGTH_SHORT).show();
-                        else if(testo.isEmpty() || testo2.isEmpty())//controllo che tutti i campi siano completati
-                            Toast.makeText(getApplicationContext(),"riempi i campi", Toast.LENGTH_SHORT).show();
-                        else {//login effettuato con successo
-                            String request = serverComunication.connessioneMain("1/" + testo + "/" + testo2);//richiedo il login al server
-                            if (!request.contains("error")) {
-                                getSharedPreferences(PREFS_NAME, MODE_PRIVATE)//salvo username e password per i prossimi accessi
-                                        .edit()
-                                        .putString(PREF_USERNAME, testo)
-                                        .putString(PREF_PASSWORD, testo2)
-                                        .commit();
-                                Intent i = new Intent(getApplicationContext(), aggiornamento.class);
-                                i.putExtra("user", testo);
-                                i.putExtra("pass", testo2);
-                                i.putExtra("sessionKey", request);
-                                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                                getApplicationContext().startActivity(i);//avvio la "aggiornamento.class"
-                            }
-                            else
-                                Toast.makeText(getApplicationContext(),"credenziali errate", Toast.LENGTH_SHORT).show();
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            });
-            Button b2 = (Button) findViewById(R.id.button2);
-            b2.setOnClickListener(new View.OnClickListener() {//routine di gestione della registrazione
-                @Override
-                public void onClick(View v) {
-
-                    EditText txt = (EditText) findViewById(R.id.userId);
-                    EditText txt2 = (EditText) findViewById(R.id.oldPass);
-                    String testo = txt.getText().toString();
-                    String testo2 = txt2.getText().toString();
-                    if(testo.isEmpty() || testo2.isEmpty())
-                        Toast.makeText(getApplicationContext(),"riempi i campi", Toast.LENGTH_SHORT).show();
-                    else {
-                        try {
-                            serverComunication connect = new serverComunication();
-                            String request = connect.connessioneMain("0/" + testo + "/" + testo2);
-                            Toast.makeText(getApplicationContext(), request, Toast.LENGTH_SHORT).show();
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
-                    }
-                }
-            });
-        } else {
-            Intent i = new Intent(getApplicationContext(), aggiornamento.class);
-            i.putExtra("user", username);
-            i.putExtra("pass", password);
-            i.putExtra("sessionKey", "000000000");
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            getApplicationContext().startActivity(i);
-        }
-    }
-
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.login_set, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        int id = item.getItemId();
-        if(id==R.id.recupera)//routine di gestione di recupero password
-        {
-            EditText txt = (EditText) findViewById(R.id.userId);
-            String testo = txt.getText().toString();
-            if(testo.isEmpty())
-                Toast.makeText(getApplicationContext(),"inserisci l'indirizzo email", Toast.LENGTH_SHORT).show();
-            else {
-                try {
-                    serverComunication connect = new serverComunication();
-                    String request = connect.connessioneMain("2/" + testo);
-                    Toast.makeText(getApplicationContext(), request, Toast.LENGTH_SHORT).show();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        if(id==R.id.reimposta)
-        {
-            Intent i = new Intent(getApplicationContext(), recuperaPass.class);
-            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            getApplicationContext().startActivity(i);
-        }
-        return super.onOptionsItemSelected(item);
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/operandClick.java b/mainActivity/src/com/example/furt/myapplication/operandClick.java
deleted file mode 100755 (executable)
index d5f26e3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.view.View;
-
-public class operandClick implements View.OnClickListener
-{
-    Node L;
-    operandClick(Node n)
-    {
-        L=n;
-    }
-    public void onClick(View view)
-    {
-        if (DrawActivity.selectedNode.Children.size()!=0) //not a leaf: can't add children
-            return;
-        if (L==null) //incompatible elimination
-            return;
-        for (Node n:L.Children) {
-            for (Hypothesis hp:n.NodeHP)
-                hp.fromNode= DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
-            n.addHPList(DrawActivity.selectedNode.NodeHP);
-            DrawActivity.selectedNode.addChild(n);
-        }
-        DrawActivity.selectedNode.hasFocus=false;
-        DrawActivity.selectedNode.Children.get(0).hasFocus=true;
-        DrawActivity.selectedNode.hasFocus=false;
-        DrawActivity.selectedNode.ruleName=L.ruleName;
-        DrawActivity.nmoves++;
-        DrawActivity.rootNode.Clean();
-        DrawActivity.startDraw();
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/parser.java b/mainActivity/src/com/example/furt/myapplication/parser.java
deleted file mode 100755 (executable)
index 0722a30..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.example.furt.myapplication;
-
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathFactory;
-
-public class parser {
-    parser(){}
-
-    protected static Node root(String esercizio)
-    {
-        Node returnNode=null;
-        try {
-            String cartellaEs=global.esDir;
-            FileInputStream file = new FileInputStream(new File(cartellaEs+esercizio));
-            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder builder = builderFactory.newDocumentBuilder();
-            Document xmlDocument = builder.parse(file);
-            returnNode=new Node(createFormula(xmlDocument,"/esercizio/tesi/formula[1]"));
-            returnNode.addHPList(ipotesi(xmlDocument));
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return returnNode;
-    }
-
-    static public ArrayList<String> getLiteral(String esercizio)
-    {
-        String cartellaEs=global.esDir;
-        ArrayList<String> listValue=new ArrayList<String>();
-        ArrayList<String> returnValue=new ArrayList<String>();
-        try {
-            FileInputStream file = new FileInputStream(new File(cartellaEs + esercizio));
-            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder builder = builderFactory.newDocumentBuilder();
-            Document xmlDocument = builder.parse(file);
-            listValue.add("Ț");
-            listValue.add("⊥");
-            listValue.addAll(getLiteralAtFormula(xmlDocument, "/esercizio/tesi/formula[1]"));
-            listValue.addAll(getLiteralAtHypotesis(xmlDocument));
-            for(String elem : listValue)
-            {
-                if(!returnValue.isEmpty())
-                {
-                    if(!returnValue.contains(elem))
-                        returnValue.add(elem);
-                }
-                else
-                    returnValue.add(elem);
-            }
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (ParserConfigurationException e) {
-            e.printStackTrace();
-        } catch (SAXException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return returnValue;
-    }
-
-    static public ArrayList<String> getLiteralAtFormula(Document xmlDocument, String position)
-    {
-        ArrayList<String> returnList=new ArrayList<String>();
-        try {
-            XPath xPath = XPathFactory.newInstance().newXPath();
-            if(Integer.parseInt(xPath.compile("count(" + position + ")").evaluate(xmlDocument))==1) {
-                String type = xPath.compile(position + "/@type").evaluate(xmlDocument);
-                int numbOfElements = 5;
-                if (type.contentEquals("and") || type.contentEquals("or") || type.contentEquals("impl"))
-                    numbOfElements = 2;
-                else if (type.contentEquals("not"))
-                    numbOfElements = 1;
-                else if (type.contentEquals("literal") || type.contentEquals("atomic"))
-                    numbOfElements = 0;
-                int count = Integer.parseInt(xPath.compile("count(" + position + "/formula)").evaluate(xmlDocument));
-                if (count == numbOfElements) {
-                    if (numbOfElements == 2) {
-                        returnList.addAll(getLiteralAtFormula(xmlDocument, position + "/formula[1]"));
-                        returnList.addAll(getLiteralAtFormula(xmlDocument, position + "/formula[2]"));
-
-                        return returnList;
-                    } else if (numbOfElements == 1) {
-                        return getLiteralAtFormula(xmlDocument, position + "/formula[1]");
-                    } else if (numbOfElements == 0) {
-                        String child = xPath.compile(position).evaluate(xmlDocument);
-                        if (child == null || child.isEmpty())
-                            return null;
-                        else if (child.contentEquals("top")) {
-                            returnList.add("Ț");
-                            return returnList;
-                        }
-                        else if (child.contentEquals("bot")){
-                            returnList.add("⊥");
-                            return returnList;
-                        }
-                        else{
-                            returnList.add(String.valueOf(child.charAt(0)));
-                            return returnList;
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    static public Formula createFormula(Document xmlDocument, String position) {
-        try {
-            XPath xPath = XPathFactory.newInstance().newXPath();
-            if(Integer.parseInt(xPath.compile("count(" + position + ")").evaluate(xmlDocument))==1) {
-                String type = xPath.compile(position + "/@type").evaluate(xmlDocument);
-                int numbOfElements = 5;
-                if (type.contentEquals("and") || type.contentEquals("or") || type.contentEquals("impl"))
-                    numbOfElements = 2;
-                else if (type.contentEquals("not"))
-                    numbOfElements = 1;
-                else if (type.contentEquals("literal") || type.contentEquals("atomic"))
-                    numbOfElements = 0;
-                int count = Integer.parseInt(xPath.compile("count(" + position + "/formula)").evaluate(xmlDocument));
-                if (count == numbOfElements) {
-                    if (numbOfElements == 2) {
-                        Formula firstChild = createFormula(xmlDocument, position + "/formula[1]");
-                        Formula secondChild = createFormula(xmlDocument, position + "/formula[2]");
-                        if (firstChild == null || secondChild == null)
-                            return null;
-                        else if (type.contentEquals("and"))
-                            return new FormulaAnd(createFormula(xmlDocument, position + "/formula[1]"), createFormula(xmlDocument, position + "/formula[2]"));
-                        else if (type.contentEquals("or"))
-                            return new FormulaOr(createFormula(xmlDocument, position + "/formula[1]"), createFormula(xmlDocument, position + "/formula[2]"));
-                        else if (type.contentEquals("impl"))
-                            return new FormulaImpl(createFormula(xmlDocument, position + "/formula[1]"), createFormula(xmlDocument, position + "/formula[2]"));
-                    } else if (numbOfElements == 1) {
-                        Formula child = createFormula(xmlDocument, position + "/formula[1]");
-                        if (child == null)
-                            return null;
-                        return new FormulaNot(createFormula(xmlDocument, position + "/formula[1]"));
-                    } else if (numbOfElements == 0) {
-                        String child = xPath.compile(position).evaluate(xmlDocument);
-                        if (child == null || child.isEmpty())
-                            return null;
-                        else if (child.length()>=3 && child.substring(0,3).equals("top"))
-                            return new FormulaTOP();
-                        else if (child.length()>=3 && child.substring(0,3).equals("bot"))
-                            return new FormulaBOT();
-                        else
-                            return new Literal(child.charAt(0));
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    static public List<Hypothesis> ipotesi(Document xmlDocument)
-    {
-        List<Hypothesis> returnValue=new ArrayList<Hypothesis>();
-        XPath xPath = XPathFactory.newInstance().newXPath();
-        try
-        {
-            int count = Integer.parseInt(xPath.compile("count(/esercizio/ipotesi/formula)").evaluate(xmlDocument));
-            for(int i=1;i<=count;i++)
-            {
-                Formula F=createFormula(xmlDocument,"/esercizio/ipotesi/formula["+i+"]");
-                Hypothesis valore;
-                if(F==null)
-                    valore=null;
-                else
-                    valore=new Hypothesis(F,false);
-                if(valore!=null)
-                    returnValue.add(valore);
-            }
-        }catch (Exception e) {
-            e.printStackTrace();
-        }
-        return returnValue;
-    }
-
-    static public ArrayList<String> getLiteralAtHypotesis(Document xmlDocument)
-    {
-        ArrayList<String> returnValue=new ArrayList<String>();
-        XPath xPath = XPathFactory.newInstance().newXPath();
-        try
-        {
-            int count = Integer.parseInt(xPath.compile("count(/esercizio/ipotesi/formula)").evaluate(xmlDocument));
-            for(int i=1;i<=count;i++)
-                returnValue.addAll(getLiteralAtFormula(xmlDocument, "/esercizio/ipotesi/formula[" + i + "]"));
-        }catch (Exception e) {
-            e.printStackTrace();
-        }
-        return returnValue;
-    }
-
-    static public ArrayList<String> getParameters(String esercizio)
-    {
-        ArrayList<String> value=new ArrayList<String>();
-        try {
-            String cartellaEs=global.esDir;
-            FileInputStream file = new FileInputStream(new File(cartellaEs+esercizio));
-            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder builder = builderFactory.newDocumentBuilder();
-            Document xmlDocument = builder.parse(file);
-            return parameters(xmlDocument);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return value;
-    }
-
-    static private ArrayList<String> parameters(Document xmlDocument)
-    {
-        ArrayList<String> returnValue= new ArrayList<String>();
-        XPath xPath = XPathFactory.newInstance().newXPath();
-        try
-        {
-             if(        Integer.parseInt(xPath.compile("count(/esercizio/valutazione/click)").evaluate(xmlDocument))==1 &&
-                        Integer.parseInt(xPath.compile("count(/esercizio/valutazione/tempo)").evaluate(xmlDocument))==1 &&
-                        Integer.parseInt(xPath.compile("count(/esercizio/valutazione/altezza)").evaluate(xmlDocument))==1)
-                {
-                    returnValue.add(xPath.compile("/esercizio/valutazione/click").evaluate(xmlDocument));
-                    returnValue.add(xPath.compile("/esercizio/valutazione/tempo").evaluate(xmlDocument));
-                    returnValue.add(xPath.compile("/esercizio/valutazione/altezza").evaluate(xmlDocument));
-                }
-        }catch (Exception e) {
-            e.printStackTrace();
-        }
-        return returnValue;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/parserDialog.java b/mainActivity/src/com/example/furt/myapplication/parserDialog.java
deleted file mode 100755 (executable)
index ccc18cc..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class parserDialog extends DialogFragment {
-    static Formula F=null; //formula che sto costruendo
-    static RelativeLayout formulaLayout;
-    static TextView FView; //View contenente la formula che sto visualizzando
-    static boolean reload=false;
-    static ArrayList<String> esliter=new ArrayList<String>();
-    static ArrayList<Formula> undo=new ArrayList<Formula>();
-    public parserDialog()
-    {
-        esliter.removeAll(esliter);
-        if(!reload)
-            undo.removeAll(undo);
-        reload=false;
-        if(F==null) {
-            F = new UndefinedFormula();
-            F.setCursor();
-        }
-        esliter.addAll(parser.getLiteral(DrawActivity.nomeEs));
-    }
-    @Override
-    public Dialog onCreateDialog(final Bundle savedInstanceState) {
-        // Use the Builder class for convenient dialog construction
-        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-        LayoutInflater inflater=getActivity().getLayoutInflater();
-        View view=inflater.inflate(R.layout.string_layout, null);
-        RelativeLayout litersLayout=(RelativeLayout)((ViewGroup)((ViewGroup)view).getChildAt(0)).getChildAt(0);
-        RelativeLayout operatorsLayout=(RelativeLayout)(((ViewGroup)view).getChildAt(1));
-        formulaLayout=(RelativeLayout)((ViewGroup)((ViewGroup)view).getChildAt(2)).getChildAt(0);
-        FView=new TextView(formulaLayout.getContext());
-        FView.setText(F.toString());
-        FView.setTextSize(DrawActivity.textSize);
-        formulaLayout.addView(FView);
-        int leftId=0;
-        if(!esliter.isEmpty()) {
-            for (String liter : esliter) {
-                Button lit = new Button(litersLayout.getContext());
-                RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-                lit.setText(liter);
-                if (leftId != 0) {
-                    lp.addRule(RelativeLayout.RIGHT_OF, leftId);
-                }
-                lit.setLayoutParams(lp);
-                lit.setId(DrawActivity.globalId++);
-                leftId = lit.getId();
-                litersLayout.addView(lit);
-                lit.setOnClickListener(new touchParserHandler(4, liter.charAt(0)));
-            }
-        }
-        Button bImpl=new Button(operatorsLayout.getContext());
-        Button bAnd=new Button(operatorsLayout.getContext());
-        Button bOr=new Button(operatorsLayout.getContext());
-        Button bNot=new Button(operatorsLayout.getContext());
-        RelativeLayout.LayoutParams lpImpl=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-        RelativeLayout.LayoutParams lpAnd=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-        RelativeLayout.LayoutParams lpNot=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-        RelativeLayout.LayoutParams lpOr=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-
-        bImpl.setText("⇒");
-        bImpl.setLayoutParams(lpImpl);
-        bImpl.setId(DrawActivity.globalId++);
-        leftId=bImpl.getId();
-
-        bOr.setText("∨");
-        lpOr.addRule(RelativeLayout.RIGHT_OF, leftId);
-        bOr.setLayoutParams(lpOr);
-        bOr.setId(DrawActivity.globalId++);
-        leftId=bOr.getId();
-
-        bAnd.setText("∧");
-        lpAnd.addRule(RelativeLayout.RIGHT_OF, leftId);
-        bAnd.setLayoutParams(lpAnd);
-        bAnd.setId(DrawActivity.globalId++);
-        leftId=bAnd.getId();
-
-        bNot.setText("¬");
-        lpNot.addRule(RelativeLayout.RIGHT_OF, leftId);
-        bNot.setLayoutParams(lpNot);
-        bNot.setId(DrawActivity.globalId++);
-
-        operatorsLayout.addView(bImpl);
-        operatorsLayout.addView(bAnd);
-        operatorsLayout.addView(bNot);
-        operatorsLayout.addView(bOr);
-        bImpl.setOnClickListener(new touchParserHandler(2,' '));
-        bAnd.setOnClickListener(new touchParserHandler(0,' '));
-        bNot.setOnClickListener(new touchParserHandler(3, ' '));
-        bOr.setOnClickListener(new touchParserHandler(1, ' '));
-        builder.setView(view);
-        builder.setTitle("Inserisci una formula").setPositiveButton("Ok", new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int id) {
-                if(!F.toString().contains("_")) {
-                    List<EliminationRule> L = F.EliminationRules();
-                    if (L.size()==0){
-                        F=null;
-                        Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare questa ipotesi ora",Toast.LENGTH_LONG).show();
-                        return;
-                    }
-                    if (F.toString().equals(DrawActivity.selectedNode.F.toString())) //sto provando a scaricare il nodo selezionato
-                    {
-                        Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare un nodo aperto senza dimostrarlo",Toast.LENGTH_LONG).show();
-                        F=null;
-                        return;
-                    }
-                    touchHPHandler t = new touchHPHandler(L.get(0).createNodes(null, new askFormula()),new Hypothesis(F,true));
-                    F = null;
-                    t.discard=false;
-                    t.onClick(null);
-                }
-                else{
-                    Toast.makeText(DrawActivity.rootNode.view.getContext(),"Completa l'inserimento!",Toast.LENGTH_SHORT).show();
-                    reboot();
-                }
-            }
-        });
-        builder.setNeutralButton("Undo", new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int id) {
-                if(undo.size()>1) {
-                    F = undo.remove(undo.size() - 1);
-                }
-                else
-                    F=null;
-                reboot();
-            }
-        });
-        builder.setNegativeButton("Annulla", new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int id) {
-                F=null;
-            }
-        });
-        // Create the AlertDialog object and return it
-        return builder.create();
-    }
-    static void reboot()
-    {
-        reload=true;
-        parserDialog p=new parserDialog();
-        p.F=F;
-        p.show(DrawActivity.fragmentManager, "CIAO");
-    }
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/personalDBHelper.java b/mainActivity/src/com/example/furt/myapplication/personalDBHelper.java
deleted file mode 100755 (executable)
index 2af2653..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.util.Log;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.example.furt.myapplication.personalTrackerContract.DATABASE_NAME;
-import static com.example.furt.myapplication.personalTrackerContract.DATABASE_VERSION;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_CHECK;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_CLICK;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_ESERCIZIO;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_MD5;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_TIME;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.COLUMN_UTENTE;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.SQL_CREATE_ENTRIES;
-import static com.example.furt.myapplication.personalTrackerContract.esercizi.TABLE_NAME;
-
-
-
-public class personalDBHelper extends SQLiteOpenHelper{
-    public personalDBHelper(Context context) {
-        super(context, DATABASE_NAME, null, DATABASE_VERSION);
-    }
-
-    public void onCreate(SQLiteDatabase db) {
-
-        db.execSQL(SQL_CREATE_ENTRIES);
-        Log.e("dphelper", SQL_CREATE_ENTRIES);
-    }
-
-    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-        // This database is only a cache for online data, so its upgrade policy is
-        // to simply to discard the data and start over
-        db.execSQL(SQL_CREATE_ENTRIES);
-        onCreate(db);
-    }
-
-    public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-        onUpgrade(db, oldVersion, newVersion);
-    }
-
-    public void add(String utente, String esercizio, String md5, Double time, int ckick, int check)
-    {
-        SQLiteDatabase db=this.getWritableDatabase();
-        ContentValues values=new ContentValues();
-        values.put(COLUMN_MD5,md5);
-        if(time==0)
-            values.put(COLUMN_TIME,(double)time());
-        else
-            values.put(COLUMN_TIME,(time));
-        values.put(COLUMN_CHECK,check);
-        values.put(COLUMN_UTENTE,utente);
-        values.put(COLUMN_ESERCIZIO,esercizio);
-        values.put(COLUMN_CLICK, ckick);
-        db.insert(TABLE_NAME, null, values);
-        db.close();
-    }
-
-    public void remove(String user, double time)
-    {
-        SQLiteDatabase db = this.getWritableDatabase();
-        String request=COLUMN_MD5 + "=? AND " + COLUMN_TIME + "=? AND " + COLUMN_UTENTE + "=?";
-        String[] condition=new String[]{
-                String.valueOf(time),
-                String.valueOf(user)
-        };
-        db.delete(TABLE_NAME,request,condition);
-        db.close();
-    }
-
-    public static Long time()
-    {
-        java.util.Date date= new java.util.Date();
-        Timestamp now=new Timestamp(date.getTime());
-        return now.getTime();
-    }
-
-    public void removeAll(){
-        SQLiteDatabase db=this.getWritableDatabase();
-        String request="TRUNCATE "+TABLE_NAME;
-    }
-
-    public List<listElem> getElem(String user)
-    {
-        List<listElem> elem=null;
-        SQLiteDatabase db=this.getReadableDatabase();
-        String[] tableColums={
-            esercizi.COLUMN_MD5,
-            esercizi.COLUMN_TIME,
-            esercizi.COLUMN_CLICK,
-            esercizi.COLUMN_ESERCIZIO
-        };
-        String whereClause= COLUMN_UTENTE +"=? AND " + COLUMN_CHECK +"=?";
-        String[] whereArgs=new String[]{
-                String.valueOf(user),
-                String.valueOf("0")
-        };
-        Cursor cursor=db.query(TABLE_NAME,tableColums,whereClause,whereArgs,null,null,null);
-        if(cursor.moveToFirst()) {
-            elem = new ArrayList<listElem>();
-            listElem el=new listElem();
-            do {
-                el.setMd5 (cursor.getString(0));
-                el.setTime(cursor.getDouble(1));
-                el.setClick(cursor.getInt(2));
-                el.setEsercizio(cursor.getString(3));
-                elem.add(el);
-            }while(cursor.moveToNext());
-        }
-        return elem;
-    }
-
-    public List<listElem> getElemForName(String user, String esName)
-    {
-        List<listElem> elem=null;
-        SQLiteDatabase db=this.getReadableDatabase();
-        String[] tableColums={
-                esercizi.COLUMN_MD5,
-                esercizi.COLUMN_TIME,
-                esercizi.COLUMN_CLICK,
-                esercizi.COLUMN_CHECK
-        };
-        String whereClause= COLUMN_UTENTE +"=? AND " + COLUMN_ESERCIZIO +"=? ORDER BY "+COLUMN_CLICK;
-        String[] whereArgs=new String[]{
-                String.valueOf(user),
-                String.valueOf(esName)
-        };
-        Cursor cursor=db.query(TABLE_NAME,tableColums,whereClause,whereArgs,null,null,null);
-        if(cursor.moveToFirst()) {
-            elem = new ArrayList<listElem>();
-            listElem el=new listElem();
-            do {
-                el.setMd5 (cursor.getString(0));
-                el.setTime(cursor.getDouble(1));
-                el.setClick(cursor.getInt(2));
-                el.setCheck(cursor.getInt(3));
-                elem.add(el);
-            }while(cursor.moveToNext());
-        }
-        return elem;
-    }
-
-    public List<listElem> getAllElem(String user)
-    {
-        List<listElem> elem=null;
-        SQLiteDatabase db=this.getReadableDatabase();
-        String[] tableColums={
-                esercizi.COLUMN_MD5,
-                esercizi.COLUMN_TIME,
-                esercizi.COLUMN_CLICK,
-                esercizi.COLUMN_ESERCIZIO,
-                esercizi.COLUMN_CHECK
-        };
-        String whereClause= COLUMN_UTENTE +"=?";
-        String[] whereArgs=new String[]{
-                String.valueOf(user)
-        };
-        Cursor cursor=db.query(TABLE_NAME,tableColums,whereClause,whereArgs,null,null,null);
-        if(cursor.moveToFirst()) {
-            elem = new ArrayList<listElem>();
-            listElem el=new listElem();
-            do {
-                el.setMd5 (cursor.getString(0));
-                el.setTime(cursor.getDouble(1));
-                el.setClick(cursor.getInt(2));
-                el.setEsercizio(cursor.getString(3));
-                el.setCheck(cursor.getInt(4));
-                elem.add(el);
-            }while(cursor.moveToNext());
-        }
-        return elem;
-    }
-
-    public void updateElem(String md5, String user, double time)
-    {
-        SQLiteDatabase db=this.getWritableDatabase();
-        String request="UPDATE "+TABLE_NAME+" set "+COLUMN_CHECK+"=1 WHERE "+COLUMN_UTENTE+"='"+user+"' AND "+COLUMN_MD5+"='"+md5+"' AND "+COLUMN_TIME+"="+time;
-        db.execSQL(request);
-    }
-
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/personalTrackerContract.java b/mainActivity/src/com/example/furt/myapplication/personalTrackerContract.java
deleted file mode 100755 (executable)
index 2b2d87e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.provider.BaseColumns;
-
-
-public final class personalTrackerContract {
-    // To prevent someone from accidentally instantiating the contract class,
-    // give it an empty constructor.
-    public personalTrackerContract() {
-    }
-
-    public static final int DATABASE_VERSION = 1;
-    public static final String DATABASE_NAME = "exercise.db";
-
-    private static final String TEXT_TYPE = " TEXT";
-    private static final String VALUE_TYPE=" DECIMAL";
-    private static final String COMMA_SEP = ",";
-    private static final String INT_TYPE = " INTEGER";
-    private static final String DOUBLE_TYPE=" DOUBLE";
-
-    /* Inner class that defines the table contents */
-    public static abstract class esercizi implements BaseColumns {
-
-        public static final String TABLE_NAME = " esercizi ";
-        public static final String COLUMN_ESERCIZIO = " esercizio ";
-        public static final String COLUMN_MD5 = " md5 ";
-        public static final String COLUMN_UTENTE = " utente ";
-        public static final String COLUMN_TIME = " time ";
-        public static final String COLUMN_CHECK = " checks ";
-        public static final String COLUMN_CLICK = " click ";
-
-        public static final String SQL_CREATE_ENTRIES =
-                "CREATE TABLE " + TABLE_NAME + " (" +
-                        COLUMN_UTENTE + TEXT_TYPE + COMMA_SEP +
-                        COLUMN_MD5 + TEXT_TYPE + COMMA_SEP +
-                        COLUMN_TIME + DOUBLE_TYPE + COMMA_SEP +
-                        COLUMN_CLICK + INT_TYPE + COMMA_SEP +
-                        COLUMN_ESERCIZIO + TEXT_TYPE + COMMA_SEP +
-                        COLUMN_CHECK + INT_TYPE +
-                        " )";
-
-        public static final String SQL_DELETE_ENTRIES =
-                "DROP TABLE IF EXISTS " + TABLE_NAME;
-
-    }
-}
\ No newline at end of file
diff --git a/mainActivity/src/com/example/furt/myapplication/recuperaPass.java b/mainActivity/src/com/example/furt/myapplication/recuperaPass.java
deleted file mode 100644 (file)
index 0dfe425..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.Toast;
-
-public class recuperaPass extends Activity{
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.reimpostapass);
-        Button invia=(Button) findViewById(R.id.invia);
-        invia.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                EditText ut=(EditText) findViewById(R.id.userId);
-                EditText oP=(EditText) findViewById(R.id.oldPass);
-                EditText nP=(EditText) findViewById(R.id.newPass);
-                String utente=ut.getText().toString();
-                String oldPass=oP.getText().toString();
-                String newPass=nP.getText().toString();
-                if(utente==null || oldPass==null || newPass==null)
-                    Toast.makeText(getApplicationContext(), "devi riempire tutti i campi", Toast.LENGTH_SHORT).show();
-                else if(!utente.contains("@studio.unibo.it"))
-                    Toast.makeText(getApplicationContext(), "email non valida", Toast.LENGTH_SHORT).show();
-                else if(newPass.contains("/"))
-                    Toast.makeText(getApplicationContext(), "la password non deve contenere /", Toast.LENGTH_SHORT).show();
-                else
-                {
-                    String request = serverComunication.connessioneMain("a0/" + utente + "/" + oldPass + "/" + newPass );
-                    if(!request.contains("error"))
-                    {
-                        Toast.makeText(getApplicationContext(), "password cambiata", Toast.LENGTH_SHORT).show();
-                        Intent i = new Intent(getApplicationContext(), mainActivity.class);
-                        i.putExtra("logout", "si");
-                        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                        getApplicationContext().startActivity(i);
-                    }
-                    else
-                        Toast.makeText(getApplicationContext(), "errore", Toast.LENGTH_SHORT).show();
-                }
-            }
-        });
-        Button annulla=(Button) findViewById(R.id.annulla);
-        annulla.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent i = new Intent(getApplicationContext(), mainActivity.class);
-                i.putExtra("logout", "si");
-                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                getApplicationContext().startActivity(i);
-            }
-        });
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/serverComunication.java b/mainActivity/src/com/example/furt/myapplication/serverComunication.java
deleted file mode 100755 (executable)
index a82ea27..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import android.content.res.Resources;
-import android.os.AsyncTask;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.Socket;
-import java.security.KeyManagementException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.concurrent.ExecutionException;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManagerFactory;
-
-public class serverComunication
-{
-
-    serverComunication(){}
-
-    public static String connessione(String parametri)
-    {
-        try {
-            return new richiestaServer().execute(parametri).get();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        } catch (ExecutionException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    static String connessioneMain(String parametri)
-    {
-        try {
-            return new richiestaServerMain().execute(parametri).get();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        } catch (ExecutionException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    static class richiestaServer extends AsyncTask<String, String, String> {
-        @Override
-        protected String doInBackground(String... params)
-        {
-            Resources risorse= aggiornamento.t.getResources();
-            try {
-// (could be from a resource or ByteArrayInputStream or ...)
-                CertificateFactory cf = CertificateFactory.getInstance("X.509");
-// From https://www.washington.edu/itconnect/security/ca/load-der.crt
-                InputStream caInput = risorse.openRawResource(R.raw.halloween);
-                Certificate ca;
-                try {
-                    ca = cf.generateCertificate(caInput);
-                    System.out.println("ca=" + ((X509Certificate) ca).getSubjectDN());
-                } finally {
-                    caInput.close();
-                }
-
-// Create a KeyStore containing our trusted CAs
-                String keyStoreType = KeyStore.getDefaultType();
-                KeyStore keyStore = KeyStore.getInstance(keyStoreType);
-                keyStore.load(null, null);
-                keyStore.setCertificateEntry("ca", ca);
-
-// Create a TrustManager that trusts the CAs in our KeyStore
-                String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
-                TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
-                tmf.init(keyStore);
-
-// Create an SSLContext that uses our TrustManager
-                SSLContext context = SSLContext.getInstance("TLS");
-                context.init(null, tmf.getTrustManagers(), null);
-
-                Socket socket;
-                SSLSocketFactory sf=context.getSocketFactory();
-                socket=sf.createSocket(global.hostName,global.port);
-                OutputStream os = socket.getOutputStream();
-                OutputStreamWriter osw = new OutputStreamWriter(os);
-                BufferedWriter bw = new BufferedWriter(osw);
-                bw.write(params[0]+"\n");
-                bw.flush();
-                BufferedReader r = new BufferedReader(new InputStreamReader(socket.getInputStream()));
-                String returnValue=r.readLine();
-                socket.close();
-                return returnValue;
-            } catch (KeyStoreException g) {
-                g.printStackTrace();
-            } catch (CertificateException a) {
-                a.printStackTrace();
-            } catch (NoSuchAlgorithmException b) {
-                b.printStackTrace();
-            } catch (IOException c) {
-                c.printStackTrace();
-            } catch (KeyManagementException f) {
-                f.printStackTrace();
-            }
-            return "error";
-        }
-    }
-
-   public static class richiestaServerMain extends AsyncTask<String, String, String> {
-        @Override
-        protected String doInBackground(String... params)
-        {
-            Resources risorse= mainActivity.t.getResources();
-            try {
-// (could be from a resource or ByteArrayInputStream or ...)
-                CertificateFactory cf = CertificateFactory.getInstance("X.509");
-// From https://www.washington.edu/itconnect/security/ca/load-der.crt
-                InputStream caInput = risorse.openRawResource(R.raw.halloween);
-                Certificate ca;
-                try {
-                    ca = cf.generateCertificate(caInput);
-                    System.out.println("ca=" + ((X509Certificate) ca).getSubjectDN());
-                } finally {
-                    caInput.close();
-                }
-
-// Create a KeyStore containing our trusted CAs
-                String keyStoreType = KeyStore.getDefaultType();
-                KeyStore keyStore = KeyStore.getInstance(keyStoreType);
-                keyStore.load(null, null);
-                keyStore.setCertificateEntry("ca", ca);
-
-// Create a TrustManager that trusts the CAs in our KeyStore
-                String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
-                TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
-                tmf.init(keyStore);
-
-// Create an SSLContext that uses our TrustManager
-                SSLContext context = SSLContext.getInstance("TLS");
-                context.init(null, tmf.getTrustManagers(), null);
-
-                Socket socket;
-                SSLSocketFactory sf=context.getSocketFactory();
-                socket=sf.createSocket(global.hostName,global.port);
-                OutputStream os = socket.getOutputStream();
-                OutputStreamWriter osw = new OutputStreamWriter(os);
-                BufferedWriter bw = new BufferedWriter(osw);
-                bw.write(params[0]+"\n");
-                bw.flush();
-                BufferedReader r = new BufferedReader(new InputStreamReader(socket.getInputStream()));
-                String returnValue=r.readLine();
-                socket.close();
-                return returnValue;
-            } catch (KeyStoreException g) {
-                g.printStackTrace();
-            } catch (CertificateException a) {
-                a.printStackTrace();
-            } catch (NoSuchAlgorithmException b) {
-                b.printStackTrace();
-            } catch (IOException c) {
-                c.printStackTrace();
-            } catch (KeyManagementException f) {
-                f.printStackTrace();
-            }
-            return "error";
-        }
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/suString.java b/mainActivity/src/com/example/furt/myapplication/suString.java
deleted file mode 100755 (executable)
index 2d5fe33..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.example.furt.myapplication;
-
-import java.util.ArrayList;
-
-class suString
-{
-       suString()
-       {};
-       
-       public static ArrayList<String> stringToArrayList(String string)
-       {
-               ArrayList<String> returnValue=new ArrayList<String>();
-               int j=0;
-               for(int i=0;i<string.length();i++)
-               {
-                       if(string.charAt(i)=='/')
-                       {
-                                       returnValue.add(string.substring(j,i));
-                                       j=i+1;
-                       }
-                       else if(i==string.length()-1)
-                               returnValue.add(string.substring(j));
-               }
-               return returnValue;
-       }
-       
-       public static ArrayList<String> vectorStringToArrayList(String[] vectorString)
-       {
-               ArrayList<String> returnValue=new ArrayList<String>();
-               for(String name : vectorString)
-                       returnValue.add(name);
-               return returnValue;
-       }
-       
-       public static String arrayListToString (ArrayList<String> arraylist)
-       {
-               String returnValue=new String();
-               for(int i=0;i<arraylist.size();i++)
-               {
-                       if(i<arraylist.size()-1)
-                               returnValue=returnValue+arraylist.get(i)+"/";
-                       else
-                               returnValue=returnValue+arraylist.get(i);
-               }
-               return returnValue;
-       }
-       
-       public static String vectorStringToString(String[] vectorString)
-       {
-               return arrayListToString(vectorStringToArrayList(vectorString));
-       }
-       
-       public static String[] arrayListToVectorString (ArrayList<String> arraylist)
-       {
-               String[] returnValue=new String[arraylist.size()];
-               for(int i=0;i<arraylist.size();i++)
-                       returnValue[i]=arraylist.get(i);
-               return returnValue;
-       }
-       
-       public static String[] stringToVectorString(String string)
-       {
-               return arrayListToVectorString(stringToArrayList(string));
-       }
-
-    public static String multiToString(ArrayList<String> input)
-    {
-        String returnValue=null;
-        for(int i=0;i<input.size();i++)
-        {
-            if(i==0)
-                returnValue=input.get(i)+"//";
-            else if(i==input.size()-1)
-                returnValue=returnValue+input.get(i);
-            else
-                returnValue=returnValue+input.get(i)+"//";
-        }
-        return returnValue;
-    }
-
-    public static ArrayList<String> stringToMultiArray(String input)
-    {
-        ArrayList<String> result=new ArrayList<String>();
-        int j=0;
-        if(input==null)
-            return result;
-        for(int i=0;i<input.length();i++)
-        {
-            if(input.charAt(i)=='/') {
-                if (input.charAt(i + 1) == '/') {
-                    result.add(input.substring(j, i));
-                    j=i+2;
-                }
-            }
-        }
-        if(j<input.length())
-            result.add(input.substring(j,input.length()-1));
-        return result;
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/touchHPHandler.java b/mainActivity/src/com/example/furt/myapplication/touchHPHandler.java
deleted file mode 100755 (executable)
index 0e62a53..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.view.View;
-import android.widget.Toast;
-
-public class touchHPHandler implements View.OnClickListener
-{
-    Node L; //nodo contenente il sottoalbero successivo all'eliminazione dell'ipotesi
-    boolean discard;
-    Hypothesis thisHP; //ipotesi che sto eliminando
-    touchHPHandler(Node n,Hypothesis hp)
-    {
-        L=n;
-        thisHP=hp;
-        discard=true;//di default il ramo della formula scartata viene chiuso
-    }
-    public void onClick(View view)
-    {
-        if (DrawActivity.selectedNode==null) //selectedNode non esiste (non dovrebbe mai succedere)
-            return;
-        if (DrawActivity.selectedNode.Children.size()!=0) //non è una foglia: non si possono applicare regole.
-        {
-            Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare ipotesi su nodi intermedi",Toast.LENGTH_LONG).show();
-            return;
-        }
-        if (thisHP.HP.toString().equals(DrawActivity.selectedNode.F.toString())) //sto scaricando una formula uguale al nodo corrente: lo chiudo aggiornando lo stato del nodo
-        {
-            if (thisHP.isDeleted) {
-                if (DrawActivity.selectedNode.status == Node.OPEN)
-                    DrawActivity.selectedNode.status = Node.CANCELED;
-                else if (DrawActivity.selectedNode.status == Node.FAKE)
-                    DrawActivity.selectedNode.status = Node.FAKE_CANCELED;
-            } else {
-                if (DrawActivity.selectedNode.status == Node.OPEN)
-                    DrawActivity.selectedNode.status = Node.CLOSED;
-                else if (DrawActivity.selectedNode.status == Node.FAKE)
-                    DrawActivity.selectedNode.status = Node.FAKE_CLOSED;
-            }
-            DrawActivity.nmoves++;
-            DrawActivity.rootNode.Clean();
-            DrawActivity.startDraw();
-            return;
-        }
-        if (L==null) //eliminazione incompatibile con il nodo attuale
-        {
-            Toast.makeText(DrawActivity.rootNode.view.getContext(),"Impossibile scaricare questa ipotesi ora",Toast.LENGTH_LONG).show();
-            return;
-        }
-        for (Node n:L.Children) { //aggiungo al sottoalbero della regola da applicare tutte le ipotesi del selectedNode. In più aggiungo alle ipotesi introdotte da questa regola il fromNode corretto.
-            for (Hypothesis hp:n.NodeHP)
-                hp.fromNode= DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
-            n.addHPList(DrawActivity.selectedNode.NodeHP);
-            DrawActivity.selectedNode.addChild(n);
-        }
-        DrawActivity.selectedNode.hasFocus=false; //il nodo su cui ho applicato la regola non è più una foglia e non ha più focus
-        DrawActivity.selectedNode.ruleName = L.ruleName;
-        DrawActivity.selectedNode.Children.get(0).hasFocus=true; //il primo figlio dell'applicazione della regola ha di default il focus
-        if(discard) { //sto scaricando un'ipotesi: il primo figlio è automaticamente chiuso
-            if (thisHP.isDeleted)
-                DrawActivity.selectedNode.Children.get(0).status = Node.CANCELED;
-            else
-                DrawActivity.selectedNode.Children.get(0).status = Node.CLOSED;
-        }
-        else
-            DrawActivity.selectedNode.Children.get(0).status= Node.OPEN;
-        DrawActivity.nmoves++;
-        DrawActivity.rootNode.Clean();
-        DrawActivity.startDraw();
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/touchParserHandler.java b/mainActivity/src/com/example/furt/myapplication/touchParserHandler.java
deleted file mode 100755 (executable)
index 655901f..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.view.View;
-import android.widget.TextView;
-import android.widget.Toast;
-
-public class touchParserHandler implements View.OnClickListener
-{
-    int type; //0=and 1=or 2=impl 3=not 4=literal
-    char l; //for literals
-    touchParserHandler(int t,char l)
-    {
-        type=t;
-        this.l=l;
-    }
-    public void onClick(View view)
-    {
-        if(!parserDialog.F.toString().contains("_"))
-        {
-            Toast.makeText(DrawActivity.rootNode.view.getContext(),"Formula completa! Premere \"Undo\" per modificare", Toast.LENGTH_SHORT).show();
-            return;
-        }
-        parserDialog.undo.add(parserDialog.F.duplicate());
-        parserDialog.formulaLayout.removeAllViews();
-        if(type==0)
-        {
-            UndefinedFormula newCursor=new UndefinedFormula();
-            newCursor.currentF=true;
-            Formula newF=new FormulaAnd(newCursor,new UndefinedFormula());
-            if ((parserDialog.F).toString().equals("_"))
-            {
-                parserDialog.F=newF;
-            }
-            else {
-                parserDialog.F.Fill(newF);
-                parserDialog.F.setCursor();
-            }
-        }
-        else if(type==1)
-        {
-            UndefinedFormula newCursor=new UndefinedFormula();
-            newCursor.currentF=true;
-            Formula newF=new FormulaOr(newCursor,new UndefinedFormula());
-            if ((parserDialog.F).toString().equals("_"))
-            {
-                parserDialog.F=newF;
-            }
-            else
-                parserDialog.F.Fill(newF);
-        }
-        else if(type==2)
-        {
-            UndefinedFormula newCursor=new UndefinedFormula();
-            newCursor.currentF=true;
-            Formula newF=new FormulaImpl(newCursor,new UndefinedFormula());
-            if ((parserDialog.F).toString().equals("_"))
-            {
-                parserDialog.F=newF;
-            }
-            else {
-                parserDialog.F.Fill(newF);
-                parserDialog.F.setCursor();
-            }
-        }
-        else if(type==3)
-        {
-            UndefinedFormula newCursor=new UndefinedFormula();
-            newCursor.currentF=true;
-            Formula newF=new FormulaNot(newCursor);
-            if ((parserDialog.F).toString().equals("_"))
-            {
-                parserDialog.F=newF;
-            }
-            else {
-                parserDialog.F.Fill(newF);
-                parserDialog.F.setCursor();
-            }
-        }
-        else if(type==4)
-        {
-            Formula newF;
-            if(l=='⊥')
-                newF=new FormulaBOT();
-            else if(l=='T')
-                newF=new FormulaTOP();
-            else
-                newF=new Literal(l);
-            if ((parserDialog.F).toString().equals("_"))
-            {
-                parserDialog.F=newF;
-            }
-            else {
-                parserDialog.F.Fill(newF);
-                parserDialog.F.setCursor();
-            }
-        }
-        TextView FView=new TextView(parserDialog.formulaLayout.getContext());
-        FView.setText(parserDialog.F.toString());
-        FView.setTextSize(DrawActivity.textSize);
-        parserDialog.formulaLayout.addView(FView);
-    }
-}
diff --git a/mainActivity/src/com/example/furt/myapplication/touchnodeHandler.java b/mainActivity/src/com/example/furt/myapplication/touchnodeHandler.java
deleted file mode 100755 (executable)
index 237a7cd..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-package com.example.furt.myapplication;
-
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.util.TypedValue;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class touchnodeHandler implements View.OnClickListener {
-    static RuleDialog ruleDialog; //il ruleDialog da far comparire nel caso in cui l'utente voglia visualizzare le regole di introduzione disponibili
-    Node n; //nodo a cui è legato questo handler
-    touchnodeHandler(Node node) {
-        n=node; ruleDialog=null;
-    }
-    @Override
-    public void onClick(View view) {
-        Paint p=new Paint();
-        n.hasFocus=true; //il nodo cliccato ha il focus
-        TextView v=(TextView)view;
-        v.setTextColor(Color.RED); //colorazione rossa per il nodo
-        if (DrawActivity.selectedNode!=null)
-            if (DrawActivity.selectedNode.view==view) { //doppio clic sul nodo: parte il Dialog per le regole di introduzione
-                if (DrawActivity.selectedNode.Children.size()==0){
-                    List<IntroductionRule> L=new ArrayList<IntroductionRule>();
-                    for (IntroductionRule r: DrawActivity.selectedNode.F.introductionRules())
-                    {
-                        if (r.getPriority()!=0) //short click: aggiungo solo le regole a priorità alta
-                            L.add(r);
-                    }
-                    if (L.size()==1) //c'è una sola regola: la applico immediatamente.
-                    {
-                        Node selectedRule=L.get(0).createNodes(new askFormula());
-                        for (Node n : selectedRule.Children) {
-                            for (Hypothesis hp : n.NodeHP)
-                                hp.fromNode = DrawActivity.selectedNode; //le ipotesi dei nuovi figli provengono dal nodo in cui stanno per essere inserite
-                            n.addHPList(DrawActivity.selectedNode.NodeHP);
-                            n.handler = null;
-                            DrawActivity.selectedNode.addChild(n);
-                        }
-                        DrawActivity.selectedNode.hasFocus = false;
-                        DrawActivity.selectedNode.ruleName = selectedRule.Children.get(0).ruleName;
-                        DrawActivity.selectedNode.Children.get(0).hasFocus = true;
-                        DrawActivity.nmoves++;
-                        DrawActivity.rootNode.Clean();
-                        DrawActivity.startDraw();
-                        return;
-                    }
-                    else {
-                        //parte il ruleDialog
-                        ruleDialog = new RuleDialog(DrawActivity.selectedNode.F.introductionRules());
-                        ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
-                    }
-                }
-                else //nodo intermedio: parte il Dialog per le operazioni di copia/cancella
-                {
-                    CopyPasteDialog copyPasteDialog=new CopyPasteDialog(DrawActivity.selectedNode);
-                    copyPasteDialog.show(DrawActivity.fragmentManager,"");
-                }
-                return;
-            }
-        int i,size;
-        if (DrawActivity.selectedNode!=null) { //c'era già un selectedNode: lo ricoloro adeguatamente.
-            if(DrawActivity.selectedNode.status==Node.OPEN || DrawActivity.selectedNode.status==Node.FAKE)
-                DrawActivity.selectedNode.view.setTextColor(Color.BLACK);
-            else
-                DrawActivity.selectedNode.view.setTextColor(Color.GRAY);
-        }
-        DrawActivity.selectedNode = n;
-        DrawActivity.globalHP.removeAllViews(); //rimuovo le eventuali vecchie ipotesi per mostrare quelle del nuovo selectedNode
-        size = n.NodeHP.size(); //numero di ipotesi
-        int leftID=0; //ID dell'eventuale ipotesi a destra della quale dev'essere posizionata l'ipotesi (0=assente)
-        int headID=0; //ID dell'eventuale ipotesi sotto la quale deve comparire l'ipotesi (0=assente)
-        float sum=0; //lunghezza raggiunta finora: se supera la larghezza dello schermo devo andare a capo
-        for (i = 0; i<size; i++) //fa apparire le ipotesi cancellate
-        {
-            final TextView newT=new TextView(view.getContext());
-            RelativeLayout.LayoutParams myP=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-            newT.setText(n.NodeHP.get(i).HP.toString());
-            newT.setTextSize(20);
-            newT.setId(DrawActivity.globalId++);
-            if (i==0) //prima ipotesi: sarà il leftID per le successive
-                leftID=newT.getId();
-            myP.setMargins(50,0,0,0);
-            float thisSize;
-            p.setTextSize(20);
-            thisSize=p.measureText(newT.getText().toString()); //misuro la larghezza dell'ipotesi inserita
-            thisSize+=thisSize*0.2; //con un'approssimazione per eccesso del 20%
-            sum+=thisSize; //aggiungo alla somma totale la larghezza di questa ipotesi e della spaziatura
-            sum+=100;
-            if (sum>(DrawActivity.v.widthPixels+20)) //ho superato la larghezza dello schermo: devo andare a capo
-            {
-                sum=thisSize; //il nuovo nodo è il primo della nuova riga
-                headID=leftID; //tutti gli altri devono stare sotto un nodo della riga precedente
-            }
-            else
-                myP.addRule(RelativeLayout.RIGHT_OF,leftID); //non vado a capo: mi limito a posizionarmi a destra del leftID
-            if (headID!=0)
-                myP.addRule(RelativeLayout.BELOW,headID); //mi posiziono sotto l'headID se esiste
-            newT.setLayoutParams(myP);
-            List<EliminationRule> R=n.NodeHP.get(i).HP.EliminationRules();
-            if (R.size()!=0) { //ci sono regole di eliminazione per questa formula
-                Node L= R.get(0).createNodes(null,new askFormula());
-                newT.setOnClickListener(new touchHPHandler(L,n.NodeHP.get(i)));
-            }
-            else //setto comunuqe il listener nel caso in cui la formula venga scaricata
-                newT.setOnClickListener(new touchHPHandler(null,n.NodeHP.get(i)));
-            newT.setOnLongClickListener(new LongHPClick(n.NodeHP.get(i).fromNode)); //setto un longclick listener che mostra il nodo da cui viene l'ipotesi
-            leftID=newT.getId(); //aggiorno il leftID
-            DrawActivity.globalHP.addView(newT);
-        }
-        //disegno il bottone utilizzando lo stesso algoritmo utilizzato per le ipotesi
-
-        final Button elim=new Button(view.getContext());
-        RelativeLayout.LayoutParams myP=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-        elim.setText("Nuova...");
-        elim.setTextSize(TypedValue.COMPLEX_UNIT_SP,16);
-        elim.setId(DrawActivity.globalId++);
-        myP.setMargins(50,0,0,0);
-        p.setTextSize(16);
-        float buttonSize=p.measureText("Nuova...");
-        sum+=buttonSize;
-        if (sum>(DrawActivity.v.widthPixels/1.5)) //ho superato la larghezza dello schermo: devo andare a capo
-        {
-            headID=leftID;
-        }
-        else
-            myP.addRule(RelativeLayout.RIGHT_OF,leftID);
-        if (headID!=0)
-            myP.addRule(RelativeLayout.BELOW, headID);
-        elim.setLayoutParams(myP);
-        elim.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                parserDialog p=new parserDialog();
-                p.show(DrawActivity.fragmentManager, ""); //parte l'editor per inserire nuove formule
-            }
-        });
-        DrawActivity.globalHP.addView(elim);
-    }
-}
-
-
diff --git a/mainActivity/src/com/example/furt/myapplication/valutazione.java b/mainActivity/src/com/example/furt/myapplication/valutazione.java
deleted file mode 100644 (file)
index 86aa5fd..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.example.furt.myapplication;
-
-
-import java.util.ArrayList;
-
-public class valutazione {
-    valutazione(){}
-
-    public static int voto (String esercizio, int click, int tempo, int altezza, int errori)
-    {
-        int value=0;
-        ArrayList<String> parametri= parser.getParameters(esercizio);
-        int minClick, minTempo, minAltezza;
-        if(parametri!=null && !parametri.isEmpty())
-        {
-            minClick=Integer.valueOf(parametri.get(0));
-            minTempo=Integer.valueOf(parametri.get(1));
-            minAltezza=Integer.valueOf(parametri.get(2));
-            // minClick : click = x : 14
-            // minTempo : tempo = x : 8
-            // minAltezza : altezza= x : 8
-            value=((minClick*14)/click)+((minTempo*8)/tempo)+((minAltezza*8)/altezza)-errori;
-            if (value>30)
-                value=30;
-        }
-        return value;
-    }
-}