-
Notifications
You must be signed in to change notification settings - Fork 815
fix: spinner hint display #2672
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
fix: spinner hint display #2672
Conversation
Reviewer's Guide by SourceryThis pull request replaces the LinearLayout with ConstraintLayout in No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @rahul31124 - I've reviewed your changes - here's some feedback:
Overall Comments:
- It's great you included before and after screenshots to show the impact of your changes.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="@dimen/create_config_margin1" | ||
android:orientation="horizontal"> | ||
android:layout_marginStart="@dimen/create_config_margin1"> | ||
|
||
<TextView | ||
android:id="@+id/time_interval_title" | ||
style="@style/Base.TextAppearance.AppCompat.Title" | ||
android:layout_width="wrap_content" |
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.
suggestion: Spinner width may need to be set to 0dp for chain weights to apply.
The spinner has a horizontal weight assigned, yet its width is set to wrap_content. In a ConstraintLayout chain with weighted distribution, each view that participates should use a 0dp width. Consider revising the spinner’s width to 0dp to ensure its weight is honored as intended.
Suggested implementation:
<Spinner
android:id="@+id/time_interval_spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintHorizontal_weight="1"
... />
Ensure that the Spinner element has its associated constraints in the ConstraintLayout chain correctly set so that the 0dp width together with the assigned weight produces the desired layout.
If your spinner is defined elsewhere or uses a different id or attributes, adjust the id/attributes accordingly.
Build successful. APKs to test: https://github.com/fossasia/pslab-android/actions/runs/14714479965/artifacts/3024101008 |
dc1239e
to
f687022
Compare
…124/pslab-android into fix-spinner-hint-display # Conflicts: # app/src/main/res/layout/activity_create_config.xml
Fixed it
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.
Successfully tested on my device,
@rahul31124 Thank you for your contribution!
Fixes #2188
Changes
Changed layout from LinearLayout to ConstraintLayout.
Screenshots / Recordings
Before


After
Checklist:
strings.xml
,dimens.xml
andcolors.xml
without hard coding any value.strings.xml
,dimens.xml
orcolors.xml
.Summary by Sourcery
Refactor the time interval layout in the create config activity from LinearLayout to ConstraintLayout to improve UI positioning and responsiveness
Bug Fixes:
Enhancements: