daimajia / AndroidSwipeLayout

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

Layout closes on keyboard popup #189

Open maka1986 opened 9 years ago

maka1986 commented 9 years ago

Hi. I have a slider from the MaterialLibrary and a EditText implemented in the background layout of the swipelayout. I have a swipedenier set when the slider is in touchmode and it works fine. The problem lies with the EditText widget. When I click on it it pops up the keyboard to input a value but it also causes the swipelayout to close (without the closing animation). I also have the swipe gesture disabled through setSwipeEnabled(false) and control the opening and closing of the layout through a onClick listener. What do you think is the cause of this?

vavrecan commented 9 years ago

can you try adding android:configChanges="keyboardHidden|orientation" to your activity in manifest file? I think it is caused because of configuration changes

vavrecan commented 9 years ago

I think the bug is present even if you just change orientation, so maybe the solution would be to handle onConfigurationChanged event

vavrecan commented 9 years ago

this can be reproduced also by calling requestLayout() so I guess this is duplicate of https://github.com/daimajia/AndroidSwipeLayout/issues/36