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
TIMOB-19629 Android: user defined letter case for button text #8572
Conversation
413969c
to
516627b
Compare
- name: textAllCaps | ||
summary: | | ||
All text to upper case letters, specified using true or false. | ||
type: [boolean] |
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.
Use type: Boolean
@@ -130,6 +131,12 @@ public void processProperties(KrollDict d) | |||
if (needShadow) { | |||
btn.setShadowLayer(shadowRadius, shadowX, shadowY, shadowColor); | |||
} | |||
if (d.containsKey(TiC.PROPERTY_TEXT_ALL_CAPS)){ | |||
boolean caps = TiConvert.toBoolean(d.get(TiC.PROPERTY_TEXT_ALL_CAPS)); |
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.
Set a default value to fall back onto
boolean caps = TiConvert.toBoolean(d.get(TiC.PROPERTY_TEXT_ALL_CAPS), false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { | ||
btn.setAllCaps(caps); | ||
} | ||
} | ||
btn.invalidate(); | ||
} | ||
|
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.
You should also add a similar setter to propertyChanged
...
} else if (key.equals(TiC.PROPERTY_TEXT_ALL_CAPS)) {
boolean caps = TiConvert.toBoolean(d.get(TiC.PROPERTY_TEXT_ALL_CAPS), false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
btn.setAllCaps(caps);
}
...
08fc27a
to
c73e1d1
Compare
So looking at the ticket, the issue is to do with the |
c73e1d1
to
28350b2
Compare
There are 3 fixes available which this is one #1.
|
Superseded by #8592 |
JIRA: https://jira.appcelerator.org/browse/TIMOB-19629