First commit (Strings created, title in preferences.xml and BolusActivity.Java updated)

This commit is contained in:
Philoul 2019-12-05 18:21:48 +01:00
parent d40f6c9fce
commit c791f67892
3 changed files with 98 additions and 45 deletions

View file

@ -12,7 +12,7 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import info.nightscout.androidaps.R;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
@ -71,7 +71,7 @@ public class BolusActivity extends ViewSelectorActivity {
def = SafeParse.stringToDouble(editInsulin.editText.getText().toString()); def = SafeParse.stringToDouble(editInsulin.editText.getText().toString());
} }
editInsulin = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 30d, 0.1d, new DecimalFormat("#0.0"), false); editInsulin = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 30d, 0.1d, new DecimalFormat("#0.0"), false);
setLabelToPlusMinusView(view, "insulin"); setLabelToPlusMinusView(view, getResources().getString(R.string.action_insulin));
container.addView(view); container.addView(view);
return view; return view;
} else if(col == 1){ } else if(col == 1){
@ -81,7 +81,7 @@ public class BolusActivity extends ViewSelectorActivity {
def = SafeParse.stringToDouble(editCarbs.editText.getText().toString()); def = SafeParse.stringToDouble(editCarbs.editText.getText().toString());
} }
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 150d, 1d, new DecimalFormat("0"), false); editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 150d, 1d, new DecimalFormat("0"), false);
setLabelToPlusMinusView(view, "carbs"); setLabelToPlusMinusView(view, getResources().getString(R.string.action_carbs));
container.addView(view); container.addView(view);
return view; return view;
} else { } else {

View file

@ -5,11 +5,11 @@
<string name="label_actions_activity">AAPS</string> <string name="label_actions_activity">AAPS</string>
<string-array name="chart_timeframe"> <string-array name="chart_timeframe">
<item>1 hour</item> <item>@string/pref_1_hour</item>
<item>2 hours</item> <item>@string/pref_2_hours</item>
<item>3 hours</item> <item>@string/pref_3_hours</item>
<item>4 hours</item> <item>@string/pref_4_hours</item>
<item>5 hours</item> <item>@string/pref_5_hours</item>
</string-array> </string-array>
<string-array name="chart_timeframe_values"> <string-array name="chart_timeframe_values">
@ -21,9 +21,9 @@
</string-array> </string-array>
<string-array name="delta_granularity"> <string-array name="delta_granularity">
<item>Low</item> <item>@string/pref_low</item>
<item>Medium</item> <item>@string/pref_medium</item>
<item>High</item> <item>@string/pref_high</item>
</string-array> </string-array>
<string-array name="delta_granularity_values"> <string-array name="delta_granularity_values">
@ -33,10 +33,10 @@
</string-array> </string-array>
<string-array name="input_design"> <string-array name="input_design">
<item>Default</item> <item>@string/pref_default</item>
<item>Quick righty</item> <item>@string/pref_quick_righty</item>
<item>Quick lefty</item> <item>@string/pref_quick_lefty</item>
<item>Modern Sparse</item> <item>@string/pref_modern_sparse</item>
</string-array> </string-array>
<string-array name="input_design_values"> <string-array name="input_design_values">
@ -46,17 +46,43 @@
<item>4</item> <item>4</item>
</string-array> </string-array>
<string-array name="complication_tap_action">
<item>@string/pref_default</item>
<item>Menu</item>
<item>@string/menu_wizard</item>
<item>@string/menu_bolus</item>
<item>@string/menu_ecarb</item>
<item>@string/menu_status</item>
<item>None</item>
</string-array>
<string-array name="complication_tap_action_values">
<item>default</item>
<item>menu</item>
<item>wizard</item>
<item>bolus</item>
<item>ecarb</item>
<item>status</item>
<item>none</item>
</string-array>
<string name="label_xdrip">AAPS</string> <string name="label_xdrip">AAPS</string>
<string name="label_xdrip_large">AAPS(Large)</string> <string name="label_xdrip_large">AAPS(Large)</string>
<string name="label_xdrip_big_chart">AAPS(BigChart)</string> <string name="label_xdrip_big_chart">AAPS(BigChart)</string>
<string name="label_xdrip_no_chart">AAPS(NoChart)</string> <string name="label_xdrip_no_chart">AAPS(NoChart)</string>
<string name="label_xdrip_circle">AAPS(Circle)</string> <string name="label_xdrip_circle">AAPS(Circle)</string>
<string name="label_xdrip_v2">AAPSv2</string> <string name="label_xdrip_v2">AAPSv2</string>
<string name="label_xdrip_cockpit">AAPS(Cockpit)</string> <string name="label_xdrip_cockpit">AAPS(Cockpit)</string>
<string name="label_xdrip_steampunk">AAPS(Steampunk)</string> <string name="label_xdrip_steampunk">AAPS(Steampunk)</string>
<string name="label_warning_sync">No data!</string>
<string name="label_warning_old">Old data!</string>
<string name="label_warning_since">Since %1$s</string>
<string name="label_warning_sync_aaps">Sync with AAPS!</string>
<string name="msg_warning_sync">No data received since %1$s! Check if AAPS on the phone sends data to watch</string>
<string name="msg_warning_old">AAPS data is %1$s old! Check your sensor, xDrip+, NS, AAPS config or other!</string>
<string name="pref_on">On</string> <string name="pref_on">On</string>
<string name="pref_off">Off</string> <string name="pref_off">Off</string>
<string name="pref_vibrate_on_bolus">Vibrate on Bolus</string> <string name="pref_vibrate_on_bolus">Vibrate on Bolus</string>
@ -77,7 +103,8 @@
<string name="pref_show_ago">Show Ago</string> <string name="pref_show_ago">Show Ago</string>
<string name="pref_dark">Dark</string> <string name="pref_dark">Dark</string>
<string name="pref_highlight_basals">Highlight Basals</string> <string name="pref_highlight_basals">Highlight Basals</string>
<string name="pref_timeframe">Chart Timeframe</string> <string name="pref_matching_divider">Matching divider</string>
<string name="pref_chart_timeframe">Chart Timeframe</string>
<string name="pref_1_hour">1 hour</string> <string name="pref_1_hour">1 hour</string>
<string name="pref_2_hours">2 hours</string> <string name="pref_2_hours">2 hours</string>
<string name="pref_3_hours">3 hours</string> <string name="pref_3_hours">3 hours</string>
@ -100,6 +127,8 @@
<string name="pref_prime_in_menu">Prime in Menu</string> <string name="pref_prime_in_menu">Prime in Menu</string>
<string name="pref_single_target">Single Target</string> <string name="pref_single_target">Single Target</string>
<string name="pref_wizard_percentage">Wizard Percentage</string> <string name="pref_wizard_percentage">Wizard Percentage</string>
<string name="pref_complication_tap_action">Complication Tap Action</string>
<string name="pref_unicode_in_complications">Unicode in Complications</string>
<string name="pref_version">Version:</string> <string name="pref_version">Version:</string>
<string name="menu_tempt">TempT</string> <string name="menu_tempt">TempT</string>
@ -127,6 +156,8 @@
<string name="action_status_loop">STATUS LOOP</string> <string name="action_status_loop">STATUS LOOP</string>
<string name="action_timeshift">timeshift</string> <string name="action_timeshift">timeshift</string>
<string name="action_tdd_weighted">TDD weighted</string> <string name="action_tdd_weighted">TDD weighted</string>
<string name="action_bolus">bolus</string>
<string name="status_pump">Pump</string> <string name="status_pump">Pump</string>
<string name="status_loop">Loop</string> <string name="status_loop">Loop</string>

View file

@ -5,14 +5,14 @@
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="vibrateOnBolus" android:key="vibrateOnBolus"
android:title="Vibrate on Bolus" android:title="@string/pref_vibrate_on_bolus"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="units_mgdl" android:key="units_mgdl"
android:title="Units for Actions" android:title="@string/pref_units_for_actions"
android:summaryOn="mg/dl" android:summaryOn="mg/dl"
android:summaryOff="mmol/l" android:summaryOff="mmol/l"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
@ -21,14 +21,14 @@
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="show_date" android:key="show_date"
android:title="Show Date" android:title="@string/pref_show_date"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="show_iob" android:key="show_iob"
android:title="Show IOB" android:title="@string/pref_show_iob"
android:summary="Show insulin on board." android:summary="Show insulin on board."
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
@ -36,7 +36,7 @@
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="show_cob" android:key="show_cob"
android:title="Show COB" android:title="@string/pref_show_cob"
android:summary="Show carb on board." android:summary="Show carb on board."
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
@ -45,7 +45,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="showDelta" android:key="showDelta"
android:summary="Show delta. (Circle WF)" android:summary="Show delta. (Circle WF)"
android:title="Show Delta" android:title="@string/pref_show_delta"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -53,35 +53,35 @@
android:defaultValue="true" android:defaultValue="true"
android:key="showAvgDelta" android:key="showAvgDelta"
android:summary="Show the avgDelta." android:summary="Show the avgDelta."
android:title="Show AvgDelta" android:title="@string/pref_show_avgdelta"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="show_uploader_battery" android:key="show_uploader_battery"
android:title="Show Phone Battery" android:title="@string/pref_show_phone_battery"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="show_rig_battery" android:key="show_rig_battery"
android:title="Show Rig Battery" android:title="@string/pref_show_rig_battery"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="show_temp_basal" android:key="show_temp_basal"
android:title="Show Basal Rate" android:title="@string/pref_show_basal_rate"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="showExternalStatus" android:key="showExternalStatus"
android:title="Show Loop Status" android:title="@string/pref_show_loop_status"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
@ -89,7 +89,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="showBG" android:key="showBG"
android:summary="Show BG. (Circle WF)" android:summary="Show BG. (Circle WF)"
android:title="Show BG" android:title="@string/pref_show_bg"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -97,7 +97,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="show_direction" android:key="show_direction"
android:summary="Show direction arrow" android:summary="Show direction arrow"
android:title="Show Direction Arrow" android:title="@string/pref_show_direction_arrow"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -105,7 +105,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="showAgo" android:key="showAgo"
android:summary="Minutes since last reading. (Circle WF)" android:summary="Minutes since last reading. (Circle WF)"
android:title="Show Ago" android:title="@string/pref_show_ago"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -113,7 +113,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="dark" android:key="dark"
android:summary="Dark theme" android:summary="Dark theme"
android:title="Dark" android:title="@string/pref_dark"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -121,7 +121,15 @@
android:defaultValue="false" android:defaultValue="false"
android:key="highlight_basals" android:key="highlight_basals"
android:summary="Better visible basal rate and temp basals" android:summary="Better visible basal rate and temp basals"
android:title="Highlight Basals" android:title="@string/pref_highlight_basals"
app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="match_divider"
android:summary="Status bar divider background matches watchface background"
android:title="@string/pref_matching_divider"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -131,7 +139,7 @@
android:entryValues="@array/chart_timeframe_values" android:entryValues="@array/chart_timeframe_values"
android:key="chart_timeframe" android:key="chart_timeframe"
android:summary="Chart Timeframe" android:summary="Chart Timeframe"
android:title="Chart Timeframe" /> android:title="@string/pref_chart_timeframe" />
<ListPreference <ListPreference
android:defaultValue="1" android:defaultValue="1"
@ -139,7 +147,7 @@
android:entryValues="@array/input_design_values" android:entryValues="@array/input_design_values"
android:key="input_design" android:key="input_design"
android:summary="Input Design" android:summary="Input Design"
android:title="Input Design" /> android:title="@string/pref_input_design" />
<ListPreference <ListPreference
android:defaultValue="2" android:defaultValue="2"
@ -147,13 +155,13 @@
android:entryValues="@array/delta_granularity_values" android:entryValues="@array/delta_granularity_values"
android:key="delta_granularity" android:key="delta_granularity"
android:summary="Delta Granularity (Steampunk)" android:summary="Delta Granularity (Steampunk)"
android:title="Delta Granularity (Steampunk)" /> android:title="@string/pref_delta_granularity" />
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="showBigNumbers" android:key="showBigNumbers"
android:summary="Big numbers. (Circle WF)" android:summary="Big numbers. (Circle WF)"
android:title="Big Numbers" android:title="@string/pref_big_numbers"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -161,7 +169,7 @@
android:defaultValue="false" android:defaultValue="false"
android:key="showRingHistory" android:key="showRingHistory"
android:summary="Graphical history. (Circle WF)" android:summary="Graphical history. (Circle WF)"
android:title="Ring History" android:title="@string/pref_ring_history"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" /> app:wear_iconOn="@drawable/settings_on" />
@ -169,7 +177,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="softRingHistory" android:key="softRingHistory"
android:summary="Less eyecandy. (Circle WF)" android:summary="Less eyecandy. (Circle WF)"
android:title="Light Ring History" android:title="@string/pref_light_ring_history"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -177,7 +185,7 @@
android:defaultValue="true" android:defaultValue="true"
android:key="animation" android:key="animation"
android:summary="Animations. (Circle WF)" android:summary="Animations. (Circle WF)"
android:title="Animations" android:title="@string/pref_animations"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
@ -185,28 +193,42 @@
android:defaultValue="true" android:defaultValue="true"
android:key="showWizard" android:key="showWizard"
android:summary="Wizard from watch possible" android:summary="Wizard from watch possible"
android:title="Wizard in Menu" android:title="@string/pref_wizard_in_menu"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="primefill" android:key="primefill"
android:summary="Prime/Fill from watch possible" android:summary="Prime/Fill from watch possible"
android:title="Prime in Menu" android:title="@string/pref_prime_in_menu"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="singletarget" android:key="singletarget"
android:summary="Single temp-target instead of a range." android:summary="Single temp-target instead of a range."
android:title="Single Target" android:title="@string/pref_single_target"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="wizardpercentage" android:key="wizardpercentage"
android:summary="Percentage correction." android:summary="Percentage correction."
android:title="Wizard Percentage" android:title="@string/pref_wizard_percentage"
app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/>
<ListPreference
android:defaultValue="default"
android:entries="@array/complication_tap_action"
android:entryValues="@array/complication_tap_action_values"
android:key="complication_tap_action"
android:summary="What dialog to show after tap on complication"
android:title="@string/pref_complication_tap_action" />
<CheckBoxPreference
android:defaultValue="true"
android:key="complication_unicode"
android:summary="Use unicode special characters in complications."
android:title="@string/pref_unicode_in_complications"
app:wear_iconOff="@drawable/settings_off" app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on"/> app:wear_iconOn="@drawable/settings_on"/>
<info.nightscout.androidaps.interaction.utils.VersionPreference <info.nightscout.androidaps.interaction.utils.VersionPreference
@ -215,5 +237,5 @@
android:entryValues="@array/input_design_values" android:entryValues="@array/input_design_values"
android:key="version_number" android:key="version_number"
android:summary="Input Design" android:summary="Input Design"
android:title="Version:" /> android:title="@string/pref_version" />
</PreferenceScreen> </PreferenceScreen>