Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27190] Android NavigationWindow back-button UI issue on close

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-10-04T10:09:33.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.3.0
ComponentsAndroid
Labelsn/a
ReporterPrashant Saini
AssigneeYordan Banev
Created2019-06-23T08:09:54.000+0000
Updated2019-10-04T10:09:33.000+0000

Description

Recently we added the support to show the Android back-button or home-button as a part of the NavigationWindow. It automatically closes its window. However, when we press the back-button, sometimes it first hides itself and then closes the window. This is leaving an improper visual effect where the back-button is hidden first and after few milli-seconds, the window is closed.
---- index.xml ----
<Alloy>
    <NavigationWindow id="nav">
        <Window title="Titanium Samples">
            <Button title="Open Window" onClick="openWindow" />
       </Window>
    </NavigationWindow>
</Alloy>

---- index.js ----
function openWindow() {
    $.nav.openWindow(Alloy.createController('/window_1').getView());
}

--- window_1.xml ---
<Alloy>
	<Window title="Horizontal Scrolling">		
		<Label text="Press the back button and notice that the whole window is closed instantly." />
	</Window>
</Alloy>
However, when we add the back-button using *ActionBar* as below, it works fine and closes the entire window altogether and hence doesn't create any lacks.
---- window_2.xml ----
<Alloy>
	<Window title="Horizontal Scrolling">
		<ActionBar displayHomeAsUp="true" platform="android" onHomeIconItemSelected="close" />
		
		<Label text="Press the back button and notice that the whole window is closed instantly." />
	</Window>
</Alloy>
Watch the attached video and notice the lag when the back-button hides itself and the window is closed later. In this duration, the title of the window is also shift to left once the back-button is closed first.

Attachments

FileDateSize
Back_button.mp42019-06-23T08:09:09.000+00002411840

Comments

  1. Yordan Banev 2019-06-27

    I was able to reproduce the issue. PR: https://github.com/appcelerator/titanium_mobile/pull/11003
  2. Yordan Banev 2019-08-19

    PR (8_3_X): https://github.com/appcelerator/titanium_mobile/pull/11157
  3. Satyam Sekhri 2019-08-19

    FR Passed. No flicker when closing the Nav window using the Nav window back button or android's back button.
  4. Christopher Williams 2019-09-09

    merged to master. 8_3_x PR was closed as master is now 8.3.0 target.
  5. Ebenezer Boateng 2019-10-04

    Bug fixed in SDK version 8.3.0.v20191003144543

JSON Source