Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5025] textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2017-07-31T22:14:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, api, parity
ReporterMuhammad Ahmed Fahad
AssigneeShak Hossain
Created2017-06-14T08:25:27.000+0000
Updated2017-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

Comments

  1. Joshua Quick 2017-06-15

    [~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.
  2. Muhammad Ahmed Fahad 2017-06-16

    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 }
  3. Muhammad Ahmed Fahad 2017-06-20

    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.
  4. Joshua Quick 2017-06-20

    [~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]
  5. Joshua Quick 2017-07-26

    This issue will be fixed in Titanium 6.2.0.

JSON Source