[TIMOB-18782] Title text truncated on OptionDialog on Android
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Not Our Bug |
| Resolution Date | 2015-04-29T04:32:45.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 4.1.0 |
| Components | Android |
| Labels | android |
| Reporter | Gabrielle Littler |
| Assignee | Ashraf Abu |
| Created | 2015-02-23T12:10:56.000+0000 |
| Updated | 2017-06-07T21:30:42.000+0000 |
Description
Long title text on the OptionDialog is truncated on android, but shown in full on iOS.
The code to replicate the issue can be found at the following gist.
https://gist.github.com/gllittler/0cf95651218a9cffb640
Thoughts on if this is a native Android issue?
Just confirming that this is indeed a native behavior for Android.
Here's one way to approach it:
index.xml//index.js var isAndroid = (Ti.Platform.osname=='android') ? true : false; function doClick(e) { if(!isAndroid) { $.dialog.title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi lobortis, nunc a vestibulum facilisis, felis sem sagittis diam, et interdum enim neque at tortor."; } $.dialog.show(); // alert($.label.text); } $.index.open();Note: When using AndroidView, the Options will not appear on Android.<Alloy> <Window class="container"> <Label id="label" onClick="doClick">showOptions</Label> <OptionDialog id="dialog"> <!-- Add View or AndroidView for the androidView property --> <AndroidView platform="android" layout="vertical"> <Label color="blue" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi lobortis, nunc a vestibulum facilisis, felis sem sagittis diam, et interdum enim neque at tortor." /> </AndroidView> <!-- The Options tag sets the options property. --> <Options> <Option platform="ios">Confirm</Option> <Option platform="ios">Help</Option> <Option platform="ios">Cancel</Option> </Options> <!-- The ButtonNames tag sets the Android-only buttonNames property. --> <ButtonNames> <ButtonName>Confirm</ButtonName> <ButtonName>Help</ButtonName> <ButtonName>Cancel</ButtonName> </ButtonNames> </OptionDialog> </Window> </Alloy>Closing ticket with reference to the above comments.