simplify statuslights preferences
This commit is contained in:
parent
4d23fb1d61
commit
50041e1733
|
@ -1323,21 +1323,17 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
cobView.setText(cobText);
|
cobView.setText(cobText);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statuslightsLayout != null && SP.getBoolean(R.string.key_show_statuslights, false)) {
|
if (statuslightsLayout != null)
|
||||||
|
if (SP.getBoolean(R.string.key_show_statuslights, false)) {
|
||||||
StatuslightHandler handler = new StatuslightHandler();
|
StatuslightHandler handler = new StatuslightHandler();
|
||||||
|
if (SP.getBoolean(R.string.key_show_statuslights_extended, false)) {
|
||||||
if (SP.getBoolean(R.string.key_show_statuslights_easy, false)) {
|
|
||||||
handler.statuslight(cageView, iageView, reservoirView, sageView, batteryView);
|
|
||||||
|
|
||||||
statuslightsLayout.setVisibility(View.VISIBLE);
|
|
||||||
} else if (SP.getBoolean(R.string.key_show_statuslights_extended, false)) {
|
|
||||||
handler.extendedStatuslight(cageView, iageView, reservoirView, sageView, batteryView);
|
handler.extendedStatuslight(cageView, iageView, reservoirView, sageView, batteryView);
|
||||||
|
|
||||||
statuslightsLayout.setVisibility(View.VISIBLE);
|
statuslightsLayout.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
statuslightsLayout.setVisibility(View.GONE);
|
handler.statuslight(cageView, iageView, reservoirView, sageView, batteryView);
|
||||||
|
statuslightsLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
} else if (statuslightsLayout != null) {
|
} else {
|
||||||
statuslightsLayout.setVisibility(View.GONE);
|
statuslightsLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -623,11 +623,8 @@
|
||||||
<string name="enablesuperbolus">Enable superbolus in wizard</string>
|
<string name="enablesuperbolus">Enable superbolus in wizard</string>
|
||||||
<string name="enablesuperbolus_summary">Enable superbolus functionality in wizard. Do not enable until you learn what it really does. IT MAY CAUSE INSULIN OVERDOSE IF USED BLINDLY!</string>
|
<string name="enablesuperbolus_summary">Enable superbolus functionality in wizard. Do not enable until you learn what it really does. IT MAY CAUSE INSULIN OVERDOSE IF USED BLINDLY!</string>
|
||||||
<string name="key_show_statuslights" translatable="false">key_show_statuslights</string>
|
<string name="key_show_statuslights" translatable="false">key_show_statuslights</string>
|
||||||
<string name="key_show_statuslights_easy" translatable="false">key_show_statuslights_easy</string>
|
|
||||||
<string name="key_show_statuslights_extended" translatable="false">key_show_statuslights_extended</string>
|
<string name="key_show_statuslights_extended" translatable="false">key_show_statuslights_extended</string>
|
||||||
<string name="show_statuslights">Show status lights on home screen</string>
|
<string name="show_statuslights">Show status lights on home screen</string>
|
||||||
<string name="show_statuslights_easy">Show original status lights on home screen</string>
|
|
||||||
<string name="show_statuslights_easy_summary">Enable original status lights for cage, iage, sage, reservoir and battery level on home screen.</string>
|
|
||||||
<string name="show_statuslights_extended">Show extended status lights on home screen</string>
|
<string name="show_statuslights_extended">Show extended status lights on home screen</string>
|
||||||
<string name="show_statuslights_extended_summary">Enable extended status lights for cage, iage, sage, reservoir and battery level on home screen.</string>
|
<string name="show_statuslights_extended_summary">Enable extended status lights for cage, iage, sage, reservoir and battery level on home screen.</string>
|
||||||
<string name="key_statuslights_res_warning" translatable="false">key_statuslights_res_warning</string>
|
<string name="key_statuslights_res_warning" translatable="false">key_statuslights_res_warning</string>
|
||||||
|
|
|
@ -167,13 +167,6 @@
|
||||||
android:key="@string/key_show_statuslights"
|
android:key="@string/key_show_statuslights"
|
||||||
android:title="@string/show_statuslights" />
|
android:title="@string/show_statuslights" />
|
||||||
|
|
||||||
<SwitchPreference
|
|
||||||
android:defaultValue="false"
|
|
||||||
android:dependency="@string/key_show_statuslights"
|
|
||||||
android:key="@string/key_show_statuslights_easy"
|
|
||||||
android:summary="@string/show_statuslights_easy_summary"
|
|
||||||
android:title="@string/show_statuslights_easy" />
|
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:dependency="@string/key_show_statuslights"
|
android:dependency="@string/key_show_statuslights"
|
||||||
|
|
Loading…
Reference in a new issue