Skip to content

Commit

Permalink
Release 1.1.4 - Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fei0316 committed Apr 7, 2019
1 parent 38fb1ab commit 2524e74
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));

Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/iatfei/streakalarm/OpenSourceActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:layout_height="match_parent"
tools:context=".MainActivity">

<com.google.android.material.appbar.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/app_bar"
Expand Down
23 changes: 8 additions & 15 deletions app/src/main/res/menu/main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@

<item
android:id="@+id/menu_stopalarm"
android:checkable="false"
android:title="@string/menu_cancel" />
android:title="@string/menu_cancel"
android:textSize="18sp"/>
<item
android:id="@+id/menu_setinterval"
android:title="@string/menu_remindinterval" />
android:title="@string/menu_remindinterval"
android:textSize="18sp" />
<item
android:id="@+id/menu_snooze"
android:title="@string/menu_snooze" />
android:title="@string/menu_snooze"
android:textSize="18sp" />
<item
android:id="@+id/about"
android:title="@string/title_activity_about" />
<!--<item android:title="Ðébúg">
<menu>
<item
android:id="@+id/debug_1"
android:title="§þá®þ §é®ví©é" />
<item
android:id="@+id/debug_2"
android:title="§þóö §é®ví©é" />
</menu>
</item>-->
android:title="@string/title_activity_about"
android:textSize="18sp" />
</menu>
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<string name="restart" translatable="false">The past is in the past.</string>
<string name="menu_justnow">Sent streak just now</string>
<string name="menu_customtime">Sent streak some time earlier</string>
<string name="menu_remindinterval">Set reminder interval</string>
<string name="menu_remindinterval">Set Reminder Interval</string>
<string name="menu_opensnapchat">Open Snapchat</string>
<string name="nosnapapp">Snapchat not installed!</string>
<string name="snapbefore_title">How long ago? (as shown on Snapchat)</string>
Expand Down Expand Up @@ -96,7 +96,7 @@
<string name="main_long_ago">Long ago…</string>
<string name="main_new">Unknown</string>
<string name="notif_snooze">Snooze</string>
<string name="menu_snooze">Set snooze duration</string>
<string name="menu_snooze">Set Snooze Duration</string>
<string name="snooze_length_title">How long should snooze last (in minutes)?</string>
<string name="snooze_set">Your reminder will be deferred for %1$d minutes when you press the Snooze button.</string>
</resources>

0 comments on commit 2524e74

Please sign in to comment.