From 02590ddd729c7ba8a30dc1484e2ea314e436dc9d Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 3 May 2018 21:29:34 +0200 Subject: [PATCH] SW remove unneeded code --- .../androidaps/startupwizard/SWPlugin.java | 24 +++++++++---------- .../startupwizard/SetupWizardActivity.java | 6 ++--- .../main/res/layout/activity_setupwizard.xml | 6 ++--- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWPlugin.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWPlugin.java index dc6ce4e71a..57a397c88f 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWPlugin.java @@ -42,20 +42,18 @@ public class SWPlugin extends SWItem { ArrayList pluginsInCategory = MainApp.getSpecificPluginsList(pType); - for (int row = 0; row < 1; row++) { - radioGroup.setOrientation(LinearLayout.VERTICAL); - radioGroup.setVisibility(View.VISIBLE); + radioGroup.setOrientation(LinearLayout.VERTICAL); + radioGroup.setVisibility(View.VISIBLE); - for (int i = 0; i < pluginsInCategory.size(); i++) { - RadioButton rdbtn = new RadioButton(context); - PluginBase p = pluginsInCategory.get(i); - rdbtn.setId(View.generateViewId()); - rdbtn.setText(p.getName()); - if (p.isEnabled(pType)) - rdbtn.setChecked(true); - rdbtn.setTag(p); - radioGroup.addView(rdbtn); - } + for (int i = 0; i < pluginsInCategory.size(); i++) { + RadioButton rdbtn = new RadioButton(context); + PluginBase p = pluginsInCategory.get(i); + rdbtn.setId(View.generateViewId()); + rdbtn.setText(p.getName()); + if (p.isEnabled(pType)) + rdbtn.setChecked(true); + rdbtn.setTag(p); + radioGroup.addView(rdbtn); } radioGroup.setOnCheckedChangeListener((group, checkedId) -> { diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java index 958eea28b3..d733b96ea2 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java @@ -44,14 +44,14 @@ public class SetupWizardActivity extends AppCompatActivity { SWScreen currentScreen = screens.get(currentWizardPage); //Set screen name - screenName = (TextView) findViewById(R.id.fullscreen_content); + screenName = (TextView) findViewById(R.id.sw_content); screenName.setText(currentScreen.getHeader()); //Generate layout first - LinearLayout layout = SWItem.generateLayout(this.findViewById(R.id.fullscreen_content_fields)); + LinearLayout layout = SWItem.generateLayout(this.findViewById(R.id.sw_content_fields)); for (int i = 0; i < currentScreen.items.size(); i++) { SWItem currentItem = currentScreen.items.get(i); - currentItem.generateDialog(this.findViewById(R.id.fullscreen_content_fields), layout); + currentItem.generateDialog(this.findViewById(R.id.sw_content_fields), layout); } updateButtons(); diff --git a/app/src/main/res/layout/activity_setupwizard.xml b/app/src/main/res/layout/activity_setupwizard.xml index 9422f76d76..71404c12d4 100644 --- a/app/src/main/res/layout/activity_setupwizard.xml +++ b/app/src/main/res/layout/activity_setupwizard.xml @@ -7,7 +7,7 @@ tools:context=".startupwizard.SetupWizardActivity">