Parallax effect for a footer in android - android

Is there a way to implement footer parallax effect in Android? I know it's possible to implement header parallax with CoordinatorLayout + AppBarLayout. I wonder if it's possible to make a scroll animation of footer view like here https://codepen.io/hudsonmarinho/pen/FHGeK

I implemented that by adding a fake transparent element in the adapter of RecyclerView. The height of the fake element should be equal to the footer height. The footer view should be placed above RecyclerView in a FrameLayout

Related

How to implement 2 way scrolling- vertical as well as horizontal scrolling in kotlin?

I want to implement a tab layout with a horizontal swipe or scroll view and in each tab view, I could be able to scroll vertically. For reference just like WhatsApp where there are tab layouts that are horizontally scrollable or swipeable and in each tab layout there is a vertical scroll view in kotlin.
Problem I am facing -
I have implemented the recycler view in each tab layout but the problem is when I am setting the height of the recycler view as match parent then I am only able to scroll vertically as it is in the focus and when I am setting the height of viewpager2 as match parent then I am only able to swipe through the tabs. If you have any solutions for that please give.

ScrollView: How to detect if certain View inside ScrollView is past scrolling?

I have ScrollView and inside this ScrollView are some independent Views. What I want to achieve is if View A touches top of ScrollView, it will start animating - transforming instead of hiding out of ScrollView (visible screen).
It should have "collapse" effect but not completely collapsed. This View A is not toolbar or action bar so I cant use CollapsingToolbarLayout
I want to achieve "paralax" effect on custom View instead of ToolBar. With certain child views inside this View should animate/shuffle/hide as I scroll. I cant find any native solution to this only default Toolbar.

How to create a custom layout with cards scrolling horizontal and posts scrolling vertically( recycler view ) which should work with pagination

enter image description here
Here what I tried:
I can able to achieve this layout using Wrapping Horizontal scroll view and recyclerview inside Nestedscroll view.
The problem is :
When I put recycler view inside any of the scrolling containers such as scroll view or Nested scroll view
Its loading all the items in recylerview at once which is not a implementation of recylerview,hence pagination is not achieved.
Requirement:
1.Top header cards should scroll horizontally which is of a (fixed) Limited size.
2.Label for the vertical scroll view
3.Recycler view for vertical scroll of items
All the above should scroll vertically.Please help, or suggest any better way doing this layouot.enter image description here
Yes you can achieve this by having parent layout as <nestedScrollView> and in child you can take 2 recycler view of which one of them should be horizontal and another should be vertical.
set property android:nestedScrollingEnabled:true and your are good to go.

Image Zoom In and Out with Recycler View Android

I am trying to implement a Recycler View in which the first item covers at-least half of the screen. This item has an image set as a background.
The behavior that i want to achieve is: when user scrolls upward the recycler view, the image should zoom in, and when user scrolls it downward, the image should zoom out and should be in original dimension as soon as the first item is completely visible.
I have tried using setScale() property on imageView but it's not working as expected. Please help!
Keep the first item in CollapsingToolbarLayout instead of placing it in RecyclerView and wrap both the views in CoordinatorLayout.
Then in CollapsingToolbarLayout add parallax effect using attribute collapseMode="parallax"
Finally, bound the RecyclerView scroll behavior to CollapsingToolbarLayout using property layout_behavior="#string/appbar_scrolling_view_behavior".

How to make an Activity which is vertical scrollable but has specific elements that are horizontal scrollable

I'm trying to make an activity which works similar to this one from the Google Play Store.(https://vid.me/zfnV)
I tried it with a NestedScrollView in which I had a Textview and other things like a button. The vertical scrolling for this works fine. Now I would like to have some Cardviews which are horizontal scrollable in the same activity.
Any suggestions or tips about how to implement something like this?
you could do something like this
put a RecyclerView with LinearLayoutManager.HORIZONTAL as parameter for the element you want to scroll horizontally
as parent of RecyclerView put NestedScrollView
not that we should never put a scrollable view inside a scrollable view unless we set the height of the second scrollable view which is your RecyclerView
see this post it will help you implementing this solution :
note that
How to use RecyclerView inside NestedScrollView?
Good luck

Categories

Resources