mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-18 06:37:47 +01:00
Modify Charts Fragment's Titles
This commit is contained in:
parent
28fde846ea
commit
80bd31d894
@ -338,6 +338,24 @@ public class ChartsActivity extends AbstractGBFragmentActivity implements Charts
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getSleepTitle() {
|
||||||
|
if (GBApplication.getPrefs().getBoolean("charts_range", true)) {
|
||||||
|
return getString(R.string.weeksleepchart_sleep_a_month);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return getString(R.string.weeksleepchart_sleep_a_week);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStepsTitle() {
|
||||||
|
if (GBApplication.getPrefs().getBoolean("charts_range", true)) {
|
||||||
|
return getString(R.string.weekstepschart_steps_a_month);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return getString(R.string.weekstepschart_steps_a_week);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getPageTitle(int position) {
|
public CharSequence getPageTitle(int position) {
|
||||||
switch (position) {
|
switch (position) {
|
||||||
@ -346,9 +364,9 @@ public class ChartsActivity extends AbstractGBFragmentActivity implements Charts
|
|||||||
case 1:
|
case 1:
|
||||||
return getString(R.string.sleepchart_your_sleep);
|
return getString(R.string.sleepchart_your_sleep);
|
||||||
case 2:
|
case 2:
|
||||||
return getString(R.string.weeksleepchart_sleep_a_week);
|
return getSleepTitle();
|
||||||
case 3:
|
case 3:
|
||||||
return getString(R.string.weekstepschart_steps_a_week);
|
return getStepsTitle();
|
||||||
case 4:
|
case 4:
|
||||||
return getString(R.string.stats_title);
|
return getString(R.string.stats_title);
|
||||||
case 5:
|
case 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user