Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. CoordinatorLayout
  2.  
  3. --Toolbar con imagen flexible de fondo
  4. --Recyclerview (ajustado entre toolbar y barra inferior)
  5. --Barra inferior
  6.  
  7. <android.support.design.widget.AppBarLayout
  8. android:id="@+id/app_bar"
  9. android:layout_width="match_parent"
  10. android:layout_height="wrap_content"
  11. android:fitsSystemWindows="true"
  12. android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
  13.  
  14. <android.support.design.widget.CollapsingToolbarLayout
  15. android:id="@+id/collapsing_toolbar"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:fitsSystemWindows="true"
  19. app:contentScrim="?attr/colorPrimary"
  20. app:layout_scrollFlags="scroll|exitUntilCollapsed"
  21. app:titleEnabled="false">
  22.  
  23. <RelativeLayout
  24. android:layout_width="match_parent"
  25. android:layout_height="match_parent"
  26. android:fitsSystemWindows="true"
  27. app:layout_collapseMode="parallax">
  28.  
  29. <ImageView
  30. android:id="@+id/image_header"
  31. android:layout_width="match_parent"
  32. android:layout_height="wrap_content"
  33. android:adjustViewBounds="true"
  34. android:background="@drawable/about_background_header"
  35. android:contentDescription="default desc"
  36. android:fitsSystemWindows="true"
  37. android:scaleType="centerCrop" />
  38.  
  39. <ImageView
  40. android:id="@+id/app_icon"
  41. android:layout_width="wrap_content"
  42. android:layout_height="wrap_content"
  43. android:layout_centerInParent="true"
  44. android:contentDescription="default desc"
  45. android:src="@mipmap/ic_launcher" />
  46.  
  47. <TextView
  48. android:id="@+id/tv_app_name"
  49. android:layout_width="wrap_content"
  50. android:layout_height="wrap_content"
  51. android:layout_below="@+id/app_icon"
  52. android:layout_centerHorizontal="true"
  53. android:layout_marginTop="8dp"
  54. android:text="app name"
  55. android:textAppearance="@android:style/TextAppearance.Medium.Inverse" />
  56.  
  57. <TextView
  58. android:id="@+id/tv_app_version"
  59. android:layout_width="wrap_content"
  60. android:layout_height="wrap_content"
  61. android:layout_below="@+id/tv_app_name"
  62. android:layout_centerHorizontal="true"
  63. android:layout_marginTop="8dp"
  64. android:text="1.0.0.0001"
  65. android:textAppearance="@android:style/TextAppearance.Small.Inverse" />
  66.  
  67.  
  68. </RelativeLayout>
  69.  
  70. <android.support.v7.widget.Toolbar
  71. android:id="@+id/toolbar"
  72. android:layout_width="match_parent"
  73. android:layout_height="?attr/actionBarSize"
  74. app:layout_collapseMode="pin"
  75. app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
  76. </android.support.design.widget.CollapsingToolbarLayout>
  77. </android.support.design.widget.AppBarLayout>
  78.  
  79. <!--<include layout="@layout/content_sample2" />-->
  80.  
  81. <android.support.v7.widget.RecyclerView
  82. android:id="@+id/recycler_view"
  83. android:layout_width="match_parent"
  84. android:layout_height="wrap_content"
  85. app:layout_behavior="@string/appbar_scrolling_view_behavior" />
  86.  
  87. <LinearLayout
  88. android:id="@+id/layout_bottom"
  89. android:layout_width="match_parent"
  90. android:layout_height="?attr/actionBarSize"
  91. android:layout_gravity="bottom"
  92. android:background="@android:color/darker_gray"
  93. android:gravity="center">
  94.  
  95. <TextView
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:text="copyright" />
  99. </LinearLayout>
  100.  
  101. <android.support.design.widget.FloatingActionButton
  102. android:id="@+id/fab"
  103. android:layout_width="wrap_content"
  104. android:layout_height="wrap_content"
  105. android:layout_margin="@dimen/fab_margin"
  106. android:clickable="true"
  107. android:src="@drawable/ic_share_black_24dp"
  108. android:tint="#FFFFFF"
  109. app:layout_anchor="@+id/app_bar"
  110. app:layout_anchorGravity="bottom|right|end" />
  111. </android.support.design.widget.CoordinatorLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement