[TIMOB-3408] iOS: Expose Ti.UI.Label.textAlign "justify"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-11-18T17:34:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | n/a |
Reporter | Doney |
Assignee | Hans Knöchel |
Created | 2011-04-15T03:43:55.000+0000 |
Updated | 2016-11-18T17:37:52.000+0000 |
Description
Please put this into the next release. Allows for prettier text aligning in Labels.
Attachments
File | Date | Size |
---|---|---|
native-test-case_alignment.zip | 2016-11-18T17:16:20.000+0000 | 25074 |
Screen Shot 2016-11-17 at 9.08.21 AM.png | 2016-11-17T17:46:59.000+0000 | 43101 |
Also, letterSpacing would be GREATLY appreciated.
Still nothing? Please add these simple things to TiMobile (preferably iOS). It should be very easy to implement.
Using [CATextLayer](http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CATextLayer_class/Introduction/Introduction.html) might help.
Just came across [this](https://marketplace.appcelerator.com/apps/790#overview) paid module again, which is _insane_. Please make it free, so you can close this ticket and have some more satisfied users (read the reviews).
Still not available in the latest SDK on both iOS and Android. Can please someone check this?
To confirm, you are looking for justified text in labels, and on both iOS an Android?
Yes, please add option to justify label to next release. Thanks
I just needed this property for the new KitchenSink, so let's expose it! Unfortunately, justified text alignment is not available natively on the Android platform, so this is iOS-only for now. PR: https://github.com/appcelerator/titanium_mobile/pull/8562 Unit-Test: https://github.com/appcelerator/titanium-mobile-mocha-suite/pull/8
The bug appears to still be present. This is the environment I used: Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.0.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20161116071014 Appcelerator Studio, build: 4.8.0.201611121409 Xcode 8.1 GM When using "textAlign: Ti.UI.TEXT_ALIGNMENT_JUSTIFY", the actual alignment is LEFT, so it appears that JUSTIFY property is being ignored. I tried this on both labels and textfields., I have a screenshot of what it looks like, and the sample code I used.
!Screen Shot 2016-11-17 at 9.08.21 AM.png|thumbnail!
I re-ran the testcase with additional text in the label, and found that the fix does work correctly. If there are not enough words to wrap around to multiple lines, the alignment behaves like LEFT. This behavior is consistent with Native as well. Therefore, the fix is validated.