AndroidSwipeLayout icon indicating copy to clipboard operation
AndroidSwipeLayout copied to clipboard

Swipelayout close automatically in some device

Open mistrydarshan99 opened this issue 9 years ago • 21 comments

Hello,

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

mistrydarshan99 avatar Aug 04 '16 10:08 mistrydarshan99

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

Uriel1994 avatar Aug 08 '16 08:08 Uriel1994

Any luck?

guidedways avatar Sep 14 '16 22:09 guidedways

+1

I have same issue on OPPO Device.

ColorOS v2.1.0i, Android version 5.1

nawaminp avatar Sep 19 '16 07:09 nawaminp

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'
}

antonc27 avatar Sep 26 '16 09:09 antonc27

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

vu-son-mulodo avatar Sep 27 '16 10:09 vu-son-mulodo

+1 Jiayu S3 Android 5.0.2 LRX22G MIUI 7 6.1.14

JSONValidator avatar Sep 28 '16 18:09 JSONValidator

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

egracens avatar Oct 04 '16 09:10 egracens

Solution from @antonc27 works for me. Thanks @antonc27

erdemtopak avatar Oct 05 '16 09:10 erdemtopak

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 .

lengxf avatar Oct 07 '16 15:10 lengxf

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

NaNLagger avatar Dec 07 '16 10:12 NaNLagger

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

xd720p avatar Jan 11 '17 09:01 xd720p

+1 MIUI Global 8.1

vietmobilefolk avatar Jan 11 '17 09:01 vietmobilefolk

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.

jsbriantes avatar Feb 10 '17 07:02 jsbriantes

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);
        }

AnoDest avatar Mar 29 '17 15:03 AnoDest

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

dtonybarajas avatar Dec 06 '17 16:12 dtonybarajas

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.

aik117 avatar Jan 20 '18 15:01 aik117

Solution from @antonc27 works for me. Thanks @antonc27

marcobarbosa16 avatar Feb 23 '18 12:02 marcobarbosa16

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

btow avatar Apr 16 '18 10:04 btow

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

oscarshaitan avatar Oct 03 '18 15:10 oscarshaitan

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.

librayoung0927 avatar Jan 11 '19 05:01 librayoung0927

you should be to keep this line

mItemManger.bindView(viewHolder.itemView, position);

in onBindViewHolder

JavierGonzal avatar Sep 30 '19 11:09 JavierGonzal