I am creating an app that will always run in landscape. On tablets the system navigation bar is placed horizontally at the bottom of the screen, and on the phones it is placed vertically at the right end of the screen.
My question is if it is possible to control the placement of the navigation bar via a flag or with some code. I would like it to always appear either at the bottom, or to the right of the screen consistently, regardless of the device.
Related
Please, help me to understand how to do it right.
I have an app, which represent a screen with bottom bar with 4 tabs (1st layer). From this tabs we can enter other screens (2nd layer) without bottom bar. This organized very simple, Scaffold with bottom bar and navigation host inside it. To open screens above 1st layer without navigation bar I searched and found that I can just hide bottom bar and then open the screen above.
This is good, but on slow devices an ugly animation happen when 1)bottom bar is going down (user see the old screen without bottom bar) and 2) new screen appears.
This is not pleasant, but.. ok.
The second thing that I cannot stand is when in a 1-st layer screen I have a ModalBottomSheetLayout. When it hidden - it hides right behind bottom navigation bar and when I am going to new screen bottom navigation animated down and... here you are - the ModalBottomSheetLayout, and only then the second screen come to the place.
I wonder, may be I understand everything wrong and the new screens shouldn't be organized like this? How to set up navigation and scene like before compose we have a main fragment with bottom nav bar and open fragments on the top?
The example of the code I am talking about can be found for example in app nowinandroid, I think this is very common case.. As I see they also just hide bottom bar when needed..
#Composable fun NiaApp...
my problem is my floating action button is cut when the app runs. Is there any way I can make it fit within the screen?
I am implementing my app in full screen, and I am getting the problem when system UI have bottom navigation buttons. The bottom navigation buttons are covering the area. How do I know that full screen display is enable or not? (i.e. in Latest Xiomi mobiles we can show/hide bottom navigation buttons)
I need to move the android Navigation Bar from the bottom of the display to the right side of the display.
The android app I'm working on requires the user to touch the bottom of the screen often, so I'd like to move the navigation bar to the right side of the screen. I believe this is possible, as I've seen it done in several games. The attached image shows what I'd like to achieve; when the user swipes from the bottom or top, the android bars appear at the top and RIGHT side, as opposed to the top and BOTTOM.
I've read through a lot of existing similar posts, and have tried the suggested answers, however they seem to instruct how to move a navigation DRAWER (ie a new "bar" implemented by the app) to the right side, as opposed to the BAR itself; I believe these are two different things.
Further, the information on android developer (https://developer.android.com/training/system-ui/immersive) suggests that the bar cannot be moved, it can only be temporarily hidden. If that's the case though, how are the app's such as the one in the image doing it? Any suggestions?
I have an app with an action bar, fragments, etc. and I want to have an extra menu available by pulling a bottom bar upwards. When it's pulled up, the whole screen should move up, revealing the menu.
How would I go about this?
I would probably contain your main views within a layout (call it "A"), place that in a RelativeLayout, then place your menu ("B") behind it (so they are overlayed). When your bottom bar is dragged up, you'll have to calculate finger delta-Y positions (from GestureDetector or similar), and move "A" upward by that amount, leaving "B" where it is.
Be very, very careful with this though, as swiping up from the bottom of the screen on Android 4.1+ devices brings up Google Now. I would suggest instead that you use a Sliding Menu library (which slides in from the left instead).