[TIMOB-27190] Android NavigationWindow back-button UI issue on close
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-10-04T10:09:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.3.0 |
Components | Android |
Labels | n/a |
Reporter | Prashant Saini |
Assignee | Yordan Banev |
Created | 2019-06-23T08:09:54.000+0000 |
Updated | 2019-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
File | Date | Size |
---|---|---|
Back_button.mp4 | 2019-06-23T08:09:09.000+0000 | 2411840 |
I was able to reproduce the issue. PR: https://github.com/appcelerator/titanium_mobile/pull/11003
PR (8_3_X): https://github.com/appcelerator/titanium_mobile/pull/11157
FR Passed. No flicker when closing the Nav window using the Nav window back button or android's back button.
merged to master. 8_3_x PR was closed as master is now 8.3.0 target.
Bug fixed in SDK version 8.3.0.v20191003144543