I'm using React Navigation Wix for my App and I want to achieve something similar to the below design (Attached image).
Actually the problem with the wix is that we don't have the ability to customize too much things, we can config the text and the icon only.
Note that its hard for me to convert to the react navigation library right now.
Right now there is no way to add a custom component as Bottom Tab Bar in "react-native-navigation" by Wix.
But you can implement the approach briefly described here
disable bottom tabs showing
create your own tabs component
add it to every screen
get fun :-)
But you need to be aware that you will lose the default badge showing behavior (small red circles near the icon) provided by this lib.
Related
I have a react native app with a bottom navigation(using react navigation) the app has 4 screens and it works fine, i want to be add the functionality to navigate between screens on horizontal gestures(swiping right or left) just like instagram does(swiping left from feed will get you to chat screen), i looked all around and found nothing on how to do this !
EDIT: apparently react navigation has that option in creatematerialtoptabnavigator, it'll be a top navigation tab bar with the ability to swipe between screens, you can also change it's position from bottom or top which is what i did.
Did you check out https://github.com/satya164/react-native-tab-view ?
I find it easy to use and the documentation is very good
I am looking to implement a menu like used on the Android Uber app.
It seems to be like an action bar on top with 3 small settings stripes on left side. (probably not a real action bar)
When clicking in that area a black menu slides out from the left and occupies 70% of the screen.
The right side of the screen still showing the map is darkened to keep focus on the menu.
I like that style, it looks good and everyone immediately knows how to use it.
I would like to have the same but don't know where to start or if there is maybe something available that would do something similar.
The actionbar itself only offers the menu on top right which is better for pure settings.
I also experimented with a split action bar having the menu items on bottom but that also seems superior to the clean interface Uber provides.
You want the Android Navigation Drawer. It's an Android sanctioned navigation pattern and more details about it can be found here. For some more technical documentation and an example of how to use it, you can find a sample over here. It works great with the Action Bar so shouldn't need anything too custom outside of what the Android v4 compat library gives you.
I have a project where the designs require a sliding drawer that comes from the bottom and has essentially three states.
fully collapsed (just the handle at the bottom
half mast (drawer opens from bottom but only halfway up the screen
full mast (drawer opens from bottom and takes up the whole screen minus a top margin of lets say 80dp
I am developing for android 4.0 and higher and obviously sliding drawer is deprecated. But the Navigation drawer only supports left and right (which i already have in use)
So i am wondering if anyone knows a tutorial or even a custom component someone has written that meets the above functionality requirements
In my experience, you probably have to create something yourself, but since you're developing for api lvl 14, check out ObjectAnimator. It allows you to move Views around and still use them (by that I mean that it's the original view that has been moved and not a copy of it)
This will probably be the easiest way.
FYI, using the Navigation Drawer, you can't open the drawer halfway, or you should programmatically invoke touch events...
I think this is what you are looking for.
I have found this library best so far for sliding up menus in Android.
https://github.com/umano/AndroidSlidingUpPanel
You can specify what screen area slide up menu or view will use.
Accept & vote up my answer if it is what you are looking for.
I would like to try and use the native Google ActionBar class for my application however, I would like to be able to change the left most image dynamically, disable the icon and center the title. I was wondering if this is possible of if I should implement my own ActionBar?
My reason for wanting to change the left most image (IE the navigation drawer indicator) is because I am using the navigation drawer but on some screens would like to display the up indicator instead.
Looking through the documentation for the ActionBarDrawerToggle, there is a method to enable/disable the navigation drawer icon (setDrawerIndicatorEnabled), when disabled it reverts to the home-as-up indicator.
Another option is to recreate the drawer in those specific screens you want the icon different and specify the new icon in the creation of the drawer, not sure if this would work though.
http://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.html
Here is the android guide which explains how to do this, but allow me to give a brief overview.
You do not have to have the app icon as the leftmost icon so in certain pages you can disable it by specifying another "android:logo" item in the XML file, or by simply diabling it entirely.
The android logo, which is what you are talking about as the "leftmost item", can have an onClickListener() set for it which is how you can change it simply to an uparrow image which you can download from google.
The SlidingMenu library is an excellent third party library and I've already used it for a long time. Now I know Android provides a new navigation pattern using Navigation Drawer. It looks like the sliding menu. So is there anyone who already uses these two both? What is the difference and what are the pros and cons? Thanks a lot.
SlidingMenu library is a third party api which uses a RelativeLayout inside. The main advantage is customization according to your requirement. Buy your layouts have to be based on a viewgroup, unfortunatly this negates the <merge> optimisations.
Navigation Drawer is available in the Support Library of android it uses DrawerLayout inside. The main advantage is improved performance.
They also have different visual effects. SlidingMenu looks like horizontal scroll view. Sliding it in will push the main content out.
Pros :
It comes with cool entrance / exit animations for the menu content.
Depending on what Activity you use it on, it can be placed below the Action Bar or next to it (pushing the Action Bar too)
You can explicitly set the touch mode via a setter: margin or full screen. In full screen mode touching anywhere on the screen will open the menu. In margin, only when you slide from the edge of screen will the menu open.
Cons :
You can only control the shadow of the side menu
Navigation Drawer / Drawer Layout looks like an additional top level view in a frame layout. Sliding it in will mask the main content.
Pros :
If you use v4 support lib then it's already there.
You can control both the side menu shadow and obscure the main
content via setScrimColor e.g when the drawer is opened, a fade-in
alpha layer will appear above the main content. This is good to visually separate the content and the menu especially when both have a same color.
Cons:
It can only be placed below ActionBar
There is no setter for touch mode and by default you can only do margin touch mode. Doing a full screen touch mode (like Youtube) involves a lot of work
I think the best advantage is that It is official Google code, I mean it just works and works excellent.
The main disadvantage is that it is very basic to use, I mean... you cannot put two navigation drawer in the same activity or fragment, you can only use one in left and that's it.
You already said it yourself. Sliding menu is third party. Navigation drawer is official. Both have the same purpose, but third party libraries might implementing it slightly differently, depending on which one you use.