Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor expiry note on home screen wrap #3499

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

Navid200
Copy link
Collaborator

The following images show what the sensor expiry looks like on May 28 and May 29, 2024 releases respectively.
Screenshot_20240529-223455
Screenshot_20240529-220259

The change of the Android target has affected the behavior of linear layout and caused the sensor expiry note to wrap.
I am sorry I missed this change in my tests of Android 15 upgrade.

This issue has been reported here: #3495

My take is that Android 6 gave no space to an item if it was invisible. But, it seems Android 7 dedicates space to it even if it is invisible.
I am not sure what the purpose of collector status is on the home shelf. This PR gives 99% of the space to sensor expiry and 1% to collector status.
The result is that as long as the collector status is invisible (empty), it will be effectively taking no space and the final result will be as it was before upgrade to Android 15.

@Navid200
Copy link
Collaborator Author

This is the result after this PR:
Screenshot_20240530-114243

@jamorham
Copy link
Collaborator

jamorham commented Jun 1, 2024

I think this will break the collector status which is where you see things like Sensor Expired etc. Is the problem actual something to do with the layout_width being 0dp? You can prototype the change by making the android:text field not observable and just replacing with the placeholder text while you debug the layout.

@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 1, 2024

This isn't changing the collector status. It's only changing how much room on screen is allocated to it.
I have tested this.

@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 1, 2024

I can only speculate that the space is evenly divided between sensor status and sensor expiry since each is given the same weight.
With Android 6, when one was empty, it did not occupy any space.
With 7, it seems like this has changed and even though it is empty, it is till given half of the space.

I have changed the weight and have given 1% of the shared space to collector status and 99% of the space to sensor expiry.

@jamorham
Copy link
Collaborator

jamorham commented Jun 1, 2024

So how does it look when both are displayed?

@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 1, 2024

OK,

I now understand.
I am embarassed to say I don 't know hot to show anything as collector status on home screen.

How can I do that so that I can properly test this?

@jamorham
Copy link
Collaborator

jamorham commented Jun 1, 2024

See my comment 7 mins ago which explains how to prototype that for testing

@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 1, 2024

Under normal operating conditions, when will both of these two fields be occupied?
Warmup?

@Navid200 Navid200 marked this pull request as draft June 1, 2024 16:48
@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 1, 2024

The following images show the result after the latest update to this PR.

Screenshot_20240601-123634 Screenshot_20240601-130007

The following shows a test where I have forced the collector status to also be visible at the same time as sensor expiry is.
Screenshot_20240601-130739

@Navid200 Navid200 marked this pull request as ready for review June 1, 2024 17:12
@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 1, 2024

Thanks for the review and catching my error.

@Navid200
Copy link
Collaborator Author

Navid200 commented Jun 2, 2024

This is what this PR shows after just starting a new G7.
Screenshot_20240602-072150

@jamorham jamorham merged commit 8309dae into NightscoutFoundation:master Jun 11, 2024
1 check passed
@Navid200 Navid200 deleted the Navid_2024_05_29 branch June 11, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants