Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4469] Alloy Android button element does not set title attribute

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2016-11-01T15:34:14.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsAlloy
Labelsalloy, android, button
ReporterMichael Bahl
AssigneeShak Hossain
Created2016-09-18T09:59:06.000+0000
Updated2016-11-16T18:24:31.000+0000

Description

Button title is not set on android when non visiual characters (line break/whitespace) are used in following alloy definition:
<!-- This one works as expected on Android -->
<Button class="defaultButton"><Label platform="ios" class="defaultLabel"/></Button>

<!-- This does not work on Android -->
<Button class="defaultButton">
   <Label platform="ios" class="defaultLabel"/>
</Button>
I would expect that both button definition's would work, but when I take a look at the derived files I can see that the buttons title attribute is not set for the second button definition. In my opinion the label shouldn't have any affect at all cause the label is marked as ios only element. Sample project: https://github.com/MichelBahl/AC-4469

Comments

  1. Sharif AbuDarda 2016-10-13

    Hello, The issue is not reproducible with your sample code. I did a format on the studio and here is the code looks like
       <Alloy>
       	<Window class="container">
       		<View height="Ti.UI.SIZE" layout="vertical">
       			<View class="containerView buttonMargin">
       				<!-- This one works as expected on Android -->
       				<Button class="defaultButton">
       					<Label platform="ios" class="defaultLabel"/>
       				</Button>
       			</View>
       			<View class="containerView buttonMargin">
       				<!-- This does not work on Android -->
       				<Button class="defaultButton">
       					<Label platform="ios" class="defaultLabel"/>
       				</Button>
       			</View>
       			<View class="containerView buttonMargin">
       				<!-- This does not work either on Android -->
       				<Button class="defaultButton">
       					<Label platform="ios" class="defaultLabel"/>
       				</Button>
       			</View>
       		</View>
       	</Window>
       </Alloy>
       
    I see only one button on the middle. Thanks.
  2. Michael Bahl 2016-11-16

    This ticket is not fixed, please reopen.

JSON Source