Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Create a new enum WeightUnit ; #187 - subtask.
Browse files Browse the repository at this point in the history
  • Loading branch information
nishabhatia98 committed Nov 17, 2023
1 parent ec631f6 commit 5655e08
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/java/de/dennisguse/opentracks/settings/WeightUnit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package de.dennisguse.opentracks.settings;

import de.dennisguse.opentracks.R;

public enum WeightUnit {
POUND(R.string.unit_pound),
KILOGRAM(R.string.unit_kilogram);

private final int preferenceIdentifier;

WeightUnit(int preferenceIdentifier) {
this.preferenceIdentifier = preferenceIdentifier;
}

public int getPreferenceId() {
return preferenceIdentifier;
}

// If you need a default value, you can define it here
public static WeightUnit defaultWeightUnit() {
return KILOGRAM;
}
}

0 comments on commit 5655e08

Please sign in to comment.