Merge pull request #138 from AdrianLxM/adjusttargetsse
Short tab titles
This commit is contained in:
commit
c4f8167424
37 changed files with 399 additions and 0 deletions
|
@ -40,6 +40,9 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
||||||
recreate();
|
recreate();
|
||||||
MainApp.bus().post(new EventRefreshGui(true));
|
MainApp.bus().post(new EventRefreshGui(true));
|
||||||
}
|
}
|
||||||
|
if (key.equals("short_tabtitles")) {
|
||||||
|
MainApp.bus().post(new EventRefreshGui(true));
|
||||||
|
}
|
||||||
updatePrefSummary(myPreferenceFragment.getPreference(key));
|
updatePrefSummary(myPreferenceFragment.getPreference(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ public interface PluginBase {
|
||||||
String getFragmentClass();
|
String getFragmentClass();
|
||||||
|
|
||||||
String getName();
|
String getName();
|
||||||
|
String getNameShort();
|
||||||
boolean isEnabled(int type);
|
boolean isEnabled(int type);
|
||||||
boolean isVisibleInTabs(int type);
|
boolean isVisibleInTabs(int type);
|
||||||
boolean canBeHidden(int type);
|
boolean canBeHidden(int type);
|
||||||
|
|
|
@ -28,6 +28,17 @@ public class ActionsPlugin implements PluginBase {
|
||||||
return MainApp.sResources.getString(R.string.actions);
|
return MainApp.sResources.getString(R.string.actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.actions_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL && fragmentEnabled;
|
return type == GENERAL && fragmentEnabled;
|
||||||
|
|
|
@ -24,6 +24,17 @@ public class CareportalPlugin implements PluginBase {
|
||||||
return MainApp.sResources.getString(R.string.careportal);
|
return MainApp.sResources.getString(R.string.careportal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.careportal_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL && fragmentEnabled;
|
return type == GENERAL && fragmentEnabled;
|
||||||
|
|
|
@ -64,6 +64,17 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
|
||||||
return MainApp.instance().getString(R.string.circadian_percentage_profile);
|
return MainApp.instance().getString(R.string.circadian_percentage_profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.circadian_percentage_profile_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == PROFILE && fragmentEnabled;
|
return type == PROFILE && fragmentEnabled;
|
||||||
|
|
|
@ -100,6 +100,17 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
return MainApp.instance().getString(R.string.configbuilder);
|
return MainApp.instance().getString(R.string.configbuilder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.configbuilder_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL && true;
|
return type == GENERAL && true;
|
||||||
|
|
|
@ -154,6 +154,17 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
return MainApp.instance().getString(R.string.danarpump);
|
return MainApp.instance().getString(R.string.danarpump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.danarpump_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
if (type == PluginBase.PROFILE) return fragmentProfileEnabled && fragmentPumpEnabled;
|
if (type == PluginBase.PROFILE) return fragmentProfileEnabled && fragmentPumpEnabled;
|
||||||
|
|
|
@ -154,6 +154,17 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
|
||||||
return MainApp.instance().getString(R.string.danarkoreanpump);
|
return MainApp.instance().getString(R.string.danarkoreanpump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.danarpump_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
if (type == PluginBase.PROFILE) return fragmentProfileEnabled && fragmentPumpEnabled;
|
if (type == PluginBase.PROFILE) return fragmentProfileEnabled && fragmentPumpEnabled;
|
||||||
|
|
|
@ -61,6 +61,17 @@ public class LocalProfilePlugin implements PluginBase, ProfileInterface {
|
||||||
return MainApp.instance().getString(R.string.localprofile);
|
return MainApp.instance().getString(R.string.localprofile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.localprofile_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == PROFILE && fragmentEnabled;
|
return type == PROFILE && fragmentEnabled;
|
||||||
|
|
|
@ -81,6 +81,17 @@ public class LoopPlugin implements PluginBase {
|
||||||
return MainApp.instance().getString(R.string.loop);
|
return MainApp.instance().getString(R.string.loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.loop_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == LOOP && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
return type == LOOP && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
||||||
|
|
|
@ -74,6 +74,12 @@ public class MDIPlugin implements PluginBase, PumpInterface {
|
||||||
return MainApp.instance().getString(R.string.mdi);
|
return MainApp.instance().getString(R.string.mdi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
// use long name as fallback (not visible in tabs)
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == PUMP && fragmentEnabled;
|
return type == PUMP && fragmentEnabled;
|
||||||
|
|
|
@ -49,6 +49,17 @@ public class NSProfilePlugin implements PluginBase, ProfileInterface {
|
||||||
return MainApp.instance().getString(R.string.profileviewer);
|
return MainApp.instance().getString(R.string.profileviewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.profileviewer_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == PROFILE && fragmentEnabled;
|
return type == PROFILE && fragmentEnabled;
|
||||||
|
|
|
@ -49,6 +49,17 @@ public class ObjectivesPlugin implements PluginBase, ConstraintsInterface {
|
||||||
return MainApp.instance().getString(R.string.objectives);
|
return MainApp.instance().getString(R.string.objectives);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.objectives_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == CONSTRAINTS && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
return type == CONSTRAINTS && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
||||||
|
|
|
@ -55,6 +55,17 @@ public class OpenAPSAMAPlugin implements PluginBase, APSInterface {
|
||||||
return MainApp.instance().getString(R.string.openapsama);
|
return MainApp.instance().getString(R.string.openapsama);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.oaps_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == APS && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
return type == APS && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
||||||
|
|
|
@ -56,6 +56,17 @@ public class OpenAPSMAPlugin implements PluginBase, APSInterface {
|
||||||
return MainApp.instance().getString(R.string.openapsma);
|
return MainApp.instance().getString(R.string.openapsma);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.oaps_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == APS && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
return type == APS && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
||||||
|
|
|
@ -47,6 +47,17 @@ public class OverviewPlugin implements PluginBase {
|
||||||
return MainApp.instance().getString(R.string.overview);
|
return MainApp.instance().getString(R.string.overview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.overview_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL;
|
return type == GENERAL;
|
||||||
|
|
|
@ -38,6 +38,12 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
||||||
return MainApp.instance().getString(R.string.safety);
|
return MainApp.instance().getString(R.string.safety);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
// use long name as fallback (no tabs)
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == CONSTRAINTS;
|
return type == CONSTRAINTS;
|
||||||
|
|
|
@ -58,6 +58,17 @@ public class SimpleProfilePlugin implements PluginBase, ProfileInterface {
|
||||||
return MainApp.instance().getString(R.string.simpleprofile);
|
return MainApp.instance().getString(R.string.simpleprofile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.simpleprofile_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == PROFILE && fragmentEnabled;
|
return type == PROFILE && fragmentEnabled;
|
||||||
|
|
|
@ -116,6 +116,17 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
return MainApp.sResources.getString(R.string.smscommunicator);
|
return MainApp.sResources.getString(R.string.smscommunicator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.smscommunicator_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL && fragmentEnabled;
|
return type == GENERAL && fragmentEnabled;
|
||||||
|
|
|
@ -27,6 +27,12 @@ public class SourceMM640gPlugin implements PluginBase, BgSourceInterface {
|
||||||
return MainApp.instance().getString(R.string.MM640g);
|
return MainApp.instance().getString(R.string.MM640g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
// use long name as fallback (no tabs)
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == BGSOURCE && fragmentEnabled;
|
return type == BGSOURCE && fragmentEnabled;
|
||||||
|
|
|
@ -26,6 +26,13 @@ public class SourceNSClientPlugin implements PluginBase, BgSourceInterface {
|
||||||
return MainApp.instance().getString(R.string.nsclient);
|
return MainApp.instance().getString(R.string.nsclient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
// use long name as fallback (not visible in tabs)
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == BGSOURCE && fragmentEnabled;
|
return type == BGSOURCE && fragmentEnabled;
|
||||||
|
|
|
@ -28,6 +28,12 @@ public class SourceXdripPlugin implements PluginBase, BgSourceInterface {
|
||||||
return MainApp.instance().getString(R.string.xdrip);
|
return MainApp.instance().getString(R.string.xdrip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
// use long name as fallback (no tabs)
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == BGSOURCE && fragmentEnabled;
|
return type == BGSOURCE && fragmentEnabled;
|
||||||
|
|
|
@ -61,6 +61,17 @@ public class TempBasalsPlugin implements PluginBase, TempBasalsInterface {
|
||||||
return MainApp.instance().getString(R.string.tempbasals);
|
return MainApp.instance().getString(R.string.tempbasals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.tempbasals_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == TEMPBASAL && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
return type == TEMPBASAL && fragmentEnabled && MainApp.getConfigBuilder().getPumpDescription().isTempBasalCapable;
|
||||||
|
|
|
@ -44,6 +44,17 @@ public class TempTargetRangePlugin implements PluginBase {
|
||||||
return MainApp.sResources.getString(R.string.temptargetrange);
|
return MainApp.sResources.getString(R.string.temptargetrange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.temptargetrange_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL && fragmentEnabled;
|
return type == GENERAL && fragmentEnabled;
|
||||||
|
|
|
@ -51,6 +51,17 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
||||||
return MainApp.instance().getString(R.string.treatments);
|
return MainApp.instance().getString(R.string.treatments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.treatments_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == TREATMENT && fragmentEnabled;
|
return type == TREATMENT && fragmentEnabled;
|
||||||
|
|
|
@ -78,6 +78,17 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
||||||
return MainApp.instance().getString(R.string.virtualpump);
|
return MainApp.instance().getString(R.string.virtualpump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.virtualpump_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == PUMP && fragmentEnabled;
|
return type == PUMP && fragmentEnabled;
|
||||||
|
|
|
@ -48,6 +48,17 @@ public class WearPlugin implements PluginBase {
|
||||||
return ctx.getString(R.string.wear);
|
return ctx.getString(R.string.wear);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
String name = MainApp.sResources.getString(R.string.wear_shortname);
|
||||||
|
if (!name.trim().isEmpty()){
|
||||||
|
//only if translation exists
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
// use long name as fallback
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return type == GENERAL && fragmentEnabled;
|
return type == GENERAL && fragmentEnabled;
|
||||||
|
|
|
@ -61,6 +61,12 @@ public class PersistentNotificationPlugin implements PluginBase{
|
||||||
return ctx.getString(R.string.ongoingnotificaction);
|
return ctx.getString(R.string.ongoingnotificaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameShort() {
|
||||||
|
// use long name as fallback (not visible in tabs)
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int type) {
|
public boolean isEnabled(int type) {
|
||||||
return fragmentEnabled;
|
return fragmentEnabled;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package info.nightscout.androidaps.tabs;
|
package info.nightscout.androidaps.tabs;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
|
@ -36,7 +38,12 @@ public class TabPageAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getPageTitle(int position) {
|
public CharSequence getPageTitle(int position) {
|
||||||
|
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
if(preferences.getBoolean("short_tabtitles", false)){
|
||||||
|
return visibleFragmentList.get(position).getNameShort();
|
||||||
|
}
|
||||||
return visibleFragmentList.get(position).getName();
|
return visibleFragmentList.get(position).getName();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -376,4 +376,22 @@
|
||||||
<string name="wear">Wear</string>
|
<string name="wear">Wear</string>
|
||||||
<string name="wrongpumpdriverselected">Избран е грешен тип помпа</string>
|
<string name="wrongpumpdriverselected">Избран е грешен тип помпа</string>
|
||||||
<string name="minago">преди %d м.</string>
|
<string name="minago">преди %d м.</string>
|
||||||
|
<string name="actions_shortname">" "</string>
|
||||||
|
<string name="wear_shortname">" "</string>
|
||||||
|
<string name="virtualpump_shortname">" "</string>
|
||||||
|
<string name="treatments_shortname">" "</string>
|
||||||
|
<string name="temptargetrange_shortname">" "</string>
|
||||||
|
<string name="tempbasals_shortname">" "</string>
|
||||||
|
<string name="smscommunicator_shortname">" "</string>
|
||||||
|
<string name="simpleprofile_shortname">" "</string>
|
||||||
|
<string name="profileviewer_shortname">" "</string>
|
||||||
|
<string name="overview_shortname">" "</string>
|
||||||
|
<string name="objectives_shortname">" "</string>
|
||||||
|
<string name="oaps_shortname">" "</string>
|
||||||
|
<string name="loop_shortname">" "</string>
|
||||||
|
<string name="localprofile_shortname">" "</string>
|
||||||
|
<string name="danarpump_shortname">" "</string>
|
||||||
|
<string name="configbuilder_shortname">" "</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">" "</string>
|
||||||
|
<string name="careportal_shortname">" "</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -401,4 +401,22 @@
|
||||||
<string name="short_avgdelta">Krátkodobý průměr</string>
|
<string name="short_avgdelta">Krátkodobý průměr</string>
|
||||||
<string name="temptargetrange">Dočasný cíl</string>
|
<string name="temptargetrange">Dočasný cíl</string>
|
||||||
<string name="temptargetrange_refreshfromnightscout">Obnovit dočasné cíle z NS</string>
|
<string name="temptargetrange_refreshfromnightscout">Obnovit dočasné cíle z NS</string>
|
||||||
|
<string name="actions_shortname">" "</string>
|
||||||
|
<string name="wear_shortname">" "</string>
|
||||||
|
<string name="virtualpump_shortname">" "</string>
|
||||||
|
<string name="treatments_shortname">" "</string>
|
||||||
|
<string name="temptargetrange_shortname">" "</string>
|
||||||
|
<string name="tempbasals_shortname">" "</string>
|
||||||
|
<string name="smscommunicator_shortname">" "</string>
|
||||||
|
<string name="simpleprofile_shortname">" "</string>
|
||||||
|
<string name="profileviewer_shortname">" "</string>
|
||||||
|
<string name="overview_shortname">" "</string>
|
||||||
|
<string name="objectives_shortname">" "</string>
|
||||||
|
<string name="oaps_shortname">" "</string>
|
||||||
|
<string name="loop_shortname">" "</string>
|
||||||
|
<string name="localprofile_shortname">" "</string>
|
||||||
|
<string name="danarpump_shortname">" "</string>
|
||||||
|
<string name="configbuilder_shortname">" "</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">" "</string>
|
||||||
|
<string name="careportal_shortname">" "</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -312,4 +312,22 @@
|
||||||
<string name="absorption_rate">Absorptionsrate:</string>
|
<string name="absorption_rate">Absorptionsrate:</string>
|
||||||
<string name="configbuilder">Config Builder</string>
|
<string name="configbuilder">Config Builder</string>
|
||||||
<string name="minago">vor %d min</string>
|
<string name="minago">vor %d min</string>
|
||||||
|
<string name="actions_shortname">" "</string>
|
||||||
|
<string name="wear_shortname">" "</string>
|
||||||
|
<string name="virtualpump_shortname">" "</string>
|
||||||
|
<string name="treatments_shortname">" "</string>
|
||||||
|
<string name="temptargetrange_shortname">" "</string>
|
||||||
|
<string name="tempbasals_shortname">" "</string>
|
||||||
|
<string name="smscommunicator_shortname">" "</string>
|
||||||
|
<string name="simpleprofile_shortname">" "</string>
|
||||||
|
<string name="profileviewer_shortname">" "</string>
|
||||||
|
<string name="overview_shortname">" "</string>
|
||||||
|
<string name="objectives_shortname">" "</string>
|
||||||
|
<string name="oaps_shortname">" "</string>
|
||||||
|
<string name="loop_shortname">" "</string>
|
||||||
|
<string name="localprofile_shortname">" "</string>
|
||||||
|
<string name="danarpump_shortname">" "</string>
|
||||||
|
<string name="configbuilder_shortname">" "</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">" "</string>
|
||||||
|
<string name="careportal_shortname">" "</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">AndroidAPS</string>
|
<string name="app_name">AndroidAPS</string>
|
||||||
|
<string name="actions_shortname">" "</string>
|
||||||
|
<string name="wear_shortname">" "</string>
|
||||||
|
<string name="virtualpump_shortname">" "</string>
|
||||||
|
<string name="treatments_shortname">" "</string>
|
||||||
|
<string name="temptargetrange_shortname">" "</string>
|
||||||
|
<string name="tempbasals_shortname">" "</string>
|
||||||
|
<string name="smscommunicator_shortname">" "</string>
|
||||||
|
<string name="simpleprofile_shortname">" "</string>
|
||||||
|
<string name="profileviewer_shortname">" "</string>
|
||||||
|
<string name="overview_shortname">" "</string>
|
||||||
|
<string name="objectives_shortname">" "</string>
|
||||||
|
<string name="oaps_shortname">" "</string>
|
||||||
|
<string name="loop_shortname">" "</string>
|
||||||
|
<string name="localprofile_shortname">" "</string>
|
||||||
|
<string name="danarpump_shortname">" "</string>
|
||||||
|
<string name="configbuilder_shortname">" "</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">" "</string>
|
||||||
|
<string name="careportal_shortname">" "</string>
|
||||||
</resources>
|
</resources>
|
|
@ -340,6 +340,24 @@
|
||||||
<string formatted="false" name="smscommunicator_basalreplywithcode">Para iniciar basal %.2fU/h responder con código %s</string>
|
<string formatted="false" name="smscommunicator_basalreplywithcode">Para iniciar basal %.2fU/h responder con código %s</string>
|
||||||
<string name="androidaps_tempbasalstartnote">Inicio Basal Temporal</string>
|
<string name="androidaps_tempbasalstartnote">Inicio Basal Temporal</string>
|
||||||
<string name="androidaps_tempbasalendnote">Fin Basal Temporal</string>
|
<string name="androidaps_tempbasalendnote">Fin Basal Temporal</string>
|
||||||
|
<string name="actions_shortname">" "</string>
|
||||||
|
<string name="wear_shortname">" "</string>
|
||||||
|
<string name="virtualpump_shortname">" "</string>
|
||||||
|
<string name="treatments_shortname">" "</string>
|
||||||
|
<string name="temptargetrange_shortname">" "</string>
|
||||||
|
<string name="tempbasals_shortname">" "</string>
|
||||||
|
<string name="smscommunicator_shortname">" "</string>
|
||||||
|
<string name="simpleprofile_shortname">" "</string>
|
||||||
|
<string name="profileviewer_shortname">" "</string>
|
||||||
|
<string name="overview_shortname">" "</string>
|
||||||
|
<string name="objectives_shortname">" "</string>
|
||||||
|
<string name="oaps_shortname">" "</string>
|
||||||
|
<string name="loop_shortname">" "</string>
|
||||||
|
<string name="localprofile_shortname">" "</string>
|
||||||
|
<string name="danarpump_shortname">" "</string>
|
||||||
|
<string name="configbuilder_shortname">" "</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">" "</string>
|
||||||
|
<string name="careportal_shortname">" "</string>
|
||||||
<string name="activity">Actividad</string>
|
<string name="activity">Actividad</string>
|
||||||
<string name="alert_dialog_storage_permission_text">Por favo reinicia el teléfono o AndroidAPS desde ajustes de sistema, sino AndroidAPS no guardara registros (importantes para trazar y verificar que el algoritmo funciona correctamente)</string>
|
<string name="alert_dialog_storage_permission_text">Por favo reinicia el teléfono o AndroidAPS desde ajustes de sistema, sino AndroidAPS no guardara registros (importantes para trazar y verificar que el algoritmo funciona correctamente)</string>
|
||||||
<string name="array_of_elements">Matriz de %d elementos. Valor actual:</string>
|
<string name="array_of_elements">Matriz de %d elementos. Valor actual:</string>
|
||||||
|
|
|
@ -382,4 +382,22 @@
|
||||||
<string name="sms_actualbg">BG:</string>
|
<string name="sms_actualbg">BG:</string>
|
||||||
<string name="sms_lastbg">Last BG:</string>
|
<string name="sms_lastbg">Last BG:</string>
|
||||||
<string name="mdi">MDI</string>
|
<string name="mdi">MDI</string>
|
||||||
|
<string name="actions_shortname">" "</string>
|
||||||
|
<string name="wear_shortname">" "</string>
|
||||||
|
<string name="virtualpump_shortname">" "</string>
|
||||||
|
<string name="treatments_shortname">" "</string>
|
||||||
|
<string name="temptargetrange_shortname">" "</string>
|
||||||
|
<string name="tempbasals_shortname">" "</string>
|
||||||
|
<string name="smscommunicator_shortname">" "</string>
|
||||||
|
<string name="simpleprofile_shortname">" "</string>
|
||||||
|
<string name="profileviewer_shortname">" "</string>
|
||||||
|
<string name="overview_shortname">" "</string>
|
||||||
|
<string name="objectives_shortname">" "</string>
|
||||||
|
<string name="oaps_shortname">" "</string>
|
||||||
|
<string name="loop_shortname">" "</string>
|
||||||
|
<string name="localprofile_shortname">" "</string>
|
||||||
|
<string name="danarpump_shortname">" "</string>
|
||||||
|
<string name="configbuilder_shortname">" "</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">" "</string>
|
||||||
|
<string name="careportal_shortname">" "</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -429,4 +429,23 @@
|
||||||
<string name="initializing">Initializing ...</string>
|
<string name="initializing">Initializing ...</string>
|
||||||
<string name="careportal_temptarget">Temporary Target</string>
|
<string name="careportal_temptarget">Temporary Target</string>
|
||||||
<string name="openapsama_autosens_adjusttargets">Allow autosens to adjust targets</string>
|
<string name="openapsama_autosens_adjusttargets">Allow autosens to adjust targets</string>
|
||||||
|
<string name="actions_shortname">ACT</string>
|
||||||
|
<string name="configbuilder_shortname">CONF</string>
|
||||||
|
<string name="loop_shortname">LOOP</string>
|
||||||
|
<string name="simpleprofile_shortname">SP</string>
|
||||||
|
<string name="oaps_shortname">OAPS</string>
|
||||||
|
<string name="temptargetrange_shortname">TT</string>
|
||||||
|
<string name="localprofile_shortname">LP</string>
|
||||||
|
<string name="danarpump_shortname">DANA</string>
|
||||||
|
<string name="circadian_percentage_profile_shortname">CPP</string>
|
||||||
|
<string name="tempbasals_shortname">TB</string>
|
||||||
|
<string name="overview_shortname">HOME</string>
|
||||||
|
<string name="virtualpump_shortname">VPUMP</string>
|
||||||
|
<string name="profileviewer_shortname">NSPROFILE</string>
|
||||||
|
<string name="treatments_shortname">TREAT</string>
|
||||||
|
<string name="careportal_shortname">CP</string>
|
||||||
|
<string name="objectives_shortname">OBJ</string>
|
||||||
|
<string name="wear_shortname">WEAR</string>
|
||||||
|
<string name="smscommunicator_shortname">SMS</string>
|
||||||
|
<string name="short_tabtitles">Shorten tab titles</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -40,5 +40,9 @@
|
||||||
android:inputType="numberDecimal">
|
android:inputType="numberDecimal">
|
||||||
</EditTextPreference>
|
</EditTextPreference>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="short_tabtitles"
|
||||||
|
android:title="@string/short_tabtitles"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
Loading…
Reference in a new issue