Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18782] Title text truncated on OptionDialog on Android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNot Our Bug
Resolution Date2015-04-29T04:32:45.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsAndroid
Labelsandroid
ReporterGabrielle Littler
AssigneeAshraf Abu
Created2015-02-23T12:10:56.000+0000
Updated2017-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

Comments

  1. Ingo Muschenetz 2015-04-20

    Thoughts on if this is a native Android issue?
  2. Ashraf Abu 2015-04-29

    Just confirming that this is indeed a native behavior for Android.
  3. Ashraf Abu 2015-04-29

    Here's one way to approach it:
       //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();
       
    index.xml
       
       
       <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>
       
       
    Note: When using AndroidView, the Options will not appear on Android.
  4. Lee Morris 2017-06-07

    Closing ticket with reference to the above comments.

JSON Source