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
Android: Fixed picker spinner to size/position columns correctly on Android 5.0 and higher #9674
Conversation
Adjust canvas translate offset
Generated by 🚫 dangerJS |
Leading to different result on API 25 & 26. |
if (Build.VERSION.SDK_INT < 21) { | ||
translateY = -getItemOffset(); | ||
} else { | ||
translateY = 0; |
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.
Maggie, this UI widget still has offset issues on API Levels > 21, right? I think we should by translating by the value returned by getTextSize()
for the higher API Levels. This is because we offset it by text size here.
That is, it should look like this...
if (Build.VERSION.SDK_INT < 21) {
translateY = -getItemOffset();
} else {
translateY = getTextSize() / 2.0f;
}
Can you give the above a go please?
@jquick-axway This is my testing result comparing the translateY. Not sure if it is showing different result on your devices? |
…n Android 5.0 and higher.
Updated PR. Spinner sizing/positioning issues on Android 5.0 and higher is now fixed. |
FR Passed. Picker spinner columns size/position as expected. Studio Ver: 5.1.0.201804230827 |
JIRA:
https://jira.appcelerator.org/browse/TIMOB-19822
Test:
SpinnerTest.js
file attached to TIMOB-19822 on Android 5.0 or higher.SpinnerTest-good.png
attached to TIMOB-19822 for an idea of what spinners should look like.