I'm a new Android developer and I would like to use swipe actions on a RecyclerView Items like the video below I found on material.io (please see link below)
I found a lot of libraries but often swipe gesture is for remove items or reveal buttons.
It's not what I want. Could you please help me to create the same behaviour as shown in this below example ("elastic" effect, swipe left or right, background color animation with icon update) ?
Maybe a library already exists??
Thanks for your help
https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1gSz-L39Or4aM8GhQn0ZhnUkaV5E-cyoc%2Ftype-action-swipe.mp4
you should use this ItemTouchHelper
this gives swipe functionalty for recyclerView items
check out this Example
Related
I would like to implement the navigation between items of a recyclerview using the swipe gesture, i.e the gmail app. That way user doesn't have to go back to the list an click to the next item to get to its details view.
I can't find a tutorial on how to achieve this.
From what you are saying the best choice you have is a ViewPager instead of RecyclerView. Maybe you can achieve the effect with RecyclerView, but it will be harder and its purpose is different. The purpose of a ViewPager is what you seek if you want to swipe through like pages.
Looking at the gmail app, google have implemented their own swipe left/right effect for the recycler's views.
You can find libraries that can achieve this. It has actually already been talked about it here so just take a look: StackOverflow Swipe to Delete Gmail RecyclerView
you can implement that with viewpager not recyclerview.
I saw this horizontal RecyclerView with a custom scrollbar. The scrollbar features a dot for each item, the select indicator slides gracefully to the next dot as you slide the items right and left.
The sample can be found below:
Example gif
Please do you know how I can make something similar?
The result can be achieved by using viewPager. You can refer to Android developer documentation on how to implement viewpager. Brief explanation can be found here. For the indicator, you can create circle shape and apply the animation by yourself or there are tons of library out there you can rely with; for example InkPageIndidcator
I am working on an android application and want to implement a functionality in which I want to show a layout which will contain Like/Comment of that content at the bottom of the page.
I want this layout to be shown when I scroll up the page and hide when I scroll down the page.
I have scene many applications that have implemented this feature, but I have no idea how to implement this feature in my app.
Please check this link of the app which is giving the same functionality which I want to implenment https://play.google.com/store/apps/details?id=com.midsizemango.materialapps
Please help if anyone have idea here, Thanks a lot in advanced.
You need to do the same thing which happens with fab, first create a class extendingCoordinatorLayout.Behavior<View> and implement it like other fab examples. just remember that it won't work on simple listView and gridView.
Also here's a good detailed tutorial for you.
You Just have to set Scroll-Up & Scroll-Down listener of your Recycler view or Scroll View check Reference link.
Now base on Scroll-Up & Scroll-Down listener set VISIBLE / GONEof your footer view either it is LinearLayout or Toolbar with animation.
I would like to achieve something like the image below.
But I don't have any idea how to do it.
Notice that the Menu Burger, must implement a click that perform automatically the swipe.
Furthermore, I would like that the items (the Checkmark, the Pen and the Cross) can be clickable.
Note: I prefer if it's a solution with a RecyclerView
Any advices, suggestions or libraries are welcomed.
Currently I'm developing a small app for my parents' business. I'm trying to create a custom menu. I'd like to have something similar to this:
If you look at it, the screen is divided in two sections. The upper section is just an image and the lower section is the menu. I'd like to achieve this:
If the user places his finger over an item of the menu and swipes to the right, all the items move one position right, and the opposite if the user swipes left.
I'm quite new in this field and I'm not looking for a piece of code. I just want some tips on what to search because I don't know even where to start.
Thanks a lot!
By what I understood, ViewPager should be able to solve your problem. You hsve it nested in your layout under the main image. Have a look here: http://developer.android.com/training/animation/screen-slide.html