alexandrius / accordion-swipe-layout

Accordion Swipe Layout for Android
135 stars 27 forks source link

Overlapping Menu Items #7

Open daMatz opened 7 years ago

daMatz commented 7 years ago

Hi!

My problem is, that I want to have a left-swipe and a right-swipe menu. In each menu there are 3 different items.

When I swipe from right to left, all elements are shown beside each other like I want it to be. When I swipe from left to right, the items are overlapping or just two items are showing at the same time (dependend how hard I swipe).

When I exchange the array values, the same behaviour is happening, so it is not dependent on the content of the items, but the direction of the swipe.

I set the properties: app:canFullSwipeFromLeft="false" app:canFullSwipeFromRight="false"

Does anyone have an idea, why that is? Thank you.

<?xml version="1.0" encoding="utf-8"?> <com.alexandrius.accordionswipelayout.library.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/xxx" android:layout_width="match_parent" android:layout_height="wrap_content" app:mainItemLayout="@layout/item_foreground" app:leftItemColors="@array/swipe_left_colors" app:leftItemIcons="@array/swipe_left_drawables" app:leftStrings="@array/swipe_left_strings" app:rightItemColors="@array/swipe_right_colors" app:rightItemIcons="@array/swipe_right_drawables" app:rightStrings="@array/swipe_right_strings" app:swipeItemWidth="80dp" app:iconSize="40dp" app:canFullSwipeFromLeft="false" app:canFullSwipeFromRight="false" />

alexandrius commented 7 years ago

Can you post a screenshot

daMatz commented 7 years ago

Thank you for the fast reply! Full right swipe (as I want it to be): right_ok

Full left swipe (yellow missing): left_full

Left swipe in Progress: left_while_swiping

Full left swipe (sometimes when softly swiped): left_soft_swipe

alexandrius commented 7 years ago

Interesting I will into the code today.

alexandrius commented 7 years ago

I couldn't reproduce the bug. I tried same attrs but works as in GIF in README.MD

daMatz commented 7 years ago

Okay. I can't explain why this is the case, because it really just seems like this is a problem from which side I try to swipe. Inspecting the code there doesn't seem to be a difference between left and right until the point, where I distinguish the sides in the XML (so it should be the same mechanism). Therefore I don't get it, why it behaves in a different way, when providing the exact same content.

Do you have any input where I could look further to fix this issue? I am running out of ideas now :(

Thank you! (And also a big Thanks for the great library and the fast support!)