Merge branch 'omnipod_eros_dev' into omnipod_eros_dev_upstream_merge

This commit is contained in:
Bart Sopers 2020-12-19 16:25:06 +01:00
commit f0b58cec0e
3 changed files with 23 additions and 61 deletions

View file

@ -48,11 +48,9 @@ public class RileyLinkStatusGeneralFragment extends DaggerFragment implements Re
TextView lastUsedFrequency;
TextView lastDeviceContact;
TextView firmwareVersion;
TextView batteryLevel;
boolean first = false;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.rileylink_status_general, container, false);
@ -76,14 +74,12 @@ public class RileyLinkStatusGeneralFragment extends DaggerFragment implements Re
this.lastUsedFrequency = getActivity().findViewById(R.id.rls_t1_last_used_frequency);
this.lastDeviceContact = getActivity().findViewById(R.id.rls_t1_last_device_contact);
this.firmwareVersion = getActivity().findViewById(R.id.rls_t1_firmware_version);
this.batteryLevel = getActivity().findViewById(R.id.rls_t1_battery_level);
if (!first) {
// 7-14
int[] ids = {R.id.rls_t1_tv02, R.id.rls_t1_tv03, R.id.rls_t1_tv04, R.id.rls_t1_tv05, R.id.rls_t1_tv07, //
R.id.rls_t1_tv08, R.id.rls_t1_tv09, R.id.rls_t1_tv10, R.id.rls_t1_tv11, R.id.rls_t1_tv12, R.id.rls_t1_tv13,
R.id.rls_t1_tv14};
R.id.rls_t1_tv08, R.id.rls_t1_tv09, R.id.rls_t1_tv10, R.id.rls_t1_tv11, R.id.rls_t1_tv12, R.id.rls_t1_tv13};
for (int id : ids) {
@ -116,13 +112,6 @@ public class RileyLinkStatusGeneralFragment extends DaggerFragment implements Re
this.firmwareVersion.setText("BLE113: " + rileyLinkServiceData.versionBLE113 +
"\nCC110: " + rileyLinkServiceData.versionCC110);
}
Integer batteryLevel = rileyLinkServiceData.batteryLevel;
if (batteryLevel == null) {
this.batteryLevel.setText("???");
} else {
this.batteryLevel.setText(batteryLevel + "%");
}
}
RileyLinkPumpDevice pumpPlugin = (RileyLinkPumpDevice) activePlugin.getActivePump();

View file

@ -49,9 +49,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
<LinearLayout
@ -75,9 +75,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
@ -102,9 +102,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
@ -129,35 +129,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="16pt"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/rls_t1_tv14"
android:layout_width="58dp"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_weight="35"
android:gravity="center_vertical"
android:text="@string/rileylink_battery_level" />
<TextView
android:id="@+id/rls_t1_battery_level"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
<LinearLayout
@ -181,9 +155,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
<!-- Group - Device -->
@ -222,9 +196,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
@ -249,9 +223,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
@ -276,9 +250,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
@ -303,9 +277,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
<LinearLayout
@ -329,9 +303,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
@ -356,9 +330,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="65"
android:textAlignment="center"
android:gravity="center_vertical"
android:text=" " />
android:text=" "
android:textAlignment="center" />
</LinearLayout>
</LinearLayout>

View file

@ -30,7 +30,6 @@
<string name="rileylink_last_used_frequency">Last used frequency</string>
<string name="rileylink_last_device_contact">Last device contact</string>
<string name="rileylink_firmware_version">Firmware</string>
<string name="rileylink_battery_level">Battery level</string>
<!-- RL State -->