From ee0a53976fa26c9298977ce9a9551685ad114da1 Mon Sep 17 00:00:00 2001 From: Jamorham Date: Fri, 26 Jan 2018 17:10:43 +0000 Subject: [PATCH] StatusItemViewAdapter add redundant casting for travis --- .../PumpInsight/utils/ui/StatusItemViewAdapter.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/ui/StatusItemViewAdapter.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/ui/StatusItemViewAdapter.java index 09ef1ede5b..87c40c19de 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/ui/StatusItemViewAdapter.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/ui/StatusItemViewAdapter.java @@ -30,10 +30,10 @@ public class StatusItemViewAdapter { public View inflateStatus(StatusItem statusItem) { if (activity == null) return null; final View child = activity.getLayoutInflater().inflate(R.layout.insightpump_statuselements, null); - final TextView name = child.findViewById(R.id.insightstatuslabel); - final TextView value = child.findViewById(R.id.insightstatusvalue); - final TextView spacer = child.findViewById(R.id.insightstatusspacer); - final LinearLayout layout = child.findViewById(R.id.insightstatuslayout); + final TextView name = (TextView) child.findViewById(R.id.insightstatuslabel); + final TextView value = (TextView)child.findViewById(R.id.insightstatusvalue); + final TextView spacer = (TextView)child.findViewById(R.id.insightstatusspacer); + final LinearLayout layout = (LinearLayout)child.findViewById(R.id.insightstatuslayout); if (statusItem.name.equals("line-break")) { spacer.setVisibility(View.GONE); @@ -56,6 +56,11 @@ public class StatusItemViewAdapter { value.setBackgroundColor(this_color); spacer.setBackgroundColor(this_color); + if (this_color != Color.TRANSPARENT) { + name.setTextColor(Color.WHITE); + spacer.setTextColor(Color.WHITE); + } + if (holder != null) { holder.addView(child); }