I want to implement the google photos application timeline feature in the recycler view in which we can scroll through the years of images when they are created as shown in below image.
Can anyone help in this or implemented something like this.
Google Photos has added a new Maps timeline feature that shows the pictures of your trips on the routes that you've taken. The feature is live in Photos version 5.23.
Search Google Photos by Date When you search by date, you can type a specific time, such as "March 3, 2021." You can also enter an approximate time like "March 2021," or even just a general year to see all the photos taken during that time frame. You can also search for words like evening, morning, summer, and winter.
To see the date & time, tap the photo & slide up. Below the picture you will find all the information including the date & time.
I have solved this problem by simply adding a new Linear-layout on top of the recyclerview with a child textview in the layout and then by calculating the height ratio(as per the count of images per year) with respect to the total height available.Also considering the minimum height of textview to 100 if the ratio is too small.
private float getEffectiveHeight(float totalHeight, float count, float totalCount) {
if (count * (totalHeight / totalCount) < 100)
return 100;
else
return count * (totalHeight / totalCount);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With