Skip to content

Commit

Permalink
update for V1.8
Browse files Browse the repository at this point in the history
Bugfix
Show date in course of day header
  • Loading branch information
woheller69 committed Jun 13, 2023
1 parent 4752f96 commit 23caf89
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
8 changes: 2 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ android {

compileSdkVersion 32

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "org.woheller69.solxpect"
minSdkVersion 26
targetSdkVersion 31
versionCode 17
versionName "1.7"
versionCode 18
versionName "1.8"

buildConfigField "String", "BASE_URL", "\"https://api.open-meteo.com/v1/\""
buildConfigField "String", "GITHUB_URL","\"https://github.com/woheller69/solxpect/\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
import androidx.preference.PreferenceManager;

import androidx.core.content.res.ResourcesCompat;
import org.woheller69.weather.R;
import org.woheller69.weather.preferences.AppPreferencesManager;

import java.math.RoundingMode;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
Expand Down Expand Up @@ -60,6 +58,12 @@ public static String formatTimeWithoutZone(Context context, long time) {
return df.format(time);
}

public static String formatDate(long time) {
java.text.DateFormat df = java.text.DateFormat.getDateInstance(DateFormat.SHORT);
df.setTimeZone(TimeZone.getTimeZone("GMT"));
return df.format(time);
}

public static Integer getDayShort(int day){

switch(day) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void updateRecyclerViewHeader() {
HeaderTime.setTimeInMillis(courseOfDayList.get(visiblePosition).getLocalForecastTime(context));
int headerday = HeaderTime.get(Calendar.DAY_OF_WEEK);
headerday = StringFormatUtils.getDayLong(headerday);
recyclerViewHeader.setText(context.getResources().getString(headerday));
recyclerViewHeader.setText(context.getResources().getString(headerday) + " (" + StringFormatUtils.formatDate(courseOfDayList.get(visiblePosition).getLocalForecastTime(context)) + ")");

courseOfDayHeaderDate=HeaderTime.getTime();

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<string name="about_where_from">Woher kommen die Wetterinformationen?</string>
<string name="about_where_from_answer">Die Wetterinformationen stammen von</string>
<string name="activity_about">Über</string>
<string name="version_number">Version</string>
<string name="activity_weather">Vorhersage</string>
<string name="activity_manage">Orte verwalten</string>
<string name="activity_settings">Einstellungen</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<string name="card_error_content">Please try to update!</string>
<string name="about_privacy_heading">Privacy Info</string>
<string name="about">About</string>
<string name="version_number" translatable="false">Version</string>
<string name="version_number">Version</string>
<string name="about_license">License</string>
<string name="about_license_text">This application is derived from Privacy Friendly Weather, developed by the research group SECUSO. Sourcecode licensed under GPLv3. The app uses icons from Google Material Design Icons licensed under Apache License Version 2.0, the Leaflet library which is licensed under 2-clause BSD License, AutoSuggestTextViewAPICall which is licensed under Apache License Version 2.0, Solarpositioning (net.e175.klaus:solarpositioning) which is licensed under MIT License, Zip4j (https://github.com/srikanth-lingala/zip4j) which is licensed under Apache License Version 2.0, CompassView (https://github.com/kix2902/CompassView) which is licensed under Apache License Version 2.0, and WilliamChart library (com.db.chart) which is licensed under Apache License Version 2.0</string>
<string name="about_more_info">More information can be found on:</string>
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/18.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Show date in course of day header
Bugfixes

0 comments on commit 23caf89

Please sign in to comment.