1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-13 19:27:33 +01:00

Hide heart rate status label view if empty

This commit is contained in:
José Rebelo 2021-12-18 23:21:47 +00:00
parent 7e349213a5
commit 54749ec9d9

View File

@ -241,6 +241,13 @@ public class GBDeviceAdapterv2 extends RecyclerView.Adapter<GBDeviceAdapterv2.Vi
} else { } else {
holder.heartRateStatusLabel.setText(""); holder.heartRateStatusLabel.setText("");
} }
// Hide the level, if it has no text
if (TextUtils.isEmpty(holder.heartRateStatusLabel.getText())) {
holder.heartRateStatusLabel.setVisibility(View.GONE);
} else {
holder.heartRateStatusLabel.setVisibility(View.VISIBLE);
}
} }
holder.heartRateStatusBox.setOnClickListener(new View.OnClickListener() { holder.heartRateStatusBox.setOnClickListener(new View.OnClickListener() {