Category : swipe-gesture

I was wondering if someone could help me with this issue that I am currently facing with Xamarin Android where the swipe gesture recognizer does not work. It works fine in Xamarin iOS. <ads:AdControlView Grid.Row="1" x:Name="adView" Size="MediumRectangle" WidthRequest="300" HeightRequest="250" HorizontalOptions="FillAndExpand" IsVisible="False"> <ads:AdControlView.GestureRecognizers> <SwipeGestureRecognizer Swiped="SwipeGestureRecognizer_Swiped" Direction="Right"/> </ads:AdControlView.GestureRecognizers> </ads:AdControlView> Any help would be highly appreciated. Thanks! Source: ..

Read more

I am developing video player app using Exoplayer and applying swipe gestures for volume and brightess. Swipe gesture for top,bottom,right,left are working well. But i want to split width into two parts for volume and brightness features separately, suggest me extra code for doing this. This is my code for OnSwipeTouchListner.java public class OnSwipeTouchListener implements ..

Read more

I have override in my SimpleItemTouchHelper class the method onChildDraw the following way : @Override public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) { float width = (float) viewHolder.itemView.getWidth(); float alpha = 1.0f – Math.abs(dX) / width; viewHolder.itemView.setAlpha(alpha); viewHolder.itemView.setTranslationX(dX); } else { ..

Read more

I am trying to add custom swipe view for recyclerview. The following code is working perfectly. Got from this link. In this code Buttons are created in onDraw method. enum ButtonsState { GONE, LEFT_VISIBLE, RIGHT_VISIBLE } class SwipeController extends Callback { private boolean swipeBack = false; private ButtonsState buttonShowedState = ButtonsState.GONE; private RectF buttonInstance = ..

Read more

I got a swipe code from this link. https://codeburst.io/android-swipe-menu-with-recyclerview-8f28a235ff28 I am trying to add custom view instead of create buttons. Every thing is ok. But I am facing a problem. I can swipe left and right. After swipe the swiped view is not stop. meaning bacground view is showing while I swipe. If I leave ..

Read more

I’m trying to implement a simple swipe actions menu in a RecyclerView, and i tried to use a simple approach using an ItemTouchHelper and a layout (for each row) containing the row itself and the buttons attached outside the row. I draw them using android:clipChildren="false" on the recycler, and i show them on swipe. While ..

Read more