mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-12 17:26:35 +02:00
Add size setting to today and goals widgets
This commit is contained in:
parent
5a1cdc2506
commit
204c4f096d
@ -180,7 +180,7 @@ public class DashboardFragment extends Fragment {
|
||||
if (prefs.getBoolean("dashboard_widget_today_enabled", true)) {
|
||||
if (todayWidget == null) {
|
||||
todayWidget = DashboardTodayWidget.newInstance(dashboardData);
|
||||
createWidget(todayWidget, cardsEnabled, 2);
|
||||
createWidget(todayWidget, cardsEnabled, prefs.getBoolean("dashboard_widget_today_2columns", true) ? 2 : 1);
|
||||
} else {
|
||||
todayWidget.update();
|
||||
}
|
||||
@ -188,7 +188,7 @@ public class DashboardFragment extends Fragment {
|
||||
if (prefs.getBoolean("dashboard_widget_goals_enabled", true)) {
|
||||
if (goalsWidget == null) {
|
||||
goalsWidget = DashboardGoalsWidget.newInstance(dashboardData);
|
||||
createWidget(goalsWidget, cardsEnabled, 2);
|
||||
createWidget(goalsWidget, cardsEnabled, prefs.getBoolean("dashboard_widget_goals_2columns", true) ? 2 : 1);
|
||||
} else {
|
||||
goalsWidget.update();
|
||||
}
|
||||
|
@ -103,13 +103,30 @@
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:title="24h mode"
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="dashboard_widget_today_2columns"
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:title="Double size"
|
||||
app:iconSpaceReserved="false" />
|
||||
</PreferenceScreen>
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="dashboard_widget_goals_enabled"
|
||||
android:layout="@layout/preference_checkbox"
|
||||
<PreferenceScreen
|
||||
android:key="pref_key_dashboard_goals"
|
||||
android:title="Goals chart"
|
||||
app:iconSpaceReserved="false" />
|
||||
app:iconSpaceReserved="false">
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="dashboard_widget_goals_enabled"
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:title="@string/function_enabled"
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="dashboard_widget_goals_2columns"
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:title="Double size"
|
||||
app:iconSpaceReserved="false" />
|
||||
</PreferenceScreen>
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="dashboard_widget_steps_enabled"
|
||||
|
Loading…
Reference in New Issue
Block a user