Islam
Islam

Reputation: 25

How could a make a view like that with RecyclerView?

I want the RecyclerView to look like this:

enter image description here

How can I do that?

Upvotes: 0

Views: 417

Answers (3)

Mehboob Maniyar
Mehboob Maniyar

Reputation: 236

This is not exact what you are looking for but may give you some hint. Use RecyclerView with horizontal layout manager. MODIFY YOU ADAPTER CLASS In onBindViewHolder change your textview size based on postion

      if(position == mid of list){
       //Increase the text size 
      }else{
      //set the normal size to text view 
      }

...

Upvotes: 0

Aditya Vyas-Lakhan
Aditya Vyas-Lakhan

Reputation: 13555

I suggest that you can try with this approach and change it as per your need

compile 'com.github.gastricspark:scrolldatepicker:0.0.1'

https://github.com/GastricSpark/ScrollDatePicker

https://github.com/hrules6872/HorizontalNumberPicker

<com.harrywhewell.scrolldatepicker.DayScrollDatePicker
    android:id="@+id/day_date_picker"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

enter image description here

Upvotes: 1

Sunisha Guptan
Sunisha Guptan

Reputation: 1605

Use with GridLayoutManager for eg:

private RecyclerView.LayoutManager mLayoutManager;
mLayoutManager = new GridLayoutManager(mContext, 10);
holder.recycler_viewGv.setLayoutManager(mLayoutManager);

and try this link for highlighting Highlighting center item

Upvotes: 1

Related Questions