question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hiding action bar for android

See original GitHub issue

I want to hide the action bar for Android I tried actionBarHidden=“true” but didn’t work because I am using native script with Angular2 and I can’t use the <page> tag due to an error Are there any solutions to hide it for all activities? Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
dianjuarcommented, Jun 23, 2017

Just for the record

import { Component, OnInit } from '@angular/core';

import { Page } from "ui/page";

export class YourComponent implements OnInit {

    constructor(private _page: Page) { }

    ngOnInit() {
        this._page.actionBarHidden = true;
    }
}

Is not better if the documentation is improved @vakrilov ? I face the same problem and the documentation doesn’t tell any of this.

https://docs.nativescript.org/angular/code-samples/ui/action-bar.html

7reactions
KissBalazscommented, Jan 15, 2020

For any1 late for this party:

  • actionBar cannot be hidden from app.component (root component)
  • you either need to hide it in every component, or,
  • if your root component contains app-router, you can set this parameter to hide it <page-router-outlet actionBarVisibility="never"></page-router-outlet>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to hide Action Bar?
If you want to hide Action Bar throughout the app (Activities, Fragments) everywhere, you can simply navigate to res > values > styles.xml...
Read more >
Android: how to hide ActionBar on certain activities
So one option is to disable ActionBar completely (in the app manifest.xml file) and then add Toolbar in every page that needs an...
Read more >
5 Ways to Hide Android ActionBar - CodeVoila
1.1 Disabling ActionBar in current application's theme. Open app/res/vaules/styles.xml file, add an item to AppTheme style to disable ActionBar.
Read more >
Hide the status bar
This lesson describes how to hide the status bar on different versions of Android. Hiding the status bar (and optionally, the navigation ...
Read more >
How to hide action bar in android?
This example demonstrate about How to hide action bar in android. Step 1 − Create a new project in Android Studio, go to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found