Nativescript android remove action bar

Dilar picture Dilar · Oct 28, 2015 · Viewed 22.2k times · Source

I am trying to develop android app using Nativescript and try to remove Action Bar (top bar with "testns" title), but don't know how. I am using code below but not working. Currently using tns v.1.3.0

var frameModule = require("ui/frame"); exports.pageLoaded = function(){ var topmost = frameModule.topmost(); topmost.android.showActionBar = false; };

Screenshot of the app

Answer

Diego Melo picture Diego Melo · Oct 10, 2016

You can explicitly control the visibility of the ActionBar by setting the actionBarHidden property of the Page, look this:

import {Page} from "ui/page";

export class AppComponent {
    constructor(page: Page) {
        page.actionBarHidden = true;
    }
}