summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--.idea/compiler.xml46
-rw-r--r--.idea/copyright/profiles_settings.xml6
-rw-r--r--.idea/encodings.xml10
-rw-r--r--.idea/gradle.xml36
-rw-r--r--.idea/libraries/appcompat_v7_19_0_1.xml10
-rw-r--r--.idea/libraries/support_v13_19_0_1.xml11
-rw-r--r--.idea/libraries/support_v4_19_0_1.xml11
-rw-r--r--.idea/misc.xml125
-rw-r--r--.idea/modules.xml20
-rw-r--r--.idea/scopes/scope_settings.xml8
-rw-r--r--.idea/vcs.xml15
-rw-r--r--GymLog.iml27
-rw-r--r--GymLog/.gitignore1
-rw-r--r--GymLog/GymLog-GymLog.iml61
-rw-r--r--GymLog/build.gradle2
-rw-r--r--GymLog/src/main/AndroidManifest.xml42
-rw-r--r--GymLog/src/main/java/com/mikemiller/gymlog/Activity.java149
-rw-r--r--GymLog/src/main/java/com/mikemiller/gymlog/ActivityFragment.java386
-rw-r--r--GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java58
-rw-r--r--GymLog/src/main/java/com/mikemiller/gymlog/MainActivity.java98
-rw-r--r--GymLog/src/main/java/com/mikemiller/gymlog/SimpleCounterFragment.java244
-rw-r--r--GymLog/src/main/res/layout/fragment_activity.xml60
-rw-r--r--GymLog/src/main/res/layout/fragment_simple_counter.xml66
-rw-r--r--GymLog/src/main/res/values/strings.xml16
-rw-r--r--build.gradle2
-rw-r--r--gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--gradlew.bat180
-rw-r--r--settings.gradle2
29 files changed, 962 insertions, 738 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index d6bfc95..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.gradle
-/local.properties
-/.idea/workspace.xml
-.DS_Store
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 217af47..28bb10a 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="CompilerConfiguration">
- <option name="DEFAULT_COMPILER" value="Javac" />
- <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" />
- </wildcardResourcePatterns>
- <annotationProcessing>
- <profile default="true" name="Default" enabled="false">
- <processorPath useClasspath="true" />
- </profile>
- </annotationProcessing>
- </component>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <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" />
+ </wildcardResourcePatterns>
+ <annotationProcessing>
+ <profile default="true" name="Default" enabled="false">
+ <processorPath useClasspath="true" />
+ </profile>
+ </annotationProcessing>
+ </component>
+</project>
+
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
index 3572571..c7d1c5a 100644
--- a/.idea/copyright/profiles_settings.xml
+++ b/.idea/copyright/profiles_settings.xml
@@ -1,5 +1,3 @@
-<component name="CopyrightManager">
- <settings default="">
- <module2copyright />
- </settings>
+<component name="CopyrightManager">
+ <settings default="" />
</component> \ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index e206d70..7c62b52 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 68414fe..91294a1 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="GradleSettings">
- <option name="linkedExternalProjectsSettings">
- <GradleProjectSettings>
- <option name="distributionType" value="DEFAULT_WRAPPED" />
- <option name="externalProjectPath" value="$PROJECT_DIR$" />
- <option name="modules">
- <set>
- <option value="$PROJECT_DIR$" />
- <option value="$PROJECT_DIR$/GymLog" />
- </set>
- </option>
- </GradleProjectSettings>
- </option>
- </component>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="GradleSettings">
+ <option name="linkedExternalProjectsSettings">
+ <GradleProjectSettings>
+ <option name="distributionType" value="DEFAULT_WRAPPED" />
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
+ <option name="modules">
+ <set>
+ <option value="$PROJECT_DIR$" />
+ <option value="$PROJECT_DIR$/GymLog" />
+ </set>
+ </option>
+ </GradleProjectSettings>
+ </option>
+ </component>
+</project>
+
diff --git a/.idea/libraries/appcompat_v7_19_0_1.xml b/.idea/libraries/appcompat_v7_19_0_1.xml
deleted file mode 100644
index caf0395..0000000
--- a/.idea/libraries/appcompat_v7_19_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<component name="libraryTable">
- <library name="appcompat-v7-19.0.1">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/GymLog/build/exploded-bundles/ComAndroidSupportAppcompatV71901.aar/res" />
- <root url="jar://$PROJECT_DIR$/GymLog/build/exploded-bundles/ComAndroidSupportAppcompatV71901.aar/classes.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
-</component> \ No newline at end of file
diff --git a/.idea/libraries/support_v13_19_0_1.xml b/.idea/libraries/support_v13_19_0_1.xml
deleted file mode 100644
index b427b1e..0000000
--- a/.idea/libraries/support_v13_19_0_1.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
- <library name="support-v13-19.0.1">
- <CLASSES>
- <root url="jar://$USER_HOME$/AppData/Local/Android/android-sdk/extras/android/m2repository/com/android/support/support-v13/19.0.1/support-v13-19.0.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$USER_HOME$/AppData/Local/Android/android-sdk/extras/android/m2repository/com/android/support/support-v13/19.0.1/support-v13-19.0.1-sources.jar!/" />
- </SOURCES>
- </library>
-</component> \ No newline at end of file
diff --git a/.idea/libraries/support_v4_19_0_1.xml b/.idea/libraries/support_v4_19_0_1.xml
deleted file mode 100644
index f26603b..0000000
--- a/.idea/libraries/support_v4_19_0_1.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
- <library name="support-v4-19.0.1">
- <CLASSES>
- <root url="jar://$USER_HOME$/AppData/Local/Android/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.0.1/support-v4-19.0.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$USER_HOME$/AppData/Local/Android/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.0.1/support-v4-19.0.1-sources.jar!/" />
- </SOURCES>
- </library>
-</component> \ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 66ef826..12f86e2 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,10 +1,115 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="EntryPointsManager">
- <entry_points version="2.0" />
- </component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7 (2)" project-jdk-type="JavaSDK">
- <output url="file://$PROJECT_DIR$/build/classes" />
- </component>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="EntryPointsManager">
+ <entry_points version="2.0" />
+ </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="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/build/classes" />
+ </component>
+ <component name="RunManager">
+ <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="Applet" factoryName="Applet">
+ <module name="" />
+ <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" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <method />
+ </configuration>
+ <configuration default="true" type="TestNG" factoryName="TestNG">
+ <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="moduleWithDependencies" />
+ </option>
+ <option name="USE_DEFAULT_REPORTERS" value="false" />
+ <option name="PROPERTIES_FILE" />
+ <envs />
+ <properties />
+ <listeners />
+ <method />
+ </configuration>
+ <configuration default="true" type="Application" factoryName="Application">
+ <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="JUnit" factoryName="JUnit">
+ <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="$PROJECT_DIR$" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="moduleWithDependencies" />
+ </option>
+ <envs />
+ <patterns />
+ <method />
+ </configuration>
+ <list size="0" />
+ <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>
+ <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
+ <Host>localhost</Host>
+ <Port>5050</Port>
+ </configuration>
+ </component>
+</project>
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index f7c2684..0435951 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/GymLog.iml" filepath="$PROJECT_DIR$/GymLog.iml" />
- <module fileurl="file://$PROJECT_DIR$/GymLog/GymLog-GymLog.iml" filepath="$PROJECT_DIR$/GymLog/GymLog-GymLog.iml" />
- </modules>
- </component>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/GymLog.iml" filepath="$PROJECT_DIR$/GymLog.iml" />
+ <module fileurl="file://$PROJECT_DIR$/GymLog/GymLog-GymLog.iml" filepath="$PROJECT_DIR$/GymLog/GymLog-GymLog.iml" />
+ </modules>
+ </component>
+</project>
+
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
index 922003b..0d5175c 100644
--- a/.idea/scopes/scope_settings.xml
+++ b/.idea/scopes/scope_settings.xml
@@ -1,5 +1,5 @@
-<component name="DependencyValidationManager">
- <state>
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </state>
+<component name="DependencyValidationManager">
+ <state>
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </state>
</component> \ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index def6a6a..aee72b4 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,7 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="VcsDirectoryMappings">
- <mapping directory="" vcs="" />
- </component>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
+
diff --git a/GymLog.iml b/GymLog.iml
index c87302f..f42959d 100644
--- a/GymLog.iml
+++ b/GymLog.iml
@@ -1,15 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module 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="NewModuleRootManager" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/build/classes/main" />
- <output-test url="file://$MODULE_DIR$/build/classes/test" />
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <excludeFolder url="file://$MODULE_DIR$/.gradle" />
- <excludeFolder url="file://$MODULE_DIR$/build" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<module 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="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <excludeFolder url="file://$MODULE_DIR$/.gradle" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
diff --git a/GymLog/.gitignore b/GymLog/.gitignore
deleted file mode 100644
index 796b96d..0000000
--- a/GymLog/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/GymLog/GymLog-GymLog.iml b/GymLog/GymLog-GymLog.iml
index 794d129..d2d19c7 100644
--- a/GymLog/GymLog-GymLog.iml
+++ b/GymLog/GymLog-GymLog.iml
@@ -22,57 +22,64 @@
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/build/classes/debug" />
+ <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/r/test/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/source/rs/test/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/res/rs/test/debug" type="java-test-resource" />
+ <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/source/r/test/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/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/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" 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/debug/res" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
+ <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/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" 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/main/res" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/aidl" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/assets" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/jni" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/rs" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/res" type="java-test-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/resources" type="java-test-resource" />
+ <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/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" 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/apk" />
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
- <excludeFolder url="file://$MODULE_DIR$/build/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
+ <excludeFolder url="file://$MODULE_DIR$/build/dex" />
+ <excludeFolder url="file://$MODULE_DIR$/build/exploded-aar" />
+ <excludeFolder url="file://$MODULE_DIR$/build/exploded-bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/incremental" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/manifests" />
+ <excludeFolder url="file://$MODULE_DIR$/build/ndk" />
+ <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
+ <excludeFolder url="file://$MODULE_DIR$/build/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/res" />
+ <excludeFolder url="file://$MODULE_DIR$/build/rs" />
+ <excludeFolder url="file://$MODULE_DIR$/build/source" />
<excludeFolder url="file://$MODULE_DIR$/build/symbols" />
- <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-v13-19.0.1" level="project" />
- <orderEntry type="library" exported="" name="appcompat-v7-19.0.1" level="project" />
- <orderEntry type="library" exported="" name="support-v4-19.0.1" level="project" />
+ <orderEntry type="library" exported="" name="appcompat-v7-19.1.0" level="project" />
+ <orderEntry type="library" exported="" name="support-v4-19.1.0" level="project" />
+ <orderEntry type="library" exported="" name="support-v13-19.1.0" level="project" />
</component>
</module>
diff --git a/GymLog/build.gradle b/GymLog/build.gradle
index 68421ae..7ff9931 100644
--- a/GymLog/build.gradle
+++ b/GymLog/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'android'
android {
compileSdkVersion 19
- buildToolsVersion "19.0.3"
+ buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 14
diff --git a/GymLog/src/main/AndroidManifest.xml b/GymLog/src/main/AndroidManifest.xml
index 417ce01..d587282 100644
--- a/GymLog/src/main/AndroidManifest.xml
+++ b/GymLog/src/main/AndroidManifest.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.mikemiller.gymlog" >
-
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
- <activity
- android:name="com.mikemiller.gymlog.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>
- </application>
-
-</manifest>
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.mikemiller.gymlog" >
+
+ <application
+ android:allowBackup="true"
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
+ <activity
+ android:name="com.mikemiller.gymlog.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>
+ </application>
+
+</manifest>
diff --git a/GymLog/src/main/java/com/mikemiller/gymlog/Activity.java b/GymLog/src/main/java/com/mikemiller/gymlog/Activity.java
index bce8419..85ebf43 100644
--- a/GymLog/src/main/java/com/mikemiller/gymlog/Activity.java
+++ b/GymLog/src/main/java/com/mikemiller/gymlog/Activity.java
@@ -1,46 +1,103 @@
-package com.mikemiller.gymlog;
-
-import java.io.Serializable;
-
-/**
- * Created by Mike on 3/29/14. COPYRIGHT OLIO.
- */
-public class Activity implements Serializable {
- private String mName;
- private int mSets;
- private int mRepsLow;
- private int mRepsHigh;
- private int mWeightDecrement_percent;
- private int mRepIncrement;
-
- public Activity (String name, int sets, int repsLow, int repsHigh, int weightDecrement_percent, int repIncrement) {
- mName = name;
- mSets = sets;
- mRepsLow = repsLow;
- mRepsHigh = repsHigh;
- mWeightDecrement_percent = weightDecrement_percent;
- mRepIncrement = repIncrement;
- }
-
- public String getName() { return mName; }
- public int getSets() { return mSets; }
- public int getRepsLow() { return mRepsLow; }
- public int getRepsHigh() { return mRepsHigh; }
- public int getWeightForSet(int set, int setOneWeight) {
- double val = (int)(setOneWeight - (set - 1) * setOneWeight * (mWeightDecrement_percent / 100.0));
- return (int) (5*(Math.round(val/5))); // Round to the nearest 5 lbs
- }
- public int getRepIncrement() { return mRepIncrement; }
-
- public String getSummary(int setOneWeight, int currentReps) {
- String summary = "";
- String reps = getRepsLow() + (getRepsLow() == getRepsHigh() ? "" : " - " + getRepsHigh());
- summary += reps + " reps ("+ currentReps + ")\n\n";
- for (int i = 1; i <= getSets(); i++) {
- summary += i + ": " + getWeightForSet(i, setOneWeight);
- if (i > 1 && getRepIncrement() > 0) summary += " (+" + getRepIncrement() + " rep)";
- if (i < getSets()) summary += "\n";
- }
- return summary;
- }
-}
+package com.mikemiller.gymlog;
+
+import java.io.Serializable;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+/**
+ * Created by Mike on 3/29/14. COPYRIGHT OLIO.
+ */
+public class Activity implements Serializable {
+ private String mName;
+ private int mSets;
+ private int mRepsLow;
+ private int mRepsHigh;
+ private int mWeightDecrement_percent;
+ private int mRepIncrement;
+
+ public Activity (String name, int sets, int repsLow, int repsHigh, int weightDecrement_percent, int repIncrement) {
+ mName = name;
+ mSets = sets;
+ mRepsLow = repsLow;
+ mRepsHigh = repsHigh;
+ mWeightDecrement_percent = weightDecrement_percent;
+ mRepIncrement = repIncrement;
+ }
+
+ public String getName() { return mName; }
+ public String getSharedPreferencesName() { return "activity_data_" + mName; }
+ public int getSets() { return mSets; }
+ public int getRepsLow() { return mRepsLow; }
+ public int getRepsHigh() { return mRepsHigh; }
+ public int getWeightForSet(int set, int setOneWeight) {
+ double val = (int)(setOneWeight - (set - 1) * setOneWeight * (mWeightDecrement_percent / 100.0));
+ return (int) (5*(Math.round(val/5))); // Round to the nearest 5 lbs
+ }
+ public int getRepIncrement() { return mRepIncrement; }
+
+ public String getSummary(int setOneWeight, int currentReps, int lastWeight, int lastReps) {
+ String summary = "";
+ String reps = getRepsLow() + (getRepsLow() == getRepsHigh() ? "" : "-" + getRepsHigh());
+ summary += reps + " reps ("+ lastWeight + "x" + lastReps + ")\n\n";
+ ArrayList<String> sideWeightPerSet = getSideWeightPerSet(45, setOneWeight, getSets());
+ for (int i = 1; i <= getSets(); i++) {
+ summary += i + ": " + getWeightForSet(i, setOneWeight) + "x" + (currentReps + (i-1) * getRepIncrement()) + " (" + sideWeightPerSet.get(i-1) + ")";
+ if (i < getSets()) summary += "\n";
+ }
+ return summary;
+ }
+
+ static double[] sAvailableWeights = new double[]{45, 35, 25, 10, 5, 2.5};
+
+ private ArrayList<String> getSideWeightPerSet(int barWeight, int setOneWeight, int sets) {
+ ArrayList<String> weightPerSide = new ArrayList<String>();
+
+ DecimalFormat format = new DecimalFormat();
+ format.setDecimalSeparatorAlwaysShown(false);
+
+ ArrayList<Double> lastWeights = new ArrayList<Double>();
+
+ for(int i = sets; i >= 1; i--) {
+ int weight = getWeightForSet(i, setOneWeight);
+ double sideTotal = (weight - barWeight) / 2.0;
+ ArrayList<Double> subWeights = getSubWeights(sideTotal, lastWeights);
+ String weightPerSideForThisSet = "";
+ for(Double subWeight : subWeights) {
+ weightPerSideForThisSet = weightPerSideForThisSet + format.format(subWeight) + " ";
+ }
+ if (weightPerSideForThisSet.length() > 0) {
+ weightPerSideForThisSet = weightPerSideForThisSet.substring(0, weightPerSideForThisSet.length() - 1);
+ }
+ weightPerSide.add(0, weightPerSideForThisSet);
+ lastWeights = subWeights;
+ }
+
+ return weightPerSide;
+ }
+
+ private ArrayList<Double> getSubWeights(double total, ArrayList<Double> lastWeights) {
+ ArrayList<Double> subWeights = new ArrayList<Double>();
+
+ // We allow removing the last weight and replacing it with a larger weight. This method is meant to be called in ascending total weight order (i.e. backwards from the inverted pyramid training, so start with the final, lightest rep).
+ if (lastWeights.size() > 0) {
+ lastWeights.remove(lastWeights.size() - 1);
+ }
+ for (double weight : lastWeights) {
+ total -= weight;
+ subWeights.add(weight);
+ }
+
+ int i = 0;
+ while (i < sAvailableWeights.length) {
+ double weight = sAvailableWeights[i];
+ if (weight <= total) {
+ subWeights.add(weight);
+ total -= weight;
+ } else {
+ i++;
+ }
+ }
+
+ return subWeights;
+ }
+}
diff --git a/GymLog/src/main/java/com/mikemiller/gymlog/ActivityFragment.java b/GymLog/src/main/java/com/mikemiller/gymlog/ActivityFragment.java
index a4986ea..25dd30a 100644
--- a/GymLog/src/main/java/com/mikemiller/gymlog/ActivityFragment.java
+++ b/GymLog/src/main/java/com/mikemiller/gymlog/ActivityFragment.java
@@ -1,179 +1,209 @@
-package com.mikemiller.gymlog;
-
-import android.app.Fragment;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.view.GestureDetector;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.TextView;
-
-public class ActivityFragment extends Fragment {
-
- private Activity mActivity;
- private int mWeight = 0;
- private int mReps = 0;
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.fragment_activity, container, false);
-
- TextView name = (TextView) view.findViewById(R.id.name);
- mActivity = (Activity) getArguments().getSerializable("activity");
- name.setText(mActivity.getName());
-
- Button summary = (Button) view.findViewById(R.id.summary);
- if (savedInstanceState!= null && savedInstanceState.containsKey("count")) {
- mWeight = savedInstanceState.getInt("count");
- }
-
- summary.setText(Integer.toString(mWeight));
- summary.setOnTouchListener(new View.OnTouchListener() {
- GestureDetector doubleTapDetector = new GestureDetector(new DoubleTapDetector(getActivity()));
- GestureDetector flingDetector = new GestureDetector(getActivity(), new GestureDetector.OnGestureListener() {
- @Override
- public boolean onDown(MotionEvent e) {
- return false;
- }
-
- @Override
- public void onShowPress(MotionEvent e) {
-
- }
-
- @Override
- public boolean onSingleTapUp(MotionEvent e) {
- return false;
- }
-
- @Override
- public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
- return false;
- }
-
- @Override
- public void onLongPress(MotionEvent e) {
- decrementWeight();
- }
-
- @Override
- public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
- final float minFlingVelocity = 300;
- if (velocityY > minFlingVelocity && Math.abs(velocityX) < minFlingVelocity) {
- decrementReps();
- } else if (velocityY < -minFlingVelocity && Math.abs(velocityX) < minFlingVelocity ) {
- incrementReps();
- }
- return true;
- }
- });
-
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if (flingDetector.onTouchEvent(event)) {
- return true;
- }
- if (doubleTapDetector.onTouchEvent(event)) {
- // A double tap occurred.
- incrementWeight();
- return true;
- }
- return false;
- }
- });
-
-
- /*
- count.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- incrementWeight();
- }
- });*/
-
- return view;
- }
-
- @Override
- public void onSaveInstanceState(Bundle outState) {
- super.onSaveInstanceState(outState);
-
- outState.putInt("weight", mWeight);
- }
-
- @Override
- public void onViewStateRestored(Bundle savedInstanceState) {
- super.onViewStateRestored(savedInstanceState);
-
- if (savedInstanceState!= null && savedInstanceState.containsKey("weight")) {
- setWeight(savedInstanceState.getInt("weight"));
- }
- }
-
- private void setWeight(int weight) {
- mWeight = weight;
- Button summaryButton = (Button) getView().findViewById(R.id.summary);
- summaryButton.setText(getSummary());
- }
- private void setReps(int reps) {
- mReps = reps;
- Button summaryButton = (Button) getView().findViewById(R.id.summary);
- summaryButton.setText(getSummary());
- }
-
- private String getSummary() {
- return mActivity.getSummary(mWeight, mReps);
- }
-
- public void incrementWeight() {
- setWeight(mWeight + 5);
- }
- public void decrementWeight() {
- setWeight(mWeight - 5);
- }
- public void incrementReps() {
- setReps(mReps + 1);
- }
- public void decrementReps() {
- setReps(mReps - 1);
- }
-
- public static ActivityFragment newInstance(Activity activity) {
-
- ActivityFragment f = new ActivityFragment();
- Bundle b = new Bundle();
- b.putSerializable("activity", activity);
- f.setArguments(b);
-
- return f;
- }
-
- @Override
- public void onStop() {
- super.onStop();
- saveData();
- }
-
- private void saveData() {
- SharedPreferences.Editor outState = getActivity().getSharedPreferences(getSharedpreferencesName(), Context.MODE_APPEND).edit();
- outState.putInt("weight", mWeight);
- outState.putInt("reps", mReps);
- outState.commit();
- }
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- super.onActivityCreated(savedInstanceState);
-
- SharedPreferences activity_data = getActivity().getSharedPreferences(getSharedpreferencesName(), Context.MODE_APPEND);
- setWeight(activity_data.getInt("weight", 0));
- setReps(activity_data.getInt("reps", 0));
- }
-
- private String getSharedpreferencesName() {
- return "activity_data_" + mActivity.getName();
- }
+package com.mikemiller.gymlog;
+
+import android.app.Fragment;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.GestureDetector;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.TextView;
+
+import java.util.Calendar;
+import java.util.Date;
+
+public class ActivityFragment extends Fragment {
+
+ private Activity mActivity;
+ private int mWeight = 0;
+ private int mReps = 0;
+ private int mLastWeight = 0;
+ private int mLastReps = 0;
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.fragment_activity, container, false);
+
+ TextView name = (TextView) view.findViewById(R.id.name);
+ mActivity = (Activity) getArguments().getSerializable("activity");
+ name.setText(mActivity.getName());
+
+ Button summary = (Button) view.findViewById(R.id.summary);
+ if (savedInstanceState!= null && savedInstanceState.containsKey("count")) {
+ mWeight = savedInstanceState.getInt("count");
+ }
+
+ summary.setText(Integer.toString(mWeight));
+ summary.setOnTouchListener(new View.OnTouchListener() {
+ GestureDetector doubleTapDetector = new GestureDetector(new DoubleTapDetector(getActivity()));
+ GestureDetector flingAndLongPressDetector = new GestureDetector(getActivity(), new GestureDetector.OnGestureListener() {
+ @Override
+ public boolean onDown(MotionEvent e) {
+ return false;
+ }
+
+ @Override
+ public void onShowPress(MotionEvent e) {
+
+ }
+
+ @Override
+ public boolean onSingleTapUp(MotionEvent e) {
+ return false;
+ }
+
+ @Override
+ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
+ return false;
+ }
+
+ @Override
+ public void onLongPress(MotionEvent e) {
+ decrementWeight();
+ }
+
+ @Override
+ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
+ final float minFlingVelocity = 1000;
+ if (Math.abs(velocityX) < Math.abs(velocityY)) { // make sure we're flinging more up than sideways
+ if (velocityY > minFlingVelocity) {
+ decrementReps();
+ } else if (velocityY < -minFlingVelocity) {
+ incrementReps();
+ }
+ }
+ return true;
+ }
+ });
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (flingAndLongPressDetector.onTouchEvent(event)) {
+ return true;
+ }
+ if (doubleTapDetector.onTouchEvent(event)) {
+ // A double tap occurred.
+ incrementWeight();
+ return true;
+ }
+ return false;
+ }
+ });
+
+
+ /*
+ count.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ incrementWeight();
+ }
+ });*/
+
+ return view;
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+
+ outState.putInt("weight", mWeight);
+ outState.putInt("reps", mReps);
+ }
+
+ @Override
+ public void onViewStateRestored(Bundle savedInstanceState) {
+ super.onViewStateRestored(savedInstanceState);
+
+ if (savedInstanceState!= null && savedInstanceState.containsKey("weight")) {
+ setWeight(savedInstanceState.getInt("weight"));
+ }
+ if (savedInstanceState!= null && savedInstanceState.containsKey("reps")) {
+ setWeight(savedInstanceState.getInt("reps"));
+ }
+ }
+
+ private void setWeight(int weight) {
+ mWeight = weight;
+ refreshButton();
+ }
+ private void setReps(int reps) {
+ mReps = reps;
+ refreshButton();
+ }
+ private void setLastWeight(int weight) {
+ mLastWeight = weight;
+ refreshButton();
+ }
+ private void setLastReps(int reps) {
+ mLastReps = reps;
+ refreshButton();
+ }
+
+ private void refreshButton() {
+ Button summaryButton = (Button) getView().findViewById(R.id.summary);
+ summaryButton.setText(mActivity.getSummary(mWeight, mReps, mLastWeight, mLastReps));
+ }
+
+
+ public void incrementWeight() {
+ setWeight(mWeight + 5);
+ }
+ public void decrementWeight() {
+ setWeight(mWeight - 5);
+ }
+ public void incrementReps() {
+ setReps(mReps + 1);
+ }
+ public void decrementReps() {
+ setReps(mReps - 1);
+ }
+
+ public static ActivityFragment newInstance(Activity activity) {
+
+ ActivityFragment f = new ActivityFragment();
+ Bundle b = new Bundle();
+ b.putSerializable("activity", activity);
+ f.setArguments(b);
+
+ return f;
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ saveData();
+ }
+
+ private void saveData() {
+ SharedPreferences.Editor outState = getActivity().getSharedPreferences(mActivity.getSharedPreferencesName(), Context.MODE_APPEND).edit();
+ outState.putInt("weight", mWeight);
+ outState.putInt("reps", mReps);
+ outState.putLong("dateSaved", Calendar.getInstance().getTimeInMillis());
+ outState.commit();
+ }
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+
+ SharedPreferences activity_data = getActivity().getSharedPreferences(mActivity.getSharedPreferencesName(), Context.MODE_APPEND);
+ setWeight(activity_data.getInt("weight", 0));
+ setReps(activity_data.getInt("reps", 0));
+
+ long dateSavedMillis = activity_data.getLong("dateSaved", 0);
+ if (dateSavedMillis > 0) {
+ Date dateSaved = new Date(dateSavedMillis);
+
+ long diff = Math.abs(Calendar.getInstance().getTime().getTime() - dateSaved.getTime());
+ long diffDays = diff / (24 * 60 * 60 * 1000);
+ if (diffDays > 2) {
+ setLastWeight(mWeight);
+ setLastReps(mReps);
+ }
+ }
+
+ }
} \ No newline at end of file
diff --git a/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java b/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
index 4b42bc4..c5505e8 100644
--- a/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
+++ b/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
@@ -1,30 +1,30 @@
-package com.mikemiller.gymlog;
-
-import android.content.Context;
-import android.view.GestureDetector;
-import android.view.MotionEvent;
-
-/**
- * Created by Mike on 3/29/14. COPYRIGHT OLIO.
- */
-public class DoubleTapDetector extends GestureDetector.SimpleOnGestureListener {
- public Context context;
- public String phno;
-
- public DoubleTapDetector(Context con)
- {
- this.context=con;
- }
- @Override
- public boolean onDown(MotionEvent e) {
- return false;
- }
- @Override
- public boolean onDoubleTap(MotionEvent e) {
- return true;
- }
- @Override
- public boolean onSingleTapUp(MotionEvent e) {
- return false;
- }
+package com.mikemiller.gymlog;
+
+import android.content.Context;
+import android.view.GestureDetector;
+import android.view.MotionEvent;
+
+/**
+ * Created by Mike on 3/29/14. COPYRIGHT OLIO.
+ */
+public class DoubleTapDetector extends GestureDetector.SimpleOnGestureListener {
+ public Context context;
+ public String phno;
+
+ public DoubleTapDetector(Context con)
+ {
+ this.context=con;
+ }
+ @Override
+ public boolean onDown(MotionEvent e) {
+ return false;
+ }
+ @Override
+ public boolean onDoubleTap(MotionEvent e) {
+ return true;
+ }
+ @Override
+ public boolean onSingleTapUp(MotionEvent e) {
+ return false;
+ }
} \ No newline at end of file
diff --git a/GymLog/src/main/java/com/mikemiller/gymlog/MainActivity.java b/GymLog/src/main/java/com/mikemiller/gymlog/MainActivity.java
index e7c8f60..9659467 100644
--- a/GymLog/src/main/java/com/mikemiller/gymlog/MainActivity.java
+++ b/GymLog/src/main/java/com/mikemiller/gymlog/MainActivity.java
@@ -2,31 +2,52 @@ package com.mikemiller.gymlog;
import android.app.Fragment;
import android.app.FragmentManager;
+import android.content.Context;
+import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v13.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
+import android.util.Log;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
+import java.util.Date;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
public class MainActivity extends FragmentActivity {
SimpleCounterFragment mEpisodeFragment;
+ ArrayList<Integer> mMonday = new ArrayList<Integer>() {{
+ add(2);
+ add(3);
+ }};
+ ArrayList<Integer> mWednesday = new ArrayList<Integer>() {{
+ add(4);
+ add(5);
+ }};
+ ArrayList<Integer> mFriday = new ArrayList<Integer>() {{
+ add(6);
+ add(7);
+ add(1);
+ }};
+
// 1 = Sunday
- final Map<Integer[], Activity[]> mDaysOfWeekToActivity = new HashMap<Integer[], Activity[]>(){{
- put(new Integer[]{2, 3}, new Activity[]{
+ final Map<ArrayList<Integer>, Activity[]> mDaysOfWeekToActivity = new HashMap<ArrayList<Integer>, Activity[]>(){{
+ put(mMonday, new Activity[]{
new Activity("Barbell Deadlifts", 3, 4, 6, 10, 1),
- new Activity("Assisted Chin-ups", 3, 4, 6, 10, 1),
- new Activity("Pendlay Rows", 2, 4, 6, 10, 1) });
- put(new Integer[]{4, 5}, new Activity[]{
- new Activity("Flat Dumbell Bench Press", 3, 6, 10, 10, 1),
- new Activity("Incline Dumbell Bench Press", 2, 8, 12, 10, 1),
+ new Activity("Pendlay Rows", 2, 4, 6, 10, 1),
+ new Activity("Assisted Chin-ups", 3, 4, 6, 10, 1) });
+ put(mWednesday, new Activity[]{
+ new Activity("Flat Barbell Bench Press", 3, 6, 10, 10, 1),
+ new Activity("Incline Barbell Bench Press", 2, 8, 12, 10, 1),
new Activity("Barbell Curls", 3, 0, 8, 0, 0)});
- put(new Integer[]{6, 7, 1}, new Activity[]{
+ put(mFriday, new Activity[]{
new Activity("Barbell Squats", 2, 6, 8, 10, 1),
new Activity("Widowmaker Squats", 1, 20, 20, 0, 0),
new Activity("Stiff Legged Deadlifts", 2, 15, 20, 10, 1),
@@ -43,6 +64,9 @@ public class MainActivity extends FragmentActivity {
pager.setAdapter(new MyPagerAdapter(getFragmentManager()));
mEpisodeFragment = SimpleCounterFragment.newInstance("Whose Line");
+
+ String summary = getWeekSummary();
+ Log.d("Summary", summary);
}
// 1 = Sunday
@@ -52,18 +76,60 @@ public class MainActivity extends FragmentActivity {
}
private Activity[] getActivitiesForDayOfWeek(int dayOfWeek) {
- for(Integer[] key : mDaysOfWeekToActivity.keySet()) {
- if (Arrays.asList(key).contains(dayOfWeek)) {
+ for(ArrayList<Integer> key : mDaysOfWeekToActivity.keySet()) {
+ if (key.contains(dayOfWeek)) {
return mDaysOfWeekToActivity.get(key);
}
}
return new Activity[]{};
}
- private Activity[] getActivitiesForTody() {
+ private Activity[] getActivitiesForToday() {
return getActivitiesForDayOfWeek(getDayOfWeek());
}
+ public String getWeekSummary() {
+ ArrayList<Activity> allActivities = new ArrayList<Activity>();
+
+ for (Activity activity : mDaysOfWeekToActivity.get(mMonday)) {
+ allActivities.add(activity);
+ }
+ for (Activity activity : mDaysOfWeekToActivity.get(mWednesday)) {
+ allActivities.add(activity);
+ }
+ for (Activity activity : mDaysOfWeekToActivity.get(mFriday)) {
+ allActivities.add(activity);
+ }
+
+
+ Activity mondayActivity = mDaysOfWeekToActivity.get(mMonday)[0];
+ SharedPreferences activity_data = getSharedPreferences(mondayActivity.getSharedPreferencesName(), Context.MODE_APPEND);
+ long dateSavedMillis = activity_data.getLong("dateSaved", 0);
+
+ Calendar c = Calendar.getInstance();
+ c.setTimeInMillis(dateSavedMillis);
+ c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); // Move the date to the previous Monday
+ //System.out.println("Date " + c.getTime());
+
+ SimpleDateFormat simpleDate = new SimpleDateFormat("MM/dd/yyyy");
+ String mondayDateString = simpleDate.format(c.getTime());
+
+
+ String summary = mondayDateString + "\t";
+
+ for(Activity activity : allActivities) {
+ activity_data = getSharedPreferences(activity.getSharedPreferencesName(), Context.MODE_APPEND);
+ int weight = activity_data.getInt("weight", 0);
+ int reps = activity_data.getInt("reps", 0);
+
+ summary += weight + "x";
+ summary += reps + "\t";
+ }
+
+
+ return summary;
+ }
+
private class MyPagerAdapter extends FragmentPagerAdapter {
@@ -73,20 +139,20 @@ public class MainActivity extends FragmentActivity {
@Override
public Fragment getItem(int pos) {
- Activity[] activities = getActivitiesForTody();
+ Activity[] activities = getActivitiesForToday();
- if (pos == 0) {
+ /*if (pos == 0) {
return mEpisodeFragment;
- }
+ }*/
if (pos > activities.length) pos = activities.length;
- return ActivityFragment.newInstance(activities[pos - 1]);
+ return ActivityFragment.newInstance(activities[pos]);
}
@Override
public int getCount() {
- return getActivitiesForTody().length + 1;
+ return getActivitiesForToday().length + 1;
}
}
} \ No newline at end of file
diff --git a/GymLog/src/main/java/com/mikemiller/gymlog/SimpleCounterFragment.java b/GymLog/src/main/java/com/mikemiller/gymlog/SimpleCounterFragment.java
index a6870d0..4ec1c90 100644
--- a/GymLog/src/main/java/com/mikemiller/gymlog/SimpleCounterFragment.java
+++ b/GymLog/src/main/java/com/mikemiller/gymlog/SimpleCounterFragment.java
@@ -1,123 +1,123 @@
-package com.mikemiller.gymlog;
-
-import android.app.Fragment;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.view.GestureDetector;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.TextView;
-
-public class SimpleCounterFragment extends Fragment {
-
- private String mShow = "";
- private int mCount = 0;
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.fragment_simple_counter, container, false);
-
- TextView show = (TextView) view.findViewById(R.id.show);
- mShow = getArguments().getString("show");
- show.setText(mShow);
-
- Button count = (Button) view.findViewById(R.id.count);
- if (savedInstanceState!= null && savedInstanceState.containsKey("count")) {
- mCount = savedInstanceState.getInt("count");
- }
-
- count.setText(Integer.toString(mCount));
-
- count.setOnTouchListener(new View.OnTouchListener() {
- GestureDetector doubleTapDetector = new GestureDetector(new DoubleTapDetector(getActivity()));
-
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if (doubleTapDetector.onTouchEvent(event)) {
- // A double tap occurred.
- increment();
- return true;
- }
- return false;
- }
- });
-
- count.setOnLongClickListener(new View.OnLongClickListener() {
- @Override
- public boolean onLongClick(View v) {
- decrement();
- return true;
- }
- });
-
- return view;
- }
-
- @Override
- public void onSaveInstanceState(Bundle outState) {
- super.onSaveInstanceState(outState);
-
- outState.putInt("count", mCount);
- }
-
- @Override
- public void onViewStateRestored(Bundle savedInstanceState) {
- super.onViewStateRestored(savedInstanceState);
-
- if (savedInstanceState!= null && savedInstanceState.containsKey("count")) {
- setCount(savedInstanceState.getInt("count"));
- }
- }
-
- private void setCount(int count) {
- mCount = count;
- Button countButton = (Button) getView().findViewById(R.id.count);
- countButton.setText(Integer.toString(mCount));
-
- }
-
- public void increment() {
- setCount(mCount + 1);
- }
- public void decrement() {
- setCount(mCount - 1);
- }
-
- public static SimpleCounterFragment newInstance(String show) {
-
- SimpleCounterFragment f = new SimpleCounterFragment();
- Bundle b = new Bundle();
- b.putString("show", show);
- f.setArguments(b);
-
- return f;
- }
-
- @Override
- public void onStop() {
- super.onStop();
- saveData();
- }
-
- private void saveData() {
-
- SharedPreferences.Editor outState = getActivity().getSharedPreferences(getSharedpreferencesName(), Context.MODE_APPEND).edit();
- outState.putInt("count", mCount);
- outState.commit();
- }
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- super.onActivityCreated(savedInstanceState);
-
- SharedPreferences counter_data = getActivity().getSharedPreferences(getSharedpreferencesName(), Context.MODE_APPEND);
- setCount(counter_data.getInt("count", 0));
- }
-
- private String getSharedpreferencesName() {
- return "counter_data_" + mShow;
- }
+package com.mikemiller.gymlog;
+
+import android.app.Fragment;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.GestureDetector;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.TextView;
+
+public class SimpleCounterFragment extends Fragment {
+
+ private String mShow = "";
+ private int mCount = 0;
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.fragment_simple_counter, container, false);
+
+ TextView show = (TextView) view.findViewById(R.id.show);
+ mShow = getArguments().getString("show");
+ show.setText(mShow);
+
+ Button count = (Button) view.findViewById(R.id.count);
+ if (savedInstanceState!= null && savedInstanceState.containsKey("count")) {
+ mCount = savedInstanceState.getInt("count");
+ }
+
+ count.setText(Integer.toString(mCount));
+
+ count.setOnTouchListener(new View.OnTouchListener() {
+ GestureDetector doubleTapDetector = new GestureDetector(new DoubleTapDetector(getActivity()));
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (doubleTapDetector.onTouchEvent(event)) {
+ // A double tap occurred.
+ increment();
+ return true;
+ }
+ return false;
+ }
+ });
+
+ count.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ decrement();
+ return true;
+ }
+ });
+
+ return view;
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+
+ outState.putInt("count", mCount);
+ }
+
+ @Override
+ public void onViewStateRestored(Bundle savedInstanceState) {
+ super.onViewStateRestored(savedInstanceState);
+
+ if (savedInstanceState!= null && savedInstanceState.containsKey("count")) {
+ setCount(savedInstanceState.getInt("count"));
+ }
+ }
+
+ private void setCount(int count) {
+ mCount = count;
+ Button countButton = (Button) getView().findViewById(R.id.count);
+ countButton.setText(Integer.toString(mCount));
+
+ }
+
+ public void increment() {
+ setCount(mCount + 1);
+ }
+ public void decrement() {
+ setCount(mCount - 1);
+ }
+
+ public static SimpleCounterFragment newInstance(String show) {
+
+ SimpleCounterFragment f = new SimpleCounterFragment();
+ Bundle b = new Bundle();
+ b.putString("show", show);
+ f.setArguments(b);
+
+ return f;
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ saveData();
+ }
+
+ private void saveData() {
+
+ SharedPreferences.Editor outState = getActivity().getSharedPreferences(getSharedpreferencesName(), Context.MODE_APPEND).edit();
+ outState.putInt("count", mCount);
+ outState.commit();
+ }
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+
+ SharedPreferences counter_data = getActivity().getSharedPreferences(getSharedpreferencesName(), Context.MODE_APPEND);
+ setCount(counter_data.getInt("count", 0));
+ }
+
+ private String getSharedpreferencesName() {
+ return "counter_data_" + mShow;
+ }
} \ No newline at end of file
diff --git a/GymLog/src/main/res/layout/fragment_activity.xml b/GymLog/src/main/res/layout/fragment_activity.xml
index 5ae1af5..ed7af4e 100644
--- a/GymLog/src/main/res/layout/fragment_activity.xml
+++ b/GymLog/src/main/res/layout/fragment_activity.xml
@@ -1,31 +1,31 @@
-<?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:orientation="vertical"
- android:gravity="center_horizontal"
- android:background="@android:color/black" >
-
- <Button
- android:id="@+id/summary"
- android:layout_above="@+id/name"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_centerHorizontal="false"
- android:gravity="center_vertical"
- android:textSize="40dp"
- android:text="0"
- android:textColor="@android:color/holo_blue_dark"
- android:background="@android:color/black" />
- <TextView
- android:id="@+id/name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:gravity="center_horizontal"
- android:textSize="30dp"
- android:text="Activity Name"
- android:textColor="@android:color/holo_blue_dark" />
+<?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:orientation="vertical"
+ android:gravity="center_horizontal"
+ android:background="@android:color/black" >
+
+ <Button
+ android:id="@+id/summary"
+ android:layout_above="@+id/name"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_centerHorizontal="false"
+ android:gravity="center_vertical"
+ android:textSize="30dp"
+ android:text="0"
+ android:textColor="@android:color/holo_blue_dark"
+ android:background="@android:color/black" />
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:gravity="center_horizontal"
+ android:textSize="30dp"
+ android:text="Activity Name"
+ android:textColor="@android:color/holo_blue_dark" />
</RelativeLayout> \ No newline at end of file
diff --git a/GymLog/src/main/res/layout/fragment_simple_counter.xml b/GymLog/src/main/res/layout/fragment_simple_counter.xml
index 327677a..e6db43d 100644
--- a/GymLog/src/main/res/layout/fragment_simple_counter.xml
+++ b/GymLog/src/main/res/layout/fragment_simple_counter.xml
@@ -1,34 +1,34 @@
-<?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:orientation="vertical"
- android:gravity="center_horizontal"
- android:background="@android:color/black" >
-
-
- <Button
- android:id="@+id/count"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="true"
- android:textSize="166dp"
- android:text="0"
- android:textColor="@android:color/holo_blue_dark"
- android:background="@android:color/black" />
- <View
- android:layout_width="match_parent"
- android:layout_height="10dp"/>
- <TextView
- android:id="@+id/show"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:gravity="center_horizontal"
- android:textSize="26dp"
- android:text="Show Name"
- android:textColor="@android:color/holo_blue_dark" />
+<?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:orientation="vertical"
+ android:gravity="center_horizontal"
+ android:background="@android:color/black" >
+
+
+ <Button
+ android:id="@+id/count"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_centerHorizontal="true"
+ android:layout_centerVertical="true"
+ android:textSize="166dp"
+ android:text="0"
+ android:textColor="@android:color/holo_blue_dark"
+ android:background="@android:color/black" />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="10dp"/>
+ <TextView
+ android:id="@+id/show"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:gravity="center_horizontal"
+ android:textSize="26dp"
+ android:text="Show Name"
+ android:textColor="@android:color/holo_blue_dark" />
</RelativeLayout> \ No newline at end of file
diff --git a/GymLog/src/main/res/values/strings.xml b/GymLog/src/main/res/values/strings.xml
index 530eeb9..9c86f89 100644
--- a/GymLog/src/main/res/values/strings.xml
+++ b/GymLog/src/main/res/values/strings.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <string name="app_name">GymLog</string>
- <string name="hello_world">Hello world!</string>
- <string name="action_settings">Settings</string>
- <string name="hello_blank_fragment">Hello blank fragment</string>
-
-</resources>
+<resources>
+
+ <string name="app_name">GymLog</string>
+ <string name="hello_world">Hello world!</string>
+ <string name="action_settings">Settings</string>
+ <string name="hello_blank_fragment">Hello blank fragment</string>
+
+</resources>
diff --git a/build.gradle b/build.gradle
index 6b42096..4c8f6d8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:0.8.+'
+ classpath 'com.android.tools.build:gradle:0.11.+'
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 5de946b..acb8ce4 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#Sun Jun 22 17:38:03 PDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
diff --git a/gradlew.bat b/gradlew.bat
index 8a0b282..aec9973 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,90 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
index 9a9749d..b93c894 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include ':GymLog'
+include ':GymLog'