Comments (9)
from drawer-behavior.
There may have this segment of code in your activity class.
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// This code will close the left drawer after drawer's item clicked
drawer.closeDrawer(GravityCompat.START);
return true;
}
try remove/comment this line of code
drawer.closeDrawer(GravityCompat.START);
from drawer-behavior.
this is weird because I removed the only places where I called the closeDrawer, and it still happens. This only happens if I move the drawer to the left. How can I debug where the closing is happening?
from drawer-behavior.
found it, it's in the DrawerLayout sources:
@Override
public boolean onTouchEvent(MotionEvent ev) {
...
switch (action & MotionEventCompat.ACTION_MASK) {
...
case MotionEvent.ACTION_UP: {
closeDrawers(peekingOnly);
}
from drawer-behavior.
not in drawer layout..but in Activity/ Fragment class should have that code
from drawer-behavior.
by default code generator for navigation activity, the generator with create this segment of call,
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// This code will close the left drawer after drawer's item clicked
drawer.closeDrawer(GravityCompat.START);
return true;
}
which will close the left drawer after the item clicked
from drawer-behavior.
I'm not sure where I'm failing to explain myself, but the code you pasted twice IS NOT PRESENT ANYWHERE. I showed you where the problem is happening, but it's past beyond your library. I'm dropping it from my app and I will be googling the solution. Thank you anyways
from drawer-behavior.
okayy
from drawer-behavior.
i already push example code which left drawer will not close after item clicked on branch "revision1"
from drawer-behavior.
Related Issues (20)
- How to change ImageView size and TextViewSize of menuItem HOT 3
- Issue in Android veriosn 4.4.2 HOT 16
- How to Close Drawer or check for it's current state ??
- androidX compatibility issue HOT 4
- xml dont show preview HOT 3
- Humbergs not Working HOT 3
- home view dosent show HOT 2
- java.lang.ClassCastException: androidx.drawerlayout.widget.DrawerLayout cannot be cast to com.infideap.drawerbehavior.AdvanceDrawerLayout HOT 1
- Databinding not supported HOT 1
- Humberg icon not Working
- Problem with opening and scaling when support rtl is false but input language change to rtl language like persian HOT 3
- DataBinding not supporting HOT 1
- Humburg icon not Working properly HOT 1
- softInputMode Adjust resize create blank space under drawer header when keyboard appear HOT 1
- animation speed HOT 1
- Drawe behavior HOT 1
- Not Working After Jcenter() deprecation HOT 13
- infideap layout not working HOT 2
- Fatal Exception: java.lang.IllegalArgumentException: Cannot set 'scaleY' to Float.NaN HOT 4
- Class cast exception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drawer-behavior.