Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15769] Android: Add new 'render' event that fires when a window actually shows

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2014-04-22T21:11:04.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 08, 2014 Sprint 08 SDK, Release 3.3.0
ComponentsAndroid
Labelsactivity, android, axe, events, triage, windows
ReporterFokke Zandbergen
AssigneeHieu Pham
Created2013-11-16T12:56:48.000+0000
Updated2017-03-29T19:29:03.000+0000

Description

Following the discussion in TIMOB-15105 I want to request a new render (or whatever we name it) event for Ti.UI.Window objects that would fire when the window is (first) visible/rendered. As discussed the open event fires when the (on Android) activity is created and proxy element(s) are set up. If you listen to this event and then create another window, this will create a new activity, pausing the activity of the first window, causing it never to be visible at all. If we would have a render event and wait for that to fire, this would solve the problem and make the windows behave like expected. *Use case:* Windows used as loading indicators not showing because they are paused by the next window/activity created.

Comments

  1. Fokke Zandbergen 2013-11-21

    Priority None? Without this event it is now impossible the actually do something *after* a windows shows without running the risk of the user not seeing the window at all because its activity is paused by following operations.
  2. Malcolm Hollingsworth 2013-11-21

    Now I am experiencing this as well.
  3. Ingo Muschenetz 2013-11-21

    [~fokke] We do not immediately assign a priority to all new tickets, especially ones that fall under the "New Feature" category. We will discuss this in triage.
  4. Fokke Zandbergen 2013-11-22

    [~ingo], just consider my comment a contribution to triage then ;) By the way, I see it is labeled Android, but I would like to have this event on all platforms, even if this means it is fired at the exact same moment as open is for those platforms. Otherwise you will have ugly platform switch-code everywhere:
       myWindow.addEventListener(OS_ANDROID ? 'render' : 'open', myCallback);
       
  5. Hieu Pham 2014-04-21

    This is not necessary. 'postLayout' event does the same thing for Android.
  6. Fokke Zandbergen 2014-04-23

    [~hpham] Have you ever used postlayout yourself? It fires for every layout change in the hierarchy, so if you listen to that event on the window the events pile up while you only need it once. It requires bloated code to remove the event listener on its first call and then still leaves you with a polluted bridge. I think **that** shouldn't be necessary :)
  7. Lee Morris 2017-03-29

    Closing ticket as "Won't Fix", with reference to previous comments.
  8. Malcolm Hollingsworth 2017-03-29

    [~lmorris] does this mean you are closing the ticket based on the previous comments that show the 'postLayout' does NOT achieve the objective? So you have chosen not to fix something that is still 'broken' and has no current work-around noted by anyone and certainly not in 'the comments'. If you do NOT WANT to fix that is one thing - but it is improper to suggest that the decision is based on ANYTHING noted in this ticket. Honesty is a great policy I am told.

JSON Source