Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Now using showSeekBarValue instead of putting it on summary
Browse files Browse the repository at this point in the history
Signed-off-by: micrusa <micrusa@hotmail.es>
  • Loading branch information
micrusa committed Apr 29, 2020
1 parent 327293b commit 7876aa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
break;
case "age":
bodyFile.set(defValues.sAge, (int) newValue);
preference.setSummary(newValue.toString());
break;
case "weight":
bodyFile.set(defValues.sWeight, (int) newValue);
preference.setSummary(newValue.toString() + "Kg");
break;
case "huamiactivity":
file.set(defValues.sLongPrepare, (Boolean) newValue);
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@
android:defaultValue="70"
android:key="weight"
android:max="150"
android:summary="70"
android:title="@string/weight" />
android:summary="Kg"
android:title="@string/weight"
app:showSeekBarValue="true"/>

<SeekBarPreference
android:max="100"
android:defaultValue="20"
android:key="age"
android:summary="20"
app:showSeekBarValue="true"
android:title="@string/age" />

</PreferenceCategory>
Expand Down

0 comments on commit 7876aa8

Please sign in to comment.