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

Make sure form end buttons grow together #5944

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Jan 31, 2024

Closes #5942

I also made a change to killAndReopenApp as I ran into some flakes while running checks.

Why is this the best possible solution? Were any other approaches considered?

I used the same solution here that we used for the bottom selection controls on other screens. As far as I can remember, we don't think there's a way to get two elements to grow width/heigh in sync using ConstraintLayout.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

This is really low risk. Probably enough to make sure the bug is fixed!

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

I'd seen some flakes around the app not being relaunched by
killAndReopenApp and looking at the videos, it seemed like the
app simply never reappeared. Using ActivityScenario instead of
launching directly seems to reduce the flakes.
@seadowg seadowg marked this pull request as ready for review January 31, 2024 18:12
@seadowg seadowg requested a review from grzesiek2010 January 31, 2024 18:12
app:icon="@drawable/ic_send_24"
app:iconGravity="textStart" />
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_goneMarginStart="0dp" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might not work as expected now as it's no longer ConstraintLayout. So if the first button is gone (because of the settings) there will be a margin visible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ach! So annoying that we can't have two views match heights like this in ConstraintLayout I looked into it again and it seems like there still isn't a way (although so SOs have out of date answers). I've used LinearLayout's dividers to achieve the same thing as the goneMargin attributes.

Copy link
Member

@grzesiek2010 grzesiek2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in the comments.

@seadowg seadowg requested a review from grzesiek2010 February 1, 2024 10:59
@grzesiek2010 grzesiek2010 merged commit 92ad4fc into getodk:master Feb 1, 2024
6 checks passed
@dbemke
Copy link

dbemke commented Feb 1, 2024

Tested with Success!

Verified on device with Android 8.1,10

Verified cases:

@seadowg seadowg deleted the end-buttons branch February 1, 2024 12:51
@srujner
Copy link

srujner commented Feb 1, 2024

Tested with Success!

Verified on device with Android 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button size differs at the end of form screen.
4 participants