Skip to content

Commit

Permalink
Update the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
burgyl committed Sep 8, 2020
1 parent 37e8331 commit 5ddc189
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "ch.lburgy.heiafrschedule"
minSdkVersion 18
targetSdkVersion 29
versionCode 3
versionName "1.0.2"
versionCode 4
versionName "1.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ public boolean onPreferenceClick(Preference preference) {
}
});

findPreference(getString(R.string.settings_key_developer)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:[email protected]"));
startActivity(browserIntent);
return true;
}
});

findPreference(getString(R.string.settings_key_license_httpcomponents)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable-night/ic_calendar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<path
android:fillColor="@android:color/white"
android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable-night/ic_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_calendar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#000000">
<path
android:fillColor="@android:color/white"
android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#000000">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>
2 changes: 2 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@
<string name="see_github_title">Siehe das Projekt auf GitHub</string>
<string name="data_schedule_dates">Zeitplan vom %1$s bis %2$s</string>
<string name="new_schedules">Neue Zeitpläne sind verfügbar !</string>
<string name="developer_description">Lizenziert unter der GNU GPL v3.0-Lizenz</string>
<string name="developer_title">Entwickelt von Lucas Bürgy</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@
<string name="license_httpcomponents_description">par The Apache Software Foundation, sous license Apache 2.0</string>
<string name="data_schedule_dates">Horaires du %1$s au %2$s</string>
<string name="new_schedules">De nouveaux horaires sont disponibles !</string>
<string name="developer_title">Développée par Lucas Bürgy</string>
<string name="developer_description">Sous license GNU GPL v3.0</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@
<string name="see_github_title">Vedi il progetto su GitHub</string>
<string name="data_schedule_dates">Orari dal %1$s al %2$s</string>
<string name="new_schedules">Sono disponibili nuovi orari !</string>
<string name="developer_description">Con licenza GNU GPL v3.0</string>
<string name="developer_title">Sviluppato da Lucas Bürgy</string>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<string name="settings_key_delete_data" translatable="false">delete_data</string>
<string name="settings_key_data_schedule_dates" translatable="false">data_schedule_date</string>
<string name="settings_key_see_github" translatable="false">github</string>
<string name="settings_key_developer" translatable="false">developer</string>
<string name="settings_key_license_httpcomponents" translatable="false">license_httpcomponents</string>
<string name="settings_key_license_jsoup" translatable="false">license_jsoup</string>
<string name="settings_key_license_moshi" translatable="false">license_moshi</string>
Expand All @@ -78,6 +79,8 @@

<!-- About Settings -->
<string name="see_github_title">See the project on GitHub</string>
<string name="developer_title">Developed by Lucas Bürgy</string>
<string name="developer_description">Licensed under the GNU GPL v3.0 license</string>

<!-- Licenses Settings -->
<string name="license_httpcomponents_title" translatable="false">Apache HttpComponents</string>
Expand Down
9 changes: 7 additions & 2 deletions app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@

<Preference
app:icon="@drawable/ic_delete"
app:iconSpaceReserved="false"
app:key="@string/settings_key_delete_data"
app:title="@string/delete_data" />

<Preference
app:iconSpaceReserved="false"
app:icon="@drawable/ic_calendar"
app:isPreferenceVisible="false"
app:key="@string/settings_key_data_schedule_dates" />

Expand All @@ -67,6 +66,12 @@
app:key="@string/settings_key_see_github"
app:title="@string/see_github_title" />

<Preference
app:icon="@drawable/ic_info"
app:key="@string/settings_key_developer"
app:summary="@string/developer_description"
app:title="@string/developer_title" />

</PreferenceCategory>

<PreferenceCategory
Expand Down

0 comments on commit 5ddc189

Please sign in to comment.