Commit f24032fb authored by alaskalinuxuser's avatar alaskalinuxuser
Browse files

Added continuous alarm option.

parent bb1ebbf0
......@@ -6,8 +6,8 @@
</shared>
</component>
<component name="AndroidLogFilters">
<option name="TOOL_WINDOW_CUSTOM_FILTER" value="WJH" />
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
<option name="TOOL_WINDOW_LOG_LEVEL" value="verbose" />
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="No Filters" />
</component>
<component name="ChangeListManager">
<list default="true" id="ad38bcdc-029a-4e13-a608-afe58bc65727" name="Default" comment="">
......@@ -16,14 +16,14 @@
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin" afterPath="$PROJECT_DIR$/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin" afterPath="$PROJECT_DIR$/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin" afterPath="$PROJECT_DIR$/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin" afterPath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock" afterPath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock" afterPath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock" afterPath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock" afterPath="$PROJECT_DIR$/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/app.iml" afterPath="$PROJECT_DIR$/app/app.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/build.gradle" afterPath="$PROJECT_DIR$/app/build.gradle" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/MainActivity.java" afterPath="$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/MainActivity.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/src/main/res/layout/activity_main.xml" afterPath="$PROJECT_DIR$/app/src/main/res/layout/activity_main.xml" />
</list>
<ignored path="Hourglass.iws" />
<ignored path=".idea/workspace.xml" />
......@@ -58,13 +58,46 @@
<file leaf-file-name="MainActivity.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/MainActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="156" column="75" selection-start-line="156" selection-start-column="75" selection-end-line="156" selection-end-column="75" />
<state relative-caret-position="255">
<caret line="219" column="36" selection-start-line="219" selection-start-column="36" selection-end-line="219" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="build.gradle" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="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>
</file>
<file leaf-file-name="build.gradle" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="21" selection-start-line="9" selection-start-column="21" selection-end-line="9" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="activity_main.xml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/res/layout/activity_main.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="87" column="47" selection-start-line="87" selection-start-column="47" selection-end-line="87" selection-end-column="47" />
<folding />
</state>
</provider>
<provider editor-type-id="android-designer2">
<state />
</provider>
</entry>
</file>
</leaf>
</component>
<component name="GenerateSignedApkSettings">
......@@ -1485,7 +1518,7 @@
</option>
<option name="modificationStamps">
<map>
<entry key="$PROJECT_DIR$" value="4501470742988" />
<entry key="$PROJECT_DIR$" value="4501479290254" />
</map>
</option>
<option name="projectBuildClasspath">
......@@ -1836,8 +1869,9 @@
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/app/src/main/res/values/strings.xml" />
<option value="$PROJECT_DIR$/app/build.gradle" />
<option value="$PROJECT_DIR$/app/src/main/res/layout/activity_main.xml" />
<option value="$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/MainActivity.java" />
<option value="$PROJECT_DIR$/app/build.gradle" />
</list>
</option>
</component>
......@@ -1882,6 +1916,10 @@
<option name="myItemId" value="Hourglass" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Gradle Scripts" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidBuildScriptsGroupNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
......@@ -2199,6 +2237,7 @@
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Android Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32953104" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" 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" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
......@@ -2266,36 +2305,44 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/SetScaleActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="23" column="13" selection-start-line="23" selection-start-column="13" selection-end-line="23" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/res/layout/activity_main.xml">
<provider editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="87" column="47" selection-start-line="87" selection-start-column="47" selection-end-line="87" selection-end-column="47" />
<folding />
</state>
</provider>
<provider selected="true" editor-type-id="android-designer2">
<provider editor-type-id="android-designer2">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/SetScaleActivity.java">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="23" column="13" selection-start-line="23" selection-start-column="13" selection-end-line="23" selection-end-column="13" />
<state relative-caret-position="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$/app/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="24" selection-start-line="10" selection-start-column="24" selection-end-line="10" selection-end-column="24" />
<state relative-caret-position="135">
<caret line="9" column="21" selection-start-line="9" selection-start-column="21" selection-end-line="9" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/com/alaskalinuxuser/hourglass/MainActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="156" column="75" selection-start-line="156" selection-start-column="75" selection-end-line="156" selection-end-column="75" />
<state relative-caret-position="255">
<caret line="219" column="36" selection-start-line="219" selection-start-column="36" selection-end-line="219" selection-end-column="36" />
<folding />
</state>
</provider>
......
......@@ -7,8 +7,8 @@ android {
applicationId "com.alaskalinuxuser.hourglass"
minSdkVersion 15
targetSdkVersion 24
versionCode 7
versionName "1.7"
versionCode 8
versionName "1.8"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
......
......@@ -41,7 +41,7 @@ public class MainActivity extends AppCompatActivity {
// Define the imageView.
ImageView myHourGlass;
ImageView vibe, recure;
ImageView vibe, recure, alre;
// Define the sound choice button.
Button soundChoices;
// Define the media player.
......@@ -57,7 +57,7 @@ public class MainActivity extends AppCompatActivity {
// Define the strings.
String minutes, seconds, mi, se, theButton;
// Declare our boolean.
boolean vibrateYes, recureYes;
boolean vibrateYes, recureYes, alreYes;
// Declare the manual time string and edittext box.
String manualTime;
EditText manualText;
......@@ -204,11 +204,18 @@ public class MainActivity extends AppCompatActivity {
startCount(recureTime, countBy);
} else {
// Cancel the notification.
mNotificationManager.cancel(0);
// Set the time bar back to usable.
timeBar.setEnabled(true);
if (alreYes) {
startCount(2000,1000);
} else {
// Cancel the notification.
mNotificationManager.cancel(0);
// Set the time bar back to usable.
timeBar.setEnabled(true);
}
// Set the time.
timeGoing.setText("00:00");
......@@ -217,6 +224,7 @@ public class MainActivity extends AppCompatActivity {
Toast timeUp = Toast.makeText(getApplicationContext(), "Time is up!",
Toast.LENGTH_LONG);
timeUp.show();
}
}
};
......@@ -268,6 +276,9 @@ public class MainActivity extends AppCompatActivity {
recureYes = false;
recure = (ImageView) findViewById(R.id.recurView);
recure.setImageResource(R.drawable.notrecur);
alreYes = false;
alre = (ImageView) findViewById(R.id.alreView);
alre.setImageResource(R.drawable.noalarmrecur);
// Define the manual entry layout view.
manualEntryLayout = (LinearLayout) findViewById(R.id.manEntryLayout);
......@@ -399,6 +410,26 @@ public class MainActivity extends AppCompatActivity {
}
public void alreChoice (View alreView) {
if (alreYes) {
// Set the boolean.
alreYes = false;
// Set the image.
alre.setImageResource(R.drawable.noalarmrecur);
} else {
// Set the boolean.
alreYes = true;
// Set the image.
alre.setImageResource(R.drawable.alarmrecur);
}
}
// When we click on the text for manual entry.
public void manualEntry (View manView) {
......
......@@ -89,6 +89,15 @@
android:layout_alignRight="@+id/timerView"
android:layout_alignEnd="@+id/timerView" />
<ImageView
android:id="@+id/alreView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/vibView"
android:onClick="alreChoice"
android:layout_centerHorizontal="true"
app:srcCompat="@drawable/noalarmrecur" />
<ImageView
android:id="@+id/recurView"
android:layout_width="wrap_content"
......@@ -105,7 +114,8 @@
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:gravity="top|center"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="invisible">
<TextView
android:id="@+id/textView"
......@@ -142,4 +152,5 @@
android:text="@string/explain"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment