Skip to content

Commit c98cbfb

Browse files
committed
V 0.1.3 Beta
1 parent 32215f5 commit c98cbfb

22 files changed

Lines changed: 98 additions & 267 deletions

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A 'Drink water!' notification like shown above will be displayed if you have not
3636
When all 5 glasses are empty, the notifications will no longer come (until you restart them), and a 'Congratulations' message will appear!
3737

3838
## Download
39-
[Download the APK](https://github.com/ktprograms/WaterTracker/blob/master/app/release/WaterTracker0.1.2beta.apk)
39+
[Download the APK](https://github.com/ktprograms/WaterTracker/blob/master/app/release/WaterTracker0.1.3beta.apk)
4040

4141
## Checksums (All versions)
4242
**V 0.1.0 Beta:**
@@ -57,6 +57,11 @@ When all 5 glasses are empty, the notifications will no longer come (until you r
5757
>
5858
>SHA1: 857f9f8babcacde37f9d7ccc118d9fd993c2f1c2
5959
60+
**V 0.1.3 Beta:**
61+
>MD5: 7335d4fa04193f6cad6bab63cc7aad3c
62+
>
63+
>SHA1: 6894bdab669aabd745263349ff3c4eb7dc730dd9
64+
6065
# Changelogs
6166
**V 0.1.0 Beta:**
6267

@@ -69,3 +74,7 @@ When all 5 glasses are empty, the notifications will no longer come (until you r
6974
**V 0.1.2 Beta:**
7075

7176
>Converted images to SVG
77+
78+
**V 0.1.3 Beta:**
79+
80+
>Fixed dark mode visual issues.

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ plugins {
2727

2828
android {
2929
compileSdkVersion 30
30-
buildToolsVersion "30.0.2"
30+
buildToolsVersion "30.0.3"
3131

3232
defaultConfig {
3333
applicationId "com.ktprograms.watertracker"
3434
minSdkVersion 23
3535
targetSdkVersion 30
36-
versionCode 3
37-
versionName "0.1.2-beta"
36+
versionCode 4
37+
versionName "0.1.3-beta"
3838

3939
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4040
}
@@ -56,12 +56,12 @@ android {
5656

5757
dependencies {
5858

59-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
59+
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.32"
6060
implementation 'androidx.core:core-ktx:1.3.2'
6161
implementation 'androidx.appcompat:appcompat:1.2.0'
62-
implementation 'com.google.android.material:material:1.1.0'
63-
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
64-
testImplementation 'junit:junit:4.+'
62+
implementation 'com.google.android.material:material:1.3.0'
63+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
64+
testImplementation 'junit:junit:4.13.2'
6565
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
6666
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
6767
implementation "com.android.support:support-compat:28.0.0"
3.26 MB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
{
1111
"type": "SINGLE",
1212
"filters": [],
13-
"versionCode": 3,
14-
"versionName": "0.1.2-beta",
13+
"versionCode": 4,
14+
"versionName": "0.1.3-beta",
1515
"outputFile": "app-release.apk"
1616
}
1717
]

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626

2727
<application
2828
android:allowBackup="true"
29-
android:icon="@drawable/app_icon"
29+
android:icon="@mipmap/ic_launcher"
3030
android:label="@string/app_name"
31-
android:roundIcon="@drawable/app_icon"
31+
android:roundIcon="@mipmap/ic_launcher_round"
3232
android:supportsRtl="true"
3333
android:theme="@style/Theme.WaterTracker"
3434
>
3535
<activity
3636
android:name=".MainActivity"
37-
android:screenOrientation="landscape"
37+
android:screenOrientation="sensorLandscape"
3838
>
3939
<intent-filter>
4040
<action android:name="android.intent.action.MAIN" />

app/src/main/java/com/ktprograms/watertracker/MainActivity.kt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import android.app.NotificationManager
2828
import android.app.PendingIntent
2929
import android.content.Intent
3030
import android.content.SharedPreferences
31+
import android.content.res.Configuration
3132
import android.os.Build
3233
import android.os.Bundle
3334
import android.text.Editable
@@ -52,7 +53,7 @@ class MainActivity : AppCompatActivity() {
5253

5354
// Initialize arrays
5455
private val glassAmounts = mutableListOf(0, 0, 0, 0, 0) // 0 -> full, 4 -> empty
55-
private val glassLevels = listOf(
56+
private val glassImages = listOf(
5657
R.drawable.glass_100,
5758
R.drawable.glass_75,
5859
R.drawable.glass_50,
@@ -73,6 +74,8 @@ class MainActivity : AppCompatActivity() {
7374
override fun onCreate(savedInstanceState: Bundle?) {
7475
super.onCreate(savedInstanceState)
7576
setContentView(R.layout.activity_main)
77+
78+
// Put the app icon in the app bar
7679
supportActionBar?.setDisplayShowHomeEnabled(true)
7780
supportActionBar?.setIcon(R.drawable.app_icon)
7881
supportActionBar?.setDisplayUseLogoEnabled(true)
@@ -219,11 +222,11 @@ class MainActivity : AppCompatActivity() {
219222
}
220223

221224
private fun updateUI() {
222-
glass1!!.setBackgroundResource(glassLevels[glassAmounts[0]])
223-
glass2!!.setBackgroundResource(glassLevels[glassAmounts[1]])
224-
glass3!!.setBackgroundResource(glassLevels[glassAmounts[2]])
225-
glass4!!.setBackgroundResource(glassLevels[glassAmounts[3]])
226-
glass5!!.setBackgroundResource(glassLevels[glassAmounts[4]])
225+
glass1!!.setBackgroundResource(glassImages[glassAmounts[0]])
226+
glass2!!.setBackgroundResource(glassImages[glassAmounts[1]])
227+
glass3!!.setBackgroundResource(glassImages[glassAmounts[2]])
228+
glass4!!.setBackgroundResource(glassImages[glassAmounts[3]])
229+
glass5!!.setBackgroundResource(glassImages[glassAmounts[4]])
227230
minsEditText!!.setText("$wait")
228231
val displayText = if (running) "" else " not"
229232
alarmTextView!!.text = "Water alarm is currently$displayText running"
@@ -253,7 +256,7 @@ class MainActivity : AppCompatActivity() {
253256
4 -> glass5
254257
else -> null
255258
}
256-
glass!!.setBackgroundResource(glassLevels[glassAmounts[i]])
259+
glass!!.setBackgroundResource(glassImages[glassAmounts[i]])
257260
setLLVisibilities()
258261

259262
// Update the shared preferences

app/src/main/res/drawable-v24/ic_launcher_foreground.xml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,16 @@
2626
android:height="108dp"
2727
android:viewportWidth="108"
2828
android:viewportHeight="108">
29-
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
30-
<aapt:attr name="android:fillColor">
31-
<gradient
32-
android:endX="85.84757"
33-
android:endY="92.4963"
34-
android:startX="42.9492"
35-
android:startY="49.59793"
36-
android:type="linear">
37-
<item
38-
android:color="#44000000"
39-
android:offset="0.0" />
40-
<item
41-
android:color="#00000000"
42-
android:offset="1.0" />
43-
</gradient>
44-
</aapt:attr>
45-
</path>
46-
<path
47-
android:fillColor="#FFFFFF"
48-
android:fillType="nonZero"
49-
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
50-
android:strokeWidth="1"
51-
android:strokeColor="#00000000" />
29+
30+
<group
31+
android:scaleX="0.67716"
32+
android:scaleY="0.67716"
33+
android:translateX="26.9136"
34+
android:translateY="26.412">
35+
36+
<path android:fillColor="#FF0000FF"
37+
android:strokeWidth="5"
38+
android:strokeColor="#FF000000"
39+
android:pathData="M45,7 L25,42 C00,87 80,77 55,47 Q39,32 45,7 Z" />
40+
</group>
5241
</vector>

app/src/main/res/drawable/app_icon.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<!--
23
~ GNU General Public License v3.0
34
~
@@ -26,13 +27,8 @@
2627
android:viewportWidth="80.0"
2728
android:viewportHeight="80.0">
2829

29-
<path android:fillColor="#FF00BFFF"
30-
android:strokeWidth="0"
31-
android:strokeColor="#00000000"
32-
android:pathData="M0,0 L80,0 L80,80 L0,80 Z" />
33-
3430
<path android:fillColor="#FF0000FF"
3531
android:strokeWidth="5"
36-
android:strokeColor="#FF000000"
37-
android:pathData="M45,7 L25,42 C00,87 80,77 55,47 Q39,32 45,7 Z" />
32+
android:strokeColor="#FF777777"
33+
android:pathData="M45,7 L25,42 C00,87 80,77 55,47 Q39,32 45,7 Z" />
3834
</vector>

app/src/main/res/drawable/glass_0.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<!--
23
~ GNU General Public License v3.0
34
~
@@ -27,6 +28,6 @@
2728
android:viewportHeight="100.0">
2829
<path android:fillColor="#00FFFFFF"
2930
android:strokeWidth="3"
30-
android:strokeColor="#FF000000"
31-
android:pathData="M10,10 L70,10 L60,90 L20,90 L10,10 Z" />
31+
android:strokeColor="#FF777777"
32+
android:pathData="M10,10 L70,10 L60,90 L20,90 L10,10 Z" />
3233
</vector>

app/src/main/res/drawable/glass_100.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<!--
23
~ GNU General Public License v3.0
34
~
@@ -28,10 +29,10 @@
2829
<path android:fillColor="#FF0000FF"
2930
android:strokeWidth="0"
3031
android:strokeColor="#00000000"
31-
android:pathData="M10,10 L70,10 L60,90 L20,90 L10,10 Z" />
32+
android:pathData="M10,10 L70,10 L60,90 L20,90 L10,10 Z" />
3233

3334
<path android:fillColor="#00FFFFFF"
3435
android:strokeWidth="3"
35-
android:strokeColor="#FF000000"
36-
android:pathData="M10,10 L70,10 L60,90 L20,90 L10,10 Z" />
36+
android:strokeColor="#FF777777"
37+
android:pathData="M10,10 L70,10 L60,90 L20,90 L10,10 Z" />
3738
</vector>

0 commit comments

Comments
 (0)