Guest User

Untitled

a guest
Nov 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. sortRecyclerView.setHasFixedSize(true);
  2. RecyclerView.LayoutManager rvLayoutManager = new GridLayoutManager(getActivity(), 2);
  3. sortRecyclerView.setLayoutManager(rvLayoutManager);
  4.  
  5. <?xml version="1.0" encoding="utf-8"?>
  6. <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  7. xmlns:app="http://schemas.android.com/apk/res-auto"
  8. xmlns:tools="http://schemas.android.com/tools"
  9. android:layout_width="match_parent"
  10. android:layout_height="match_parent">
  11.  
  12. <android.support.v7.widget.RecyclerView
  13. android:id="@+id/sortRecyclerView"
  14. android:layout_width="0dp"
  15. android:layout_height="0dp"
  16. android:scrollbars="vertical"
  17. app:layout_constraintBottom_toBottomOf="parent"
  18. app:layout_constraintEnd_toEndOf="parent"
  19. app:layout_constraintStart_toStartOf="parent"
  20. app:layout_constraintTop_toTopOf="parent" />
  21. </android.support.constraint.ConstraintLayout>
Add Comment
Please, Sign In to add comment