-
-
Notifications
You must be signed in to change notification settings - Fork 45
Solved small size issue when capturing photo during personalID sign up #3423
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
Conversation
📝 WalkthroughWalkthroughThis change restructures the button layout in the personal ID photo capture screen by introducing a horizontal LinearLayout container that wraps two MaterialButton controls. Both buttons are configured with weight-based widths (0dp with weight=1) to distribute horizontal space equally, with start and end margins added for spacing between them. The second button remains disabled by default. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/res/layout/screen_personalid_photo_capture.xml (1)
52-59: Optional: Remove redundantgravityattribute.The
android:gravity="center_horizontal"on the horizontal LinearLayout is redundant since both child buttons uselayout_weight="1", occupying the full available width. This attribute has no functional effect but can be removed for clarity.<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:gravity="center_horizontal" android:layout_marginEnd="20dp" android:layout_marginStart="20dp" >
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/res/layout/screen_personalid_photo_capture.xml(1 hunks)
🔇 Additional comments (1)
app/res/layout/screen_personalid_photo_capture.xml (1)
52-76: Layout restructuring correctly resolves small-screen visibility issue.The weight-based layout approach is the correct standard pattern for distributing equal horizontal space to both buttons. The new horizontal LinearLayout wrapper (lines 52-76) with
layout_weight="1"on each button ensures both are visible and properly sized across device widths, directly addressing the reported issue. Spacing is appropriate: 20dp container margins and 5dp inter-button gap maintain visual balance.
conroy-ricketts
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that Coderabbit's nitpick comment is worth looking at, but these changes look good to me.
This ticket is very interesting to me though... I wonder if that user is not able to do a lot of different things in the CommCare app because of the abnormal screen size/ratio? Surely this wouldn't be his only issue?
@conroy-ricketts I was also having same thought that it was something else but after debugging found out that the screen size is the issue. Initial pages on PersonalId registration has screen component with less gap between them. I tried to replicate the issue with small screen emulator, it shows clearly that screen has no space to show the
|

Technical Summary
https://dimagi.atlassian.net/browse/CI-391
As per the ticket, user is having small screen phone so not able to view the
SAVE PHOTObutton after taking the photo. In this current changes, I have made both button on same line equi distance from center as showing in below screen shotFeature Flag
Safety Assurance
QA Plan
Test upload photo
Labels and Review