Curiosity Down / Up Swipe Animation & Fragments Population Based On posts date

** in a nutshell: I need a scroll animation, as shown in gif, when the user iterates over it up / up, it jumps directly to the element, and it looks like a fling animation.

For Date fragments, I think its a horizontal Recyclerview.

What the answer looks like, an example of scroll animation code and a way to make a date when I can automatically fill in fragments based on dates.

I asked a question about this, and the question was not so clear. This app includes a scroll down / up style.

When u scrolls up or down, the application does not allow scrolling, like a normal Scrollview, instead, from the first touch (for example, up), it moves to the next message.

An important note is the full size message / element (position layout match_parent?).

In addition, each message has a date, and the application includes a calendar, when you scroll left or right, you go to dates and based on the dates you receive.

What I want, tips or ways to do something like this. I would like to provide code, but I tried to do it in my mind, but could not think in a logical way.

For fragments, I assume that they take the date nowand oldest date in the message, and based on what they do (circular) fragments, each fragment should load messages based on the date (API request that gives the date as param?).

, GIF , , . , , .

https://gfycat.com/JadedMenacingAmericanalligator

+6
1

, , , https://github.com/lsjwzh/RecyclerViewPager https://github.com/castorflex/VerticalViewPager

pagersnaphelper v7,

RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
SnapHelper snapHelper = new PagerSnapHelper();
snapHelper.attachToRecyclerView(recyclerView);

, , .

https://medium.com/@ali.muzaffar/looping-infinite-viewpager-with-page-indicator-in-android-ce741f25702a

https://github.com/antonyt/InfiniteViewPager

ViewPager

, .

+2

Source: https://habr.com/ru/post/1017111/


All Articles