diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index f3f89dd..c05a46a 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/app/build.gradle b/app/build.gradle index d2099b8..53277ab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "com.iatfei.streakalarm" minSdkVersion 21 targetSdkVersion 28 - versionCode 16 - versionName "1.1.3" + versionCode 17 + versionName "1.1.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/iatfei/streakalarm/NewAboutActivity.java b/app/src/main/java/com/iatfei/streakalarm/NewAboutActivity.java index 77ba677..61746d3 100644 --- a/app/src/main/java/com/iatfei/streakalarm/NewAboutActivity.java +++ b/app/src/main/java/com/iatfei/streakalarm/NewAboutActivity.java @@ -24,6 +24,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import androidx.preference.Preference; import androidx.preference.PreferenceFragmentCompat; @@ -70,8 +71,9 @@ public static class AboutFragment extends PreferenceFragmentCompat { @Override public void onCreatePreferences(Bundle bundle, String s) { addPreferencesFromResource(R.xml.about); + String version = BuildConfig.VERSION_NAME + "-" + BuildConfig.FLAVOR + " v" + BuildConfig.VERSION_CODE; Preference ver = findPreference("edit_text_preference_2"); - Objects.requireNonNull(ver).setSummary(BuildConfig.VERSION_NAME); + Objects.requireNonNull(ver).setSummary(version); Preference license = findPreference("edit_text_preference_6"); Objects.requireNonNull(license).setIntent(new Intent(getActivity(),OpenSourceActivity.class)); diff --git a/app/src/main/java/com/iatfei/streakalarm/OpenSourceActivity.java b/app/src/main/java/com/iatfei/streakalarm/OpenSourceActivity.java index d63559a..4977f1c 100644 --- a/app/src/main/java/com/iatfei/streakalarm/OpenSourceActivity.java +++ b/app/src/main/java/com/iatfei/streakalarm/OpenSourceActivity.java @@ -21,6 +21,8 @@ package com.iatfei.streakalarm; import android.os.Bundle; +import android.view.MenuItem; + import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; @@ -57,4 +59,15 @@ public void onCreate(Bundle savedInstanceState) { .replace(R.id.container, fragment) .commit(); } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + finish(); + return true; + } + + return super.onOptionsItemSelected(item); + } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 2f5b5df..66b5e3f 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -8,7 +8,7 @@ android:layout_height="match_parent" tools:context=".MainActivity"> - + android:title="@string/menu_cancel" + android:textSize="18sp"/> + android:title="@string/menu_remindinterval" + android:textSize="18sp" /> + android:title="@string/menu_snooze" + android:textSize="18sp" /> - + android:title="@string/title_activity_about" + android:textSize="18sp" /> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 99506ee..a335d0c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,7 +15,7 @@ The past is in the past. Sent streak just now Sent streak some time earlier - Set reminder interval + Set Reminder Interval Open Snapchat Snapchat not installed! How long ago? (as shown on Snapchat) @@ -96,7 +96,7 @@ Long ago… Unknown Snooze - Set snooze duration + Set Snooze Duration How long should snooze last (in minutes)? Your reminder will be deferred for %1$d minutes when you press the Snooze button.