yarolegovich / slidingrootnav Goto Github PK
View Code? Open in Web Editor NEWDrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.
License: Apache License 2.0
DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.
License: Apache License 2.0
It doesn't support RTL
How to perform side menu toggle throgh the icon present in custom toolbar
If i want to disable instant open drawer, I cant do this. Drawer always starts opened, just toggle changes from arrow to hamburger, but drawer stay still opened. Is there any solution about this, or it will be fixed in next version of library? Thanks
Hello,
I'm using this amazing library, but i'v noticed that my home activity is too slow and there is lag in this activity while this activity has a view pager with tow fragments only.
Is there any thing you can help me to find the issue?
Thanks in advance.
Hello.
I am using your library. I added both right and left menu at the same time and identificated 2 different "SlidingRootNav" for them so I can reach the same menu by sliding the screen to both right and left but there is a problem.
When I open the left menu and click to a button, it opens right menu as it should be, but an graphical error occurs and the menu comes forward as half screen. I included an video so you can watch it. How can I solve that? By the way, I think you may develop this library as both right and left menu like I made. Thank you.
Hi, thanks for this great library.
How can i access views of into menu_left_drawer.xml from main activity?
For example : i want change text in menu.
i use this code in main activity but show me nullPointer error :
txt = (TextView) findViewById(R.id.menuHeaderText);
txt.setText("tr");
While menu is visible then also user can interaction with the inner frame of the app . How to disable the inner click functionality. And Fragment should get maximized when clicking on fragment of the app .
Hi, I try to open menu by pressing button, by calling slidingRootNav.openMenu(); , however, there is exception:
java.lang.NullPointerException: Attempt to invoke interface method 'void com.yarolegovich.slidingrootnav.SlidingRootNav.openMenu()' on a null object reference
is it possible to open the menu in this way?
I want when click on menu Items (such as recyclerview) first close Nav and then start activity!
how can i it?
I have copied code from your sample project but the list items are visible after toogling toolbar .This happens only when using cordinatorLayout not in Linear layout but i have coolapsing toolbar therefore it needs coordinator layout.
here is xml file:-
`
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
android:id="@+id/coordinator_product_info"
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:id="@+id/app_bar_product"
app:elevation="14dp"
android:theme="@style/AppTheme.AppBarOverlay2">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
app:statusBarScrim="@android:color/transparent"
app:expandedTitleGravity="center|bottom"
app:expandedTitleMarginBottom="15dp"
app:expandedTitleTextAppearance="@style/CollapsedAppBarTopic"
android:fitsSystemWindows="true">
<ImageView
android:layout_marginTop="0dp"
android:layout_width="match_parent"
android:layout_height="150dp"
android:id="@+id/troops_image"
android:scaleType="fitXY"
android:background="@color/Amber800"
app:layout_collapseMode="parallax"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textSize="20sp"
android:textColor="@color/white"
android:text="Guide For WhatsApp"
/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:tabMode="scrollable"
app:layout_scrollFlags="scroll|enterAlways"
/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_marginTop="-30dp"
android:id="@+id/frame_main"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_height="match_parent">
</FrameLayout>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:id="@+id/troops_progress"
android:visibility="invisible"
/>
</android.support.design.widget.CoordinatorLayout>
`
How can i disable the function dragging open??
I'd like to click back button and close menu even though i set withContentClickableWhenMenuOpened(false)
I was using 1.0.2 version of this library. and today I checked repository page and current latest version is 1.1.0.
I want to know which changes applied from 1.0.2 to 1.1.0 version. There should be a changelog file to see all version changes.
When click menu set layout at the bottom?
As soon as customer opens the drawer , its elevation should get increased, but its not showing any elevation.
Can you please give me hint for how to use Expandable List View ?
Hi! I would like to ask that, is it possible to change the font size and font type? I've been looking for this issue quite a while but still couldn't find it. Any help would be much obliged.
the sample click the content layout why can't close drawer.
can I set this?
i want to use custom adapter for recyclerview , so i need to implement on createviewholder and onbindviewholder , so how to implement this ?
I tried your method. But its also changing the status bar color of main activity permanently.
DragListener dragListener = new DragListener() {
@Override
public void onDrag(float progress) {
progress= .5f;
Window window = getWindow();
window.setStatusBarColor(getResources().getColor(R.color.white));
}
};
new SlidingRootNavBuilder(this)
.withMenuLayout(R.layout.navigation_drawer)
.withToolbarMenuToggle(toolbar)
.addDragListener(dragListener)
.addDragStateListener()
.inject();
For me it gives and error :
Error:Cannot change dependencies of configuration ':app:_debugAnnotationProcessor' after it has been resolved.
I'm using jackOptions enabled and butterknife.
Hello,I use
implementation "androidx.recyclerview:recyclerview:1.0.0-beta01"
in my build.gradle,when I inflate menu,console tip me
Binary XML file line #47: Error inflating class android.support.v7.widget.RecyclerView
so I think maybe androidx cause this issue,my android studio is
Android Studio 3.3 Canary 3
Build #AI-181.5281.24.33.4884283, built on July 11, 2018
JRE: 1.8.0_152-release-1136-b04 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.6
this is my gradle version:
classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
menu布局的时候如果按照全屏布局的话,内容页会遮盖住menu
现在要太靠边才可以拖出菜单,我和viewpage一起使用,当viewpage不能滚动了就拉出菜单
"withContentClickableWhenMenuOpened" not working
i am impalement this menu but the shadow invisible
how i can appear the shadow around the fragment
Whether support the menus to open from the right side?
thanks
Hi, lovely project. I just cant seem to find the code that does the hiding/fading away of the notification bar. I ran the sample app and it didn't fade away when the drawer is open. Please advise, thank you!
Hi, could you help me on how to put burger icon on right.
as far as I know I could use this code
.withGravity(SlideGravity.RIGHT)
for animating to right side.
If i selected Arabic language from my device then drawer open/close not working...otherwise working great. Can you please fix it for that
Hi i have a question . How to change burger icons color ?
thanks you
Hi,
when menu is opened and oldRoot is minimized. Is there any way to get this fragment maximized on click?
Thanks a lot for your library!
Sir,
There is a Illegal State Exception error for the setContentView for Menu (There must be a child inside menu).
& NullPointer Exception for Recycleview Layout Manager.
withRootViewElevation not working
Please, add ability to set root view background from Drawable or Drawable resource
Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{307be76 position=1 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent}
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5297)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5479)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3534)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3310)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1795)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131)
at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1391)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:870)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at com.yarolegovich.slidingrootnav.SlidingRootNavLayout.onLayout(SlidingRootNavLayout.java:72)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:726)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:621)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
This library does not provide the user with drawer builders. What drawer builders would you suggest or are compatible with this library? Would you suggest just building your own using RecyclerView? Thank you!
I love this library so much! ❤️
A quick question on the proper way to handle SlidingRootNav's lifecycle. When an activity using SlidingRootNav is recreated (resumed from sleep), should the menu be recreated? I have noticed that if the menu is open and the app is put to sleep and then resumed, the menu stays open but the sliding mechanism no longer works.
Thank you for your suggestions!
There is a way to avoid user interaction inside miniature content when the sliding is open?
Hi,can you tell me how to add shadow while drag the menu?Thanks!
How can close the drawer whenever a item in drawer is clicked
how to change or add my custom menu Burger menu icon
Is there a cleaner way to set an offset margin to the left screen edge so that I can open the drawer menu with a drag in the middle of the open fragment/screen? Because it is really difficult to reach the left edge if the device has a 6.3 inch screen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.