1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-28 18:49:56 +02:00

Don't keep date format in static variable

It needs to be updated if the locale (language) is changed.
This commit is contained in:
Erik Johansson
2018-06-20 21:28:12 +02:00
parent acb2cd7027
commit 854d600424

View File

@@ -31,11 +31,12 @@ public class DateMeasurementView extends MeasurementView {
// Don't change key value, it may be stored persistent in preferences
public static final String KEY = "date";
private static final DateFormat dateFormat = DateFormat.getDateInstance();
private final DateFormat dateFormat;
private Date date;
public DateMeasurementView(Context context) {
super(context, R.string.label_date, R.drawable.ic_lastmonth);
dateFormat = DateFormat.getDateInstance();
}
@Override