mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-29 19:20:36 +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:
@@ -31,11 +31,12 @@ public class DateMeasurementView extends MeasurementView {
|
|||||||
// Don't change key value, it may be stored persistent in preferences
|
// Don't change key value, it may be stored persistent in preferences
|
||||||
public static final String KEY = "date";
|
public static final String KEY = "date";
|
||||||
|
|
||||||
private static final DateFormat dateFormat = DateFormat.getDateInstance();
|
private final DateFormat dateFormat;
|
||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
public DateMeasurementView(Context context) {
|
public DateMeasurementView(Context context) {
|
||||||
super(context, R.string.label_date, R.drawable.ic_lastmonth);
|
super(context, R.string.label_date, R.drawable.ic_lastmonth);
|
||||||
|
dateFormat = DateFormat.getDateInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user