You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm dealing with the following problem:
I start an Activity from which I instantiate a fragment that contains DuoDrawerLayout. From within that fragment I try to call another fragment, but I get
UncaughtException: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getLeft()' on a null object reference
at nl.psdcompany.duonavigationdrawer.views.DuoDrawerLayout.computeScroll(DuoDrawerLayout.java:284)
....
I am pretty sure that I do this after everything has been initialized. Any ideas?
The text was updated successfully, but these errors were encountered:
It sounds like your content view is empty. Maybe this happens when you switch fragments? Make sure you add a view within the drawer layout with the tag: 'content' or set it directly with the attribute: 'app:content'.
Yes, I'm immediately switing to a other fragment, but I believe only after everything has been initialized. Is there a way to programatically check that? Or maybe a callback for when the DuoDrawerLayout is successfully initialized? ... Or maybe adding a null check somewhere would fix this?
I am still not sure what is the cause... But I was able to get a workaround by calling menuDrawer.getContentView(); in the fragment from which I want to immediately switch to another one. menuDrawer is DuoDrawerLayout. And by the way, I'm using AndroidAnnotations 4.4.0 with this.
Hi,
I'm dealing with the following problem:
I start an Activity from which I instantiate a fragment that contains DuoDrawerLayout. From within that fragment I try to call another fragment, but I get
I am pretty sure that I do this after everything has been initialized. Any ideas?
The text was updated successfully, but these errors were encountered: