MOHAMED
MOHAMED

Reputation: 43518

How to add a button in the navigation bar in my android application?

In my application (only for my application), I want to add a button to the navigation system bar

enter image description here

How I can do that in my code?

Upvotes: 0

Views: 436

Answers (3)

Jaswinder
Jaswinder

Reputation: 2289

firstly check mobile or tab has soft buttons if has then make full screen by programaticaly after that create custum button bar like tab bar at bottom and put buttons as you like thats better if u dont have any other idea

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

Upvotes: 2

Marcin Orlowski
Marcin Orlowski

Reputation: 75629

You cannot do anything there. Not to mention some devices will not show this bar at all if they got hardware buttons.

Upvotes: 3

Boldijar Paul
Boldijar Paul

Reputation: 5495

You can't.

Maybe try to add a fragment that will be exactly above it.

Some phones don't even have that buttons on screen.

Upvotes: 2

Related Questions