Skip to content

Commit

Permalink
Merge branch '8_0_X' into TIMOB-26835_8_0_X
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjsamir committed Apr 3, 2019
2 parents fc93260 + 6c108ab commit 7c8d045
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,12 @@ public String getApiName()
{
return "Ti.UI.NavigationWindow";
}

public WindowProxy getRootWindowProxy()
{
if (!windows.isEmpty()) {
return windows.get(0);
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.kroll.common.Log;
import org.appcelerator.titanium.TiActivity;
import org.appcelerator.titanium.TiActivityWindow;
import org.appcelerator.titanium.TiActivityWindows;
Expand Down Expand Up @@ -53,7 +52,6 @@
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.view.WindowManager;
// clang-format off
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
Expand Down Expand Up @@ -286,7 +284,10 @@ public void windowCreated(TiBaseActivity activity, Bundle savedInstanceState)
}
activity.getSupportActionBar().setHomeButtonEnabled(
!getProperties().optBoolean(TiC.PROPERTY_HIDES_BACK_BUTTON, false));
activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Get a reference to the root window in the NavigationWindow.
WindowProxy rootWindowProxy = ((NavigationWindowProxy) this.getNavigationWindow()).getRootWindowProxy();
// If the root window matches this window do not show the Up navigation button.
activity.getSupportActionBar().setDisplayHomeAsUpEnabled(rootWindowProxy != this);
}

activity.getActivityProxy().getDecorView().add(this);
Expand Down

0 comments on commit 7c8d045

Please sign in to comment.