[TIMOB-28370] Android: Add "title" support to Ti.UI.Switch slider style
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-06-10T17:17:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.1 |
Components | Android |
Labels | android, slider, switch, title |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2021-02-25T08:18:37.000+0000 |
Updated | 2021-06-10T17:17:45.000+0000 |
Description
*Summary:*
We should add "title" property support to
Ti.UI.Switch
when it is set to "style" Ti.UI.SWITCH_STYLE_SLIDER
. This allows the text to the left of the switch to align perfectly next to it.
*Note:*
The Ti.UI.Switch
on Android already handles the "textAlign" property, which defaults to Ti.UI.TEXT_ALIGNMENT_LEFT
. We were just missing the ability to set the text.
*Example:*
!SwitchTitleAndroid.png|thumbnail!
Attachments
File | Date | Size |
---|---|---|
SwitchTitleAndroid.png | 2021-02-25T08:22:25.000+0000 | 423416 |
SwitchTitleTest.js | 2021-02-25T08:19:32.000+0000 | 545 |
FR Passed
merged to master and 10_0_X for 10.0.0 release target.
This change didn't get back-ported and is missing in the 10_0_X branch. We'll have to back-port the following commit. https://github.com/appcelerator/titanium_mobile/pull/12353/commits/841c55ad5861b45e40a7f1f03bbdd1740ce297ff
PR (10_0_X): https://github.com/appcelerator/titanium_mobile/pull/12876