[AC-5025] textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-07-31T22:14:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, api, parity |
Reporter | Muhammad Ahmed Fahad |
Assignee | Shak Hossain |
Created | 2017-06-14T08:25:27.000+0000 |
Updated | 2017-07-31T22:14:51.000+0000 |
Description
TextField textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT doesn't seem to be working anymore on Android.
From Ti SDK 6.1.0
[~fahad86], unfortunately we were not able to reproduce this issue. We tested on an Android device with a TextField set up to show right aligned text and it worked. We even tried setting up the Android device for right-to-left text and Titanium's TextFields still correctly displayed the left/right aligned text. Can you give us simple test code to reproduce this issue please? Thanks.
Hi Joshua, can you please try the following on both Android and iOS to see the difference in Behaviour index.xml
<Alloy> <Window layout="vertical"> <View id="phone_section" class="default_field_container"> <View layout="horizontal" height="Ti.UI.FILL"> <Label id="phone_field" class="default_field_label" text="Phone No.:"/> <TextField id="phone_field_input" class="input_text_field" hintText="+852 123456789"/> </View> </View> </Window> </Alloy>
index.tss".default_field_container": { top: 1, width: Ti.UI.FILL, height: 40, backgroundColor: "white" } ".default_field_label": { left: 8, font: { fontSize: 16, fontWeight: 'normal' }, color: "gray" } ".input_text_field": { right: 11, height: Ti.UI.SIZE, width: Ti.UI.FILL, autocorrect: false, font: { fontSize: 16 }, borderRadius: 3, borderColor: "gray", borderWidth: 1, padding: { left: 5, right: 5 }, color: "black", textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT, returnKeyType: Ti.UI.RETURNKEY_NEXT, bubbleParent: false } "#phone_field_input[platform=android]": { focusable: true }
issue seems to appear when *_"padding:{ left: 5, right: 5 }"_* values are set on the textField. I've resolved my issue by getting rid of the padding attributes.
[~fahad86], thanks for the above info. That helped us isolate and reproduce this issue. We've written up a bug report for it here: [TIMOB-24866]
This issue will be fixed in Titanium 6.2.0.