Русские видео

Сейчас в тренде

Иностранные видео




Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



RecyclerView + CardView - Part 5 - Delete Item using swipe - Android Studio Tutorial

Hi guys! I'm Phuc VR In this tutorial, We will learn how to delete an item in recyclerView using swipe We have recyclerView. We remove the item by swipe item to the left or the right. So look like smooth and cool. Let's get started. First, Create a new class ...... that extend ItemtouchHelper.CallBack and write the constructor The first parameter in supper adds support for dragging the recycler view item up or down. We don't care about that hence. So giving here is zero. The second parameter is to pass Simplecallback information about left and right swipes. Next, we need to override onSwiped(). This is called when an item is swiped off the screen. You can leave it as is. The deleteItem() method does not exist yet but we’ll implement it in the adapter. In the adapter, we need to implement the deleteItem() method we called in SwipeToDeleteCallback earlier In mainactivity create a new ItemTouchHelper using our SwipeToDeleteCallback and attach it to the RecyclerView. ----------------------------------------------------------------------- Donate Me: paypal.me/nguyenphucnick For the beginner:    • Android Studio Tutorial basic for beg...  

Comments