Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript android remove action bar

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

like image 612
Dilar Avatar asked Oct 28 '15 01:10

Dilar


1 Answers

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;      }  }
like image 194
Diego Melo Avatar answered Oct 02 '22 11:10

Diego Melo