1,950 questions
202
votes
11
answers
225k
views
Android lollipop change navigation bar color
In my app I need to change the bottom navigation bar color. I watched many post but cant find with the solution. I am using appCompat library.
v21/styles.xml
<style name="AppTheme" parent="Theme....
200
votes
12
answers
195k
views
Selected tab's color in Bottom Navigation View
I'm adding a BottomNavigationView to a project, and I would like to have a different text (and icon tint) color for the selected tab (to achieve greying out non-selected tabs effect). Using a ...
161
votes
12
answers
229k
views
UIBarButtonItem in navigation bar programmatically?
I've been looking around for this solution for a while but haven't got any.
e.g one solution is
self.navigationItem.setRightBarButtonItem(UIBarButtonItem(barButtonSystemItem: .Stop, target: self, ...
143
votes
28
answers
177k
views
SwiftUI update navigation bar title color
How to change the navigation bar title color in SwiftUI
NavigationView {
List {
ForEach(0..<15) { item in
HStack {
Text("Apple")
...
112
votes
18
answers
124k
views
iOS change navigation bar title font and color
So i have this code that should change the nav bar title font, but it doenst
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont
...
105
votes
15
answers
209k
views
How to hide navigation bar permanently in android activity?
I want to hide navigation bar permanently in my activity(not whole system ui).
now i'm using this piece of code
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)...
74
votes
14
answers
49k
views
Prevent BottomSheetDialogFragment covering navigation bar
I'm using really naive code to show a bottom sheet dialog fragment:
class LogoutBottomSheetFragment : BottomSheetDialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ...
70
votes
2
answers
131k
views
What is the height of Navigation Bar in iOS 7?
I 've just created a simple iOS 7 app using the default Master Details template.
In the MasterViewController.m, viewDidAppear method, I logged for
self.navigationController.navigationBar.frame.size....
63
votes
9
answers
43k
views
View got hidden below UINavigationBar iOS 7
Earlier, I was using iOS 6.1 for my project. Recently I have switched to iOS 7. For, a lot of changes I knew, I updated my code.. But I have observed a strange behavior. My view on every screen gets ...
60
votes
11
answers
92k
views
change navigation bar title font - swift
I have a title in my navigation bar and a i want to change it to custom font. I've found this line of code, but it's for when you have a navigation controller.
self.navigationController?....
58
votes
8
answers
6k
views
Xcode 11.4. Navigation's Title Color gone BLACK from storyboard
I recently updated my Xcode to 11.4. When I run the app on the device, i've noticed that all my navigations item's titles gone fully black when being set from storyboard.
You can't change neither from ...
57
votes
8
answers
55k
views
Set the Navigation Bar Title Font
This is a SwiftUI question, not UIKit
I'm trying to set a different font for the navigation bar title using SwiftUI. My suspicion is that this isn't supported yet. Here's what I've tried:
var body: ...
56
votes
6
answers
105k
views
iOS navigation bar item image size
I want to customize my NavigationBar button and using my own images.
The question is what the size should be?
I found that the button size should be 40*40, so the image should be 80*80 for retina?
54
votes
12
answers
35k
views
How to set the activity indicator in the navigation bar?
I am new to iphone development. I want to set an activity indicator in the navigation bar. I see my activity indicator below the navigation bar. My code is here
- (IBAction) gomethod : (id) sender {
...
51
votes
12
answers
65k
views
How to add animation while changing the hidden mode of a uiview?
I want to add animation to a view while changing its hidden mode i.e
my_view.hidden=YES;
I have added a button in navigationbar. When we click on it the new view is set to be unhide. It draws at the ...
45
votes
9
answers
119k
views
Permanently hide Navigation Bar in an activity
Is it possible to permanently remove the Navigation Bar on an activity? I want to remove the bar with the buttons that appear at the button of the screen on a tablet, not the Action Bar. Here.
I know ...
38
votes
9
answers
24k
views
Position of navigation bar for modal view - iOS7
In a navigation controller, you automatically get the correct colour and position of a navigation bar as expected.
like this
But in modal view, when you drag in a navigation bar, you can position it ...
36
votes
3
answers
26k
views
Android 4.4 translucent Status and Navigation bars style on Android 5.0
On Android 4.4 KitKat you can set the Status and Navigation bars transparent with the android:windowTranslucentStatus and android:windowTranslucentNavigation theme elements, and then below the bars ...
34
votes
9
answers
45k
views
How do I change navigationBar font in Swift?
This is what I have tried so far, but receiving an error (I have correctly implemented CaviarDreams to the project):
self.navigationController.navigationBar.titleTextAttributes = NSFontAttributeName[...
31
votes
6
answers
67k
views
Swift 3.0 Adding a Right Button to Navigation Bar
I have added a navigation bar to the top of a view controller. I am trying to control whether a button is visible based a condition, but I am having trouble adding the button. So far I have,
var ...
30
votes
9
answers
46k
views
Hide Android Navigation Bar in React Native
How can I hide the Android Navigation Bar in React Native?
I'm referring to the bar at the bottom of the screen that has the software back button and home button, not the component at the top of the ...
30
votes
7
answers
13k
views
Android Navigation Bar covering viewpager content
I can't stop the Systems Navigation Bar from covering up my content!
I am scrolled to the very bottom of the recyclerview but its getting hidden behind the navigation bar. Here is my XML layout.
<...
27
votes
4
answers
34k
views
How to get rid of white space between css horizontal list items? [duplicate]
I've got the following test page and css. When displayed, there is a 4px gap between each list item. How do I get the items to be next to each other?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 ...
26
votes
2
answers
3k
views
Change back button to arrow-down in Navigation Bar
I'm using an AppCompatDialogFragment to show a BottomSheetDialog. Clicking the back button on the Navigation Bar closes the BottomSheetDialog.
I want to change the icon on the Navigation Bar from the ...
25
votes
11
answers
50k
views
How to hide React Native NavigationBar
I have NavigatorIOS under Navigator and would like to hide Navigator's NavigationBar to use NavigatorIOS's bar. Is there any way to do this?
This is screenshot that I've seen. I need backend of ...
25
votes
9
answers
77k
views
How to add a right bar button to a navigation bar in iphone
I want to add a right bar button item to the navigation bar, so that on click, it performs certain a function.
I have created the following code to add the right bar button item, but after it is done,...
24
votes
6
answers
21k
views
Restoring fragment state when changing fragments through bottom navigation bar
I have bottom navigation bar on click of item in navigation bar i am replacing fragments. I have 3 fragments A,B,C so on click of b item B fragment is loaded and in B i am calling 3-4 APIs. So now if ...
24
votes
3
answers
21k
views
Content going behind Navigation Bar
I am facing a problem with android 5.0 and above. Whenever I align any view to parent bottom, Content is getting hidden behind the soft navigation button.
Above attached is the screenshot of the ...
22
votes
6
answers
47k
views
Angular 6 Material: mat-tab-link be selected by underlining bar
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 ...
22
votes
3
answers
8k
views
iOS 11 black bar appears on navigation bar when pushing view controller
I have this weird bug only in iOS 11, in lower iOS, everything works fine.
The problem is that whenever pushing to a view controller, there is a black space appears on top of the navigation bar. Has ...
21
votes
6
answers
16k
views
Image for Navigation Bar with Large Title iOS 11
AppStore app has an icon with an image on the right side of the NabBar with Large Title:
Would really appreciate if anyone knows how to implement it or ideas on how to do it.
BTW: Setting an image ...
18
votes
3
answers
23k
views
Adding a title to the left side of the navigation bar
Is it possible to add a title to the left side of the navigation bar? I know how I can add a title in the center but when I try to add one to the left side I see nothing. This is the code I have:
...
18
votes
7
answers
25k
views
How to put a badge on customized UIBarButtonItem
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:@"...
18
votes
5
answers
13k
views
How to remove the Xamarin.Forms Navigation Bar?
Is there any way to remove the Navigation Bar from Xamarin.Forms - Portable (xaml) in Android?
I want to remove the "less than sign" ('<') and the application icon which appears above the content ...
17
votes
8
answers
21k
views
How to add a image at the center of navigationBar in Objective-C?
I am developing in IOS , I use the following code to set a background to the navigationBar.
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bar-back"] forBarMetrics:...
17
votes
5
answers
11k
views
Adding Segmented Style Picker to SwiftUI's NavigationView
The question is as simple as in the title. I am trying to put a Picker which has the style of SegmentedPickerStyle to NavigationBar in SwiftUI. It is just like the native Phone application's history ...
17
votes
5
answers
10k
views
How to Have a Transparent Status Bar but Leave Navigation Bar Opaque?
I want to have a transparent status bar on my app (so the background goes behind it) but I want the navigation bar at the bottom to stay black.
I can make both transparent by setting getWindow()....
17
votes
1
answer
3k
views
Listen for first TouchEvent when using SYSTEM_UI_FLAG_HIDE_NAVIGATION
Starting with API 14 you can use this flag SYSTEM_UI_FLAG_HIDE_NAVIGATION on a View within your Activity to tell the system you want to hide the navigation bar until there is user interaction (screen ...
17
votes
1
answer
1k
views
iOS 12.0 : Is there a way to set MFMailComposeViewController navigation bar title's text to white?
Currently, I haven't found a way to do this for iOS 12.0. I've tried setting bar tint like so.
[mailController.navigationBar setTintColor:[UIColor whiteColor]];
Then, I tried setting the title text ...
16
votes
7
answers
24k
views
Bottom soft NavigationBar overlaps my ListView
I ran my app on a Nexus 5 (Android 5) but I encountered the problem that the soft NavigationBar at the bottom overlaps the last item of my ListView. I've tried to add fitsSystemWindows to my style and ...
16
votes
8
answers
21k
views
Light Navigation Bar
I want to change the color of the navigation bar from black (w/ white icons) to white (w/ black icons).
Desired result (as seen in uCrop) :
I know how to change the status bar color via android:...
15
votes
6
answers
35k
views
How to add custom color to navigation bar in iphone?
How do I set the navigation bar to a custom color (e.g. dark green) ?
I know how to change the navigation bar to primary colors like green and red, using code like this:
UINavigationBar *bar = [...
15
votes
3
answers
14k
views
Responsive replacement for Semantic UI's navigation menu
Semantic UI has some problems when it comes to it's menu collection. In short, it's not responsive at all, and the closest thing to it is their "stackable" implementation to simply show the menu as a ...
15
votes
2
answers
20k
views
How to use a named routes in a BottomNavigationBar in flutter?
I am using BottomNavigationBar and when clicked on any icons in the navigation bar. I want it to go to next screen. That's why I am using named route here.
main.dart code
import 'package:flutter/...
15
votes
2
answers
2k
views
Window animation overlaps navigation bar on Android 5.0
I'm implementing the Material Design bottom sheet design pattern in my app using a custom subclass of Dialog. The dialog is gravitated to the bottom of the screen and uses an y-translation window ...
14
votes
2
answers
8k
views
Draw over navigation bar (and other apps) on Android version >= 5
I'd like to draw a (mouse pointer) icon on screen over the other applications from a service. I have implemented the functionality and I can draw over the screen, apart from the navigation bar. I've ...
14
votes
5
answers
6k
views
LargeTitles UIScrollView does not support multiple observers implementing _scrollViewWillEndDraggingWithVelocity:targetContentOffset
I have implemented large titles in my app with the following code:
if #available(iOS 11.0, *) {
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem....
14
votes
2
answers
8k
views
iOS 11 - UINavigationItem titleView when using Large Titles mode
I'm trying to understand either it's a bug or it's the expected behavior.
On iOS 10 and earlier we could set up a custom title, using navigationItem.titleView.
On iOS 11, when setting our ...
13
votes
4
answers
24k
views
Swift - Present another view controller with its navigation bar
I have two ViewControllers -- one with storyboard and one without. Both of those view controllers have their own Navigation Bar at the top. Now when I use self.presentViewController(...
13
votes
3
answers
1k
views
iOS 7: How to set UIBarButtonItem backButtonBackgroundImage for UIControlStateHighlighted?
I am trying to set the background image for back button in normal and highlighted states.
- (void)configureBackButtonInNavigationItem:(UINavigationItem *)item
{
UIBarButtonItem *backBarButtonItem =...