Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. private RecyclerView mRecyclerView;
  2.  
  3. mRecyclerView = (RecyclerView) findViewById(R.id.list);
  4. mRecyclerView.setLayoutManager(new GridLayoutManager(this, 7));
  5.  
  6. <android.support.v7.widget.RecyclerView
  7. android:id="@+id/list"
  8. android:layout_width="match_parent"
  9. android:layout_height="match_parent"
  10. android:padding="8dp"
  11. android:clipToPadding="false">
  12.  
  13. </android.support.v7.widget.RecyclerView>
  14.  
  15. <android.support.v7.widget.CardView
  16. xmlns:android="http://schemas.android.com/apk/res/android"
  17. xmlns:card_view="http://schemas.android.com/apk/res-auto"
  18. android:id="@+id/cv"
  19. android:layout_width="match_parent"
  20. android:layout_height="wrap_content"
  21. android:layout_centerVertical="true"
  22. android:layout_centerHorizontal="true"
  23. card_view:cardCornerRadius="5dp"
  24. card_view:cardElevation="2dp"
  25. card_view:contentPadding="10dp">
  26. <RelativeLayout
  27. android:layout_width="match_parent"
  28. android:layout_height="match_parent">
  29. <TextView
  30. android:id="@+id/text"
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:layout_alignParentTop="true"
  34. android:text="@string/text"
  35. android:layout_centerVertical="true"
  36. android:textColor="@color/primary_text_default_material_light"
  37. android:textSize="16sp"/>
  38. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement