hide unneeded labels in nsclient mode
This commit is contained in:
parent
ade45d5b4c
commit
e25fb9845d
2 changed files with 15 additions and 0 deletions
|
@ -44,14 +44,17 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
||||||
|
|
||||||
ListView bgsourceListView;
|
ListView bgsourceListView;
|
||||||
ListView pumpListView;
|
ListView pumpListView;
|
||||||
|
TextView pumpLabel;
|
||||||
ListView loopListView;
|
ListView loopListView;
|
||||||
TextView loopLabel;
|
TextView loopLabel;
|
||||||
ListView treatmentsListView;
|
ListView treatmentsListView;
|
||||||
ListView tempsListView;
|
ListView tempsListView;
|
||||||
|
TextView tempsLabel;
|
||||||
ListView profileListView;
|
ListView profileListView;
|
||||||
ListView apsListView;
|
ListView apsListView;
|
||||||
TextView apsLabel;
|
TextView apsLabel;
|
||||||
ListView constraintsListView;
|
ListView constraintsListView;
|
||||||
|
TextView constraintsLabel;
|
||||||
ListView generalListView;
|
ListView generalListView;
|
||||||
TextView nsclientVerView;
|
TextView nsclientVerView;
|
||||||
TextView nightscoutVerView;
|
TextView nightscoutVerView;
|
||||||
|
@ -77,14 +80,17 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
||||||
View view = inflater.inflate(R.layout.configbuilder_fragment, container, false);
|
View view = inflater.inflate(R.layout.configbuilder_fragment, container, false);
|
||||||
bgsourceListView = (ListView) view.findViewById(R.id.configbuilder_bgsourcelistview);
|
bgsourceListView = (ListView) view.findViewById(R.id.configbuilder_bgsourcelistview);
|
||||||
pumpListView = (ListView) view.findViewById(R.id.configbuilder_pumplistview);
|
pumpListView = (ListView) view.findViewById(R.id.configbuilder_pumplistview);
|
||||||
|
pumpLabel = (TextView) view.findViewById(R.id.configbuilder_pumplabel);
|
||||||
loopListView = (ListView) view.findViewById(R.id.configbuilder_looplistview);
|
loopListView = (ListView) view.findViewById(R.id.configbuilder_looplistview);
|
||||||
loopLabel = (TextView) view.findViewById(R.id.configbuilder_looplabel);
|
loopLabel = (TextView) view.findViewById(R.id.configbuilder_looplabel);
|
||||||
treatmentsListView = (ListView) view.findViewById(R.id.configbuilder_treatmentslistview);
|
treatmentsListView = (ListView) view.findViewById(R.id.configbuilder_treatmentslistview);
|
||||||
tempsListView = (ListView) view.findViewById(R.id.configbuilder_tempslistview);
|
tempsListView = (ListView) view.findViewById(R.id.configbuilder_tempslistview);
|
||||||
|
tempsLabel = (TextView) view.findViewById(R.id.configbuilder_tempslabel);
|
||||||
profileListView = (ListView) view.findViewById(R.id.configbuilder_profilelistview);
|
profileListView = (ListView) view.findViewById(R.id.configbuilder_profilelistview);
|
||||||
apsListView = (ListView) view.findViewById(R.id.configbuilder_apslistview);
|
apsListView = (ListView) view.findViewById(R.id.configbuilder_apslistview);
|
||||||
apsLabel = (TextView) view.findViewById(R.id.configbuilder_apslabel);
|
apsLabel = (TextView) view.findViewById(R.id.configbuilder_apslabel);
|
||||||
constraintsListView = (ListView) view.findViewById(R.id.configbuilder_constraintslistview);
|
constraintsListView = (ListView) view.findViewById(R.id.configbuilder_constraintslistview);
|
||||||
|
constraintsLabel = (TextView) view.findViewById(R.id.configbuilder_constraintslabel);
|
||||||
generalListView = (ListView) view.findViewById(R.id.configbuilder_generallistview);
|
generalListView = (ListView) view.findViewById(R.id.configbuilder_generallistview);
|
||||||
nsclientVerView = (TextView) view.findViewById(R.id.configbuilder_nsclientversion);
|
nsclientVerView = (TextView) view.findViewById(R.id.configbuilder_nsclientversion);
|
||||||
nightscoutVerView = (TextView) view.findViewById(R.id.configbuilder_nightscoutversion);
|
nightscoutVerView = (TextView) view.findViewById(R.id.configbuilder_nightscoutversion);
|
||||||
|
@ -125,6 +131,8 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
||||||
setListViewHeightBasedOnChildren(bgsourceListView);
|
setListViewHeightBasedOnChildren(bgsourceListView);
|
||||||
pumpDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.PUMP), PluginBase.PUMP);
|
pumpDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.PUMP), PluginBase.PUMP);
|
||||||
pumpListView.setAdapter(pumpDataAdapter);
|
pumpListView.setAdapter(pumpDataAdapter);
|
||||||
|
if (MainApp.getSpecificPluginsList(PluginBase.PUMP).size() == 0)
|
||||||
|
pumpLabel.setVisibility(View.GONE);
|
||||||
setListViewHeightBasedOnChildren(pumpListView);
|
setListViewHeightBasedOnChildren(pumpListView);
|
||||||
loopDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.LOOP), PluginBase.LOOP);
|
loopDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.LOOP), PluginBase.LOOP);
|
||||||
loopListView.setAdapter(loopDataAdapter);
|
loopListView.setAdapter(loopDataAdapter);
|
||||||
|
@ -137,6 +145,8 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
||||||
tempsDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.TEMPBASAL), PluginBase.TEMPBASAL);
|
tempsDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.TEMPBASAL), PluginBase.TEMPBASAL);
|
||||||
tempsListView.setAdapter(tempsDataAdapter);
|
tempsListView.setAdapter(tempsDataAdapter);
|
||||||
setListViewHeightBasedOnChildren(tempsListView);
|
setListViewHeightBasedOnChildren(tempsListView);
|
||||||
|
if (MainApp.getSpecificPluginsList(PluginBase.TEMPBASAL).size() == 0)
|
||||||
|
tempsLabel.setVisibility(View.GONE);
|
||||||
profileDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsListByInterface(ProfileInterface.class), PluginBase.PROFILE);
|
profileDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsListByInterface(ProfileInterface.class), PluginBase.PROFILE);
|
||||||
profileListView.setAdapter(profileDataAdapter);
|
profileListView.setAdapter(profileDataAdapter);
|
||||||
setListViewHeightBasedOnChildren(profileListView);
|
setListViewHeightBasedOnChildren(profileListView);
|
||||||
|
@ -148,6 +158,8 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
||||||
constraintsDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class), PluginBase.CONSTRAINTS);
|
constraintsDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class), PluginBase.CONSTRAINTS);
|
||||||
constraintsListView.setAdapter(constraintsDataAdapter);
|
constraintsListView.setAdapter(constraintsDataAdapter);
|
||||||
setListViewHeightBasedOnChildren(constraintsListView);
|
setListViewHeightBasedOnChildren(constraintsListView);
|
||||||
|
if (MainApp.getSpecificPluginsList(PluginBase.CONSTRAINTS).size() == 0)
|
||||||
|
constraintsLabel.setVisibility(View.GONE);
|
||||||
generalDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.GENERAL), PluginBase.GENERAL);
|
generalDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsList(PluginBase.GENERAL), PluginBase.GENERAL);
|
||||||
generalListView.setAdapter(generalDataAdapter);
|
generalListView.setAdapter(generalDataAdapter);
|
||||||
setListViewHeightBasedOnChildren(generalListView);
|
setListViewHeightBasedOnChildren(generalListView);
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/configbuilder_pumplabel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
|
@ -127,6 +128,7 @@
|
||||||
android:background="@color/cardColorBackground" />
|
android:background="@color/cardColorBackground" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/configbuilder_tempslabel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
|
@ -144,6 +146,7 @@
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/configbuilder_constraintslabel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
|
|
Loading…
Reference in a new issue