Problem
The textAlign property of Button does not work in Windows 8.1 or 10. It appears to be working for other elements like label though.
Test case
!
http://i.imgur.com/UgfR2yw.png!
<Alloy>
<Window class="container">
<TableView id="exampleTable">
<TableViewRow class="exampleRow" >
<Button class="leftC" title="LEFT Button" />
<Button class="centerC" title="CENTER Button" />
<Button class="rightC" title="RIGHT Button" />
</TableViewRow>
<TableViewRow class="exampleRow" >
<Label class="leftC" text="LEFT Label" />
<Label class="centerC" text="CENTER Label" />
<Label class="rightC" text="RIGHT Label" />
</TableViewRow>
</TableView>
</Window>
</Alloy>
".container": {
backgroundColor: '#FFFFFF'
}
"#exampleTable": {
top: '20%'
}
".leftC": {
left: '10%',
width: '20%',
textAlign: Titanium.UI.TEXT_ALIGNMENT_LEFT,
color: '#9AC34D',
backgroundColor: "#764dc3"
}
".centerC": {
width: '20%',
textAlign: Titanium.UI.TEXT_ALIGNMENT_CENTER,
color: '#9AC34D',
backgroundColor: "#764dc3"
}
".rightC": {
right: '10%',
width: '20%',
textAlign: Titanium.UI.TEXT_ALIGNMENT_RIGHT,
color: '#9AC34D',
backgroundColor: "#764dc3"
}
Logs
Discussions
Expect the same functionality as iOS & Android. I was using the CLI to build for 8.1 & 10.0:
appc titanium build --platform windows --target ws-local --wp-sdk 8.1
appc titanium build --platform windows --target ws-local --wp-sdk 10.0
Hello, I am able to reproduce this issue in Windows Phone 8.1 with given code and given step. Steps: 1. Create a alloy project with given code for Windows Phone. 2. Build and run the app on device or emulator. 3. It is seen that
textAlign
property does not work for Buttons. Button text is always in center position although defined left or right in TSS file. However this property works fine for label. Thanks *Environment*: *OS :* Microsoft Windows 8.1 Enterprise N *Device info:* Microsoft Lumia 640 (Windows Phone 8.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0.v20160429102159 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0Note that I'm changing this to an Improvement request, because we explicitly marked textAlign as not implemented for Buttons in our docs and parity matrix (i.e. we didn't get to it yet :) )
Verified as fixed. Tested on: Microsoft Lumia 640 (8.1) Windows Simulator (8.1) Microsoft Lumia 640 (10) Windows Simulator (10) Windows 10 Pro Studio: 4.7.0.201606150733 Ti SDK: 5.4.0.v20160617074028 Appc NPM: 4.2.7-2 App CLI: 5.4.0-18 Node v4.4.4 *Closing Ticket.*