Closed AkankshaRana closed 2 years ago
Instead of adding 2 background views add one and give it android:layout_gravity="end"
. You can find example of such layout in the sample app.
Thanks It's working now. Earlier I was explicitly disabling the right swipe without adding the empty Left background view. So the app was crashing because of that.
swipeView.setDirectionEnabled(SwipeDirection.Right, false)
It's working with one view after I remove the code to disable right swipe.
Hi, I just want to allow the user to only swipe left and hence just want to add the right background view. Right now if I add one view in SwipeActionView it by default keeps it on the left. So for a work around I have to add an empty ImageView first and then add my actual view next. Is there a way to only add one view and add it on right side of the cardView.