Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13104] Android: Postlayout event not fired

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2013-06-20T18:38:36.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 10 API, 2013 Sprint 10, Release 3.2.0
ComponentsAndroid
Labelsandroid, exalture, iOS, module_imageview, parity, qe-testadded
ReporterCarter Lathrop
AssigneeSunila
Created2013-02-26T10:29:40.000+0000
Updated2013-10-10T09:13:36.000+0000

Description

*Problem* postlayout event not firing on android but works as expected on iOS. Possible Parity. *Steps to Reproduce* 1. Download image attached (chatbubble.jpeg) 2. Paste this code in app.js
	var Window = Ti.UI.createWindow({
		backgroundColor: 'white'
	});
	
	var imageView = Ti.UI.createImageView({
		image : 'chatbubble.jpeg'
	})
 
	imageView.addEventListener("postlayout", function() {
		alert("test");
	});
	
	Window.add(imageView);
	Window.open();

3. Run on device (android) 4. Run on iOS simulator

Android

*Expectation* you get alert message with text "test" on android *Actual* No alert message

iOS

*Correct Behavior* 2 times alert message

Attachments

FileDateSize
chatbubble.jpeg2013-03-18T19:33:30.000+00009664

Comments

  1. Carter Lathrop 2013-02-26

    Please refer to https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report on how to report a bug. We need to see fully reproducible code along with steps to reproduce in order to review a ticket. This code should run when pasted into app.js and clearly show the problem. Thank you.
  2. Alexander Frischbutter 2013-03-14

    Please reopen this bug
  3. Carter Lathrop 2013-03-18

    Alexander, when testing on iOS simulator I only get 2 alert messages. Regardless, I can confirm this is still parity behavior so I will move to Ti-Mobile for engineering to review. Can you confirm or deny the amount of alert messages you are getting? Regards, Carter
  4. Sunila 2013-04-16

    Overrode onLayout of the native control. https://github.com/appcelerator/titanium_mobile/pull/4171
  5. Daniel Sefton 2013-06-19

    Re-opening as per TC-2492. The following code
       var Window = Ti.UI.createWindow({
           backgroundColor: 'white'
       });
        
       var imageView = Ti.UI.createImageView({
           image:"/iphone/appicon.png"
       })
        
       imageView.addEventListener("postlayout", function() {
           alert("test");
       });
        
       Window.add(imageView);
       Window.open();
       
    Does not generate an alert as expected. This is working as expected with iOS and the base View class
  6. Sunila 2013-06-20

    I tried with the latest code and it fires the event every time I launch the app.
  7. Daniel Sefton 2013-06-20

    Resolving as fixed again -- I failed to notice that Ben was using 3.1.1 GA and this fix is for 3.2. Thanks.
  8. Priya Agarwal 2013-10-10

    Verified the fixed with Environment: Appc-Studio: 3.2.0.201310092427 Sdk:3.2.0.v20131009134844 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:Google Nexus 7(v4.3),ipodTouch1(v7.0) Xcode: 5 PostLayout event is being called both on android and ios. Checked with imageView Control.

JSON Source