daimajia / AndroidSwipeLayout

The Most Powerful Swipe Layout!
MIT License
12.38k stars 2.67k forks source link

Swipelayout close automatically in some device #357

Open mistrydarshan99 opened 8 years ago

mistrydarshan99 commented 8 years ago

Hello,

I have to implement swipe layout in recyclerviewbut in some device its automatically close.So how to fix it.

Uriel1994 commented 8 years ago

Same here. I tried everything but it didnt work. It happens a lot on Wiko RAINBOW devices.

guidedways commented 8 years ago

Any luck?

nawaminp commented 8 years ago

+1

I have same issue on OPPO Device.

ColorOS v2.1.0i, Android version 5.1

antonc27 commented 8 years ago

For me problem was fixed by using one of the last commits instead of v1.2.0 in build.gradle:

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.daimajia:AndroidSwipeLayout:f66ac6942b'
}
vu-son-mulodo commented 8 years ago

@antonc27 I added it but when I scroll, item changed from open to close & automatically close.

JSONValidator commented 8 years ago

+1 Jiayu S3 Android 5.0.2 LRX22G MIUI 7 6.1.14

egracens commented 8 years ago

Same issue - android 4.2.0. Background view closes automatically after swipelayout complete animating swipe gesture.

erdemtopak commented 8 years ago

Solution from @antonc27 works for me. Thanks @antonc27

lengxf commented 8 years ago

I met the problem, and read all the issues. did daimajia not maintain this brand project?so many people want to use this good library .

NaNLagger commented 7 years ago

+1 ASUS Zenphone 3 Android 6.0 Solution from @antonc27 works.

xd720p commented 7 years ago

+1 The same habit on any FlymeOS device and on MIUI 8 devices

vietmobilefolk commented 7 years ago

+1 MIUI Global 8.1

jsbriantes commented 7 years ago

I have the same problem on a Huawei Y5II. I've tried the solution from @antonc27 but I get the next error with gradle.build: failed to resolve: com.github.daimajia:AndroidSwipeLayout:f66ac6942b

I don't know how to fix it. Some help? Thanks.

AnoDest commented 7 years ago

For me it happens all the time I update textView inside swipeLayout. It is caused by requestLayout call. SwipeLayout doens't keep its open state after layout process. Currently I worked around this with adding onLayoutListener with code

        if (isOpened) {
            swipeLayout.open(false, false);
        } else {
            swipeLayout.close(false, false);
        }
dtonybarajas commented 6 years ago

@antonc27 man you're the best! thank's your solution works for me!

aik117 commented 6 years ago

i have tried this solution and many others but whenever i call textview.settext in onUpdate method the swipe closes itself automatically. I have even added the library as a module in my project and commented the method safeBottomViews() in updateBottomViews() in SwipeLayout.java but nothing seems to work. This library is very good no doubt but this issue is getting on my nerves now. Please if anyone got a solution then let me know. Thanks.

marcobarbosa16 commented 6 years ago

Solution from @antonc27 works for me. Thanks @antonc27

btow commented 6 years ago

+1 Lenovo A319 Android 4.4.2 Solution from @antonc27 works.

oscarshaitan commented 6 years ago

this work for me https://github.com/daimajia/AndroidSwipeLayout/issues/412#issuecomment-398475255

librayoung0927 commented 5 years ago

I found some solution. I use swipeLayout in adapter, I use textView.setText("text"), and the item ,textView's width is WRAP_CONTENT, this situation will appear. so I set this TextView with a Fixed Width, and It works.

JavierGonzal commented 5 years ago

you should be to keep this line

mItemManger.bindView(viewHolder.itemView, position);

in onBindViewHolder