Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-727

Alloy: OptionDialog androidView not showing up

    Details

      Description

      The customView (androidView property) of an OptionDialog, does not work as expected. The content does not show when it is added through the controller.

      The following does not work: (custom view inside OptionDialog tag) where

      <OptionDialog id="dialogView" platform="android" >
      		<View id="container" class="VerticalView">
      			<Label id="name"></Label>
      			<Label id="address"></Label>
      			<Label id="zip"></Label>
      			<Label id="city"></Label>
      			<Label id="phone"></Label>
      			<Label id="mail"></Label>
      		</View>
      	</OptionDialog>	
      

      $.name.text = Alloy.language.Name+": " + company.CompanyName;
      $.address.text = Alloy.language.Address+": " + company.CompanyAddress;
      $.zip.text = Alloy.language.ZipCode+": " + company.CompanyZipCode;
      $.city.text = Alloy.language.City+": " + company.CompanyCity;
      $.phone.text = Alloy.language.Phone+": " + company.CompanyPhone;
      $.mail.text = Alloy.language.Email+": " + company.CompanyEmail;
      

      The following do work: (here I add the androidView manually through the controller)

      <OptionDialog id="dialogView" platform="android" />
       
      <View id="container" class="VerticalView" platform="android">
      	<Label id="name"></Label>
      	<Label id="address"></Label>
      	<Label id="zip"></Label>
      	<Label id="city"></Label>
      	<Label id="phone"></Label>
      	<Label id="mail"></Label>
      </View>
      

      $.name.text = Alloy.language.Name+": " + company.CompanyName;
      $.address.text = Alloy.language.Address+": " + company.CompanyAddress;
      $.zip.text = Alloy.language.ZipCode+": " + company.CompanyZipCode;
      $.city.text = Alloy.language.City+": " + company.CompanyCity;
      $.phone.text = Alloy.language.Phone+": " + company.CompanyPhone;
      $.mail.text = Alloy.language.Email+": " + company.CompanyEmail;
       
      if(OS_ANDROID){
      	//manually set the androidView property
      	$.dialogView.androidView = $.containerView;
      	$.dialogView.show();
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tlukasavage Tony Lukasavage
                Reporter:
                viezel Mads Moller
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code