Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26288] Android: Add ability to hide/show back button on Window

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-11-13T19:24:56.000+0000
Affected Version/sRelease 7.1.0
Fix Version/sRelease 8.0.0
Componentsn/a
Labelsn/a
ReporterHans Knöchel
AssigneeGary Mathews
Created2018-08-11T22:47:30.000+0000
Updated2018-11-13T19:24:56.000+0000

Description

We implemented the ability to hide the back-button on iOS (enabled by default) via TIMOB-25871. For Android, the back-button (home indicator) is not shown, but for parity sake, we should make this toggleable (on creation only). Right now, the following needs to done for every sub-window:
function onOpen() {
	const actionBar = $.window.getActivity().getActionBar();

	if (actionBar !== null) {
		actionBar.displayHomeAsUp = true;
		actionBar.onHomeIconItemSelected = close;
	}
}
Having a property and doing this internally would be a huge cross-platform shared parity-code improvement, especially for larger scaled apps. On long-term, this should part of the Ti.UI.NavigationWindow effort, but I think this did not gain much love so far.

Comments

  1. Abir Mukherjee 2018-11-13

    Android navigation window will support this.

JSON Source