update for V1.8

Bugfix
Show date in course of day header
This commit is contained in:
woheller69 2023-06-13 08:17:51 +02:00
parent 4752f96609
commit 23caf89c8e
6 changed files with 14 additions and 11 deletions

View file

@ -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/\""

View file

@ -2,14 +2,12 @@ package org.woheller69.weather.ui.Help;
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;
@ -60,6 +58,12 @@ public final class StringFormatUtils {
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) {

View file

@ -128,7 +128,7 @@ public class CourseOfDayAdapter extends RecyclerView.Adapter<CourseOfDayAdapter.
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();

View file

@ -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>

View file

@ -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>

View file

@ -0,0 +1,2 @@
Show date in course of day header
Bugfixes