How to add buttons to android navigation bar (not bottom bar) - android

How can I learn how to cuztomize the android navigation bar?
I know that it is not recommended because of the material ui commandments (but I wanna do it anyways).
There is a few applications out there who supports this - and I was looking into them to see if I can learn it from them.
Lichess
I know a chess app called lichess which added 2 buttons in each side of the navigation bar - and the code is open source on github, but I can't find where the specific buttons are implemented. Also many things in the app is developen in typescript and scala with a wierd html dls.
Edit
I see that lichess is implemented in webview and they might just have created their own "fake" navigation bar in typescript.
CustomNavigationBar
Also there is another app called CuztomNavigationBar which should be able to change the settings for the android navigation bar on a global scale, so that it will persist after the app is closed.
This code is not open source so I cannot find out how he did it. Here is a tutorial how to use his app
Thank you in advance
Here is a image of the bottombar on lichess.

Related

Is there a way to set up an app bar/action bar in an Android app without going through the appcompat library?

I'm having a "this can't be right moment" trying to learn Android app development. I want to add some buttons to the top bar (app bar, toolbar, action bar, etc) of my Activity. Apparently this thing is called the app bar. But when I read the docs, I feel like I'm taking crazy pills:
This class describes how to use the v7 appcompat support library's Toolbar widget as an app bar.
Why do I have to use something called "appcompat" to add a toolbar? I don't care about backwards compatibility right now, I'm just coding an app to learn. Normally backwards compatibility shims/layers are an optional thing. I just want to do this in the most straightforward way at the moment - it'll be easier for me to learn that way.
There are other ways to implement an app bar—for example, some themes set up an ActionBar as an app bar by default—but using the appcompat Toolbar makes it easy to set up an app bar that works on the widest range of devices, and also gives you room to customize your app bar later on as your app develops.
Again, this sounds like the docs are saying that the method they advocate is not the simplest and most basic way, and that there's another. Then one of the very first steps in the tutorial is:
In the app manifest, set the element to use one of appcompat's NoActionBar themes. Using one of these themes prevents the app from using the native ActionBar class to provide the app bar.
Huh? So the first step to getting a toolbar is to turn off the toolbar? At this point I feel like I can hear clown horns going off. Am I being pranked? I don't think Google realize how bonkers this all sounds to a complete beginner.
Is there a way to add buttons/actions to the default Material UI ActionBar in an Activity, without going through the appcompat package?

How can I have a tabbed app in Android like Spotify does?

I'm totally new to Android development. I even don't know the name of components yet, something that make a bit harder to find how can I reach my goals.
Now my main goal is to desing a screen with a bottom tabbed bar, where the user can click in the tabs and the body of the screen changes, like the Spotify's do.
This image shows exactly what I'm looking for with those five icons at the bottom.
You are looking for navigation bottom bar.
Link for design guidelines:
https://material.io/guidelines/components/bottom-navigation.html
Link for example library implementation: https://github.com/aurelhubert/ahbottomnavigation

How do I create an android navigation bar that pushes aside the current view to right?

I need a navigation bar that doesn't slideIn above the current view (the usual overlapping stype), instead it should be as in new ebay app (as if scrolling the wallpaper in homescreen with more than one page). Is it possible to add this effect to material-design-navigation-view? How do I do it?
You can use Sliding Menu Library for your requirement. Here is the link to that library
Sliding Menu Library
And if you are using Android Studio then see this link to add it in your project
Importing in Android Studio
There is no default way to really do this. However, this thread of StackOverflow will help you: push activity on the right when open drawer
Another GitHub library that may suit your need is: Material Drawer. You can download the demo on Google Play Store (same name). A similar approach is the Persistent Header Drawer

How to get the files necessary for a floating action button?

All across the internet and several Stack Overflow pages, there are detailed instructions for the implementation of Floating Action Buttons, but nobody explains where I might be able to acquire the icon myself. Is everyone creating his own action buttons for his UI, or is there a downloadable library somewhere I have yet to discover?
Please link and explain!
Google doesn't provide any code for it, but it should be pretty basic to build yourself.
If you'd prefer to use a library for it, I use this one by shamanland: floating-action-button. You can change the color and icon displayed, and have it auto-hide when the user is scrolling.
There's another popular library by futuresimple here: android-floating-action-button. It includes support for sub-actions with text labels, and two button sizes, but won't give you auto-hiding on scrolling. I think I started with this one and switched to shamanland's, but I don't remember why.
I am creating Floating Action Button and shadow with .xml files as explained here and using icons from icons8.com, it has Android Lollipop specific icons.

Android Tab Bar With Navigation Controller Application

I'm iOS developer, with iOS I can use UITabbarcontroller and UINavigatorcontroller when I want to make Tab bar with Navigator app. Now I'm moving to Android, could you please tell me how to do this, where can I find tutorial with source code?
Thank you.
I had the same problem but using this tutorial it made everything easier. This is for the custom tab bar controller at the bottom of the screen. Since Android SDK has theres on the top you can use this link to create a custom one on the bottom.
http://kpbird.blogspot.com/2011/05/androidbottom-tabbar-control.html
Try answer from this question
Separate Back Stack for each tab in Android using Fragments
here's a github link from the thread https://github.com/iamjayanth/FragmentTabStudy

Categories

Resources