navigationbar

How to hide navigation bar in Android app?

≯℡__Kan透↙ 提交于 2019-12-05 14:45:29
I was wondering how I could hide the navigation bar in an Android application? I know how to hide it initially, but as soon as I touch the screen it pops back up. I want to hide it the same way games like Clash of Clans hide it where the only way to make it pop up is by swiping down the notifications or by swiping where the navigation bar should be. use immersive mode check this Immersive mode // This snippet hides the system bars. private void hideSystemUI() { // Set the IMMERSIVE flag. // Set the content to appear under the system bars so that the content // doesn't resize when the system

How do I change the color of soft keys to white in android(Navigation buttons)

随声附和 提交于 2019-12-05 12:11:57
I am making a basic launcher app where i needed my notification bar and status bar to be perfectly transparent. So i used below code. Window w = getWindow(); // in Activity's onCreate() for instance w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); Which does the trick but the color of the softkeys is not white as shown in figure below. How do i make it white? Ok finally solved it in lollipop. But i haven't tested in devices lower than lollipop. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow()

iOS8 Swift UISearchController hides navigationbar

烂漫一生 提交于 2019-12-05 06:43:09
I implemented a search function for an UITableViewController like this: self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() self.tableView.tableHeaderView = controller.searchBar return controller })() The problem I've been experiencing is that if I click on it, my navigation bar and my navigationcontrollers header disappear. Is there a solution to stop this behaviour (in swift)? Not clicked: Clicked: The UISearchController

Angular 6 Material: mat-tab-link be selected by underlining bar

吃可爱长大的小学妹 提交于 2019-12-05 05:29:06
I have a mat-tab-nav-bar navigation bar for my website, but the mat-tab-link blue underlining bar won't chase the active button. It just stays at the first button, and doesn't move. The buttons do turn into active state though in the sense that the background color changes, and they route well to their corresponding pages. Here's the app.component.ts : import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { navLinks = [ { path: '', label: 'The Problem' }, { path: 'the

How to disable navigationBar animation?

拥有回忆 提交于 2019-12-05 02:29:37
问题 I have two UITableViewControllers such that when I click next on the first UITableViewController, the second UITableViewController gets pushed on the navigation stack and animates the transition like normal. I'd like to make it so when I push next, only the views animate, and the navigation bar doesn't (stays the same). I've gotten very close to doing this with the code below: - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; CATransition *navTransition = [CATransition

Layout is under StatusBar and Soft Keys

删除回忆录丶 提交于 2019-12-05 00:59:13
问题 I'm not sure how I got this, and I can't find anything similar, but my software navigation and status bar are being drawn over my layout instead of my layout being fit between them. How do I get my layout to be drawn between them instead of under? Edit: It seems this is the culprit, located in the styles: <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> 回答1: Just fix this: <item name="android:windowTranslucentStatus">false<

How can the background or the color in the navigation bar be changed?

筅森魡賤 提交于 2019-12-04 18:46:16
Currently I couldn't find any method to change the color/background of the navigation bar in SwiftUI. Any tips? Max Vinícius In order to change color of navigation bar for all view controllers, you have to set it in AppDelegate.swift file Add following code to didFinishLaunchingWithOptions function in AppDelegate.swift var navigationBarAppearace = UINavigationBar.appearance() navigationBarAppearace.tintColor = uicolorFromHex(0xffffff) navigationBarAppearace.barTintColor = uicolorFromHex(0x034517) In here tintColor attribute change the background color of the navigation bar. barTintColor

How to put a badge on customized UIBarButtonItem

烈酒焚心 提交于 2019-12-04 16:51:20
问题 I have a navigation bar with two buttons, one is a back button the other a chat symbol. I write this code like this: UIBarButtonItem *_btn=[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"back.png"] style:UIBarButtonItemStylePlain target:self action:@selector(goBackToPreviousView)]; self.navigationItem.leftBarButtonItem=_btn; self.navigationItem.leftBarButtonItem.tintColor = [UIColor blackColor]; UIBarButtonItem *_btn2=[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@

vertical navigation with rotated text

大兔子大兔子 提交于 2019-12-04 13:46:28
问题 I am trying to achieve a vertical navigation menu which has links and I have rotated the links text to 270 degree with css3. I have rotated it because I wanted the text to be bottom to top. The problem is when I add a padding top it is getting inconsistent spacing. you can see my code here. I am unable to understand the different space being taken. I also tried giving li a height but it did not work. Please if someone could help me out. Here is my code: HTML : <div class="main-nav"> <ul class

How do you keep the Navigation Bar hidden when opening dialogs?

坚强是说给别人听的谎言 提交于 2019-12-04 10:09:16
I have a theme that has a Theme.AppCompat.Dialog parent. The thing is all my activities keeps the navigation bar hidden, but when a dialog is opened, it returns with a sometimes black and sometimes transparent background color. Is there a way to keep it hidden during opening dialogs? I finally solved this by overriding the show() method of the custom dialog that I have. @Override public void show() { // Set the dialog to not focusable. getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE); // Show the dialog with NavBar hidden. super