Itoun
Itoun

Reputation: 3216

Android ListView animation when scrolling (iOS Style)

I would to copy the iOS Pickeron Android with the animation while scrolling.

There is an example:
example.
I found some answershere and here that's not what I want.
Any help would be appreciated.

Upvotes: 1

Views: 446

Answers (1)

Tamir Abutbul
Tamir Abutbul

Reputation: 7651

You can use CarouselLayoutManager to achieve this look, with this library you will have one elevated item that will be above all others and this will give your list the desired look.

How to use:

  • In your gradle:

    implementation 'com.azoft.carousellayoutmanager:carousel:version'
    
  • When declaring an adapter:

    final CarouselLayoutManager layoutManager = new CarouselLayoutManager(CarouselLayoutManager.VERTICAL);
    
    final RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setHasFixedSize(true);
    

You can also use Android-PickerView library or WheelPicker, I have only worked with the first suggested library above so I don't know how those 2 will work for you.

Upvotes: 1

Related Questions