Advertisement
rama_astadipati

scrollview

Feb 13th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.05 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:app="http://schemas.android.com/apk/res-auto"
  5. xmlns:tools="http://schemas.android.com/tools"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. tools:context="app.tokoonline.Detail">
  9.  
  10. <ScrollView
  11. android:layout_width="match_parent"
  12. android:layout_height="match_parent"
  13. android:layout_marginBottom="50dp">
  14. <LinearLayout
  15. android:orientation="vertical"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content">
  18.  
  19. <android.support.v7.widget.CardView
  20. android:visibility="visible"
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content"
  23. android:layout_margin="10dp">
  24.  
  25. <com.daimajia.slider.library.SliderLayout
  26. android:id="@+id/slider"
  27. android:layout_width="match_parent"
  28. android:layout_height="250dp"/>
  29. <com.daimajia.slider.library.Indicators.PagerIndicator
  30. android:id="@+id/custom_indicator"
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:gravity="center"/>
  34.  
  35. </android.support.v7.widget.CardView>
  36.  
  37. <android.support.v7.widget.CardView
  38. android:visibility="visible"
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content"
  41. android:layout_marginLeft="10dp"
  42. android:layout_marginRight="10dp"
  43. android:layout_marginBottom="10dp">
  44. <LinearLayout
  45. android:layout_width="match_parent"
  46. android:layout_height="wrap_content"
  47. android:orientation="vertical"
  48. android:padding="10dp">
  49.  
  50. <TextView
  51. android:layout_width="wrap_content"
  52. android:layout_height="wrap_content"
  53. android:text="Nama Barang"
  54. android:textStyle="bold"
  55. android:textSize="16sp"/>
  56. <TextView
  57. android:layout_width="wrap_content"
  58. android:layout_height="wrap_content"
  59. android:text="Kategori"/>
  60. <View
  61. android:layout_width="match_parent"
  62. android:layout_height="1px"
  63. android:layout_marginTop="10dp"
  64. android:layout_marginBottom="10dp"
  65. android:background="@color/colorGrey"/>
  66. <TextView
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:layout_alignParentRight="true"
  70. android:text="Rp 20.000"/>
  71.  
  72. <View
  73. android:layout_width="match_parent"
  74. android:layout_height="1px"
  75. android:layout_marginTop="10dp"
  76. android:layout_marginBottom="10dp"
  77. android:background="@color/colorGrey"/>
  78.  
  79. <LinearLayout
  80. android:layout_width="match_parent"
  81. android:layout_height="wrap_content"
  82. android:layout_marginTop="5dp"
  83. android:orientation="horizontal">
  84. <TextView
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"
  87. android:layout_weight="1"
  88. android:text="10/09/2017"
  89. android:textSize="10sp"/>
  90. <TextView
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:layout_weight="1"
  94. android:text="129 Dilihat"
  95. android:textSize="10sp"/>
  96. <TextView
  97. android:layout_width="wrap_content"
  98. android:layout_height="wrap_content"
  99. android:layout_weight="1"
  100. android:text="3 Komentar"
  101. android:textSize="10sp"/>
  102. </LinearLayout>
  103.  
  104. </LinearLayout>
  105. </android.support.v7.widget.CardView>
  106.  
  107. <android.support.v7.widget.CardView
  108. android:visibility="visible"
  109. android:layout_width="match_parent"
  110. android:layout_height="wrap_content"
  111. android:layout_marginLeft="10dp"
  112. android:layout_marginRight="10dp"
  113. android:layout_marginBottom="10dp">
  114. <LinearLayout
  115. android:layout_width="match_parent"
  116. android:layout_height="wrap_content"
  117. android:orientation="vertical"
  118. android:padding="10dp">
  119.  
  120. <TextView
  121. android:layout_width="wrap_content"
  122. android:layout_height="wrap_content"
  123. android:text="Deskripsi"
  124. android:textStyle="bold"
  125. android:textSize="16sp"/>
  126.  
  127. <View
  128. android:layout_width="match_parent"
  129. android:layout_height="1px"
  130. android:layout_marginTop="10dp"
  131. android:layout_marginBottom="10dp"
  132. android:background="@color/colorGrey"/>
  133.  
  134. <TextView
  135. android:layout_width="wrap_content"
  136. android:layout_height="wrap_content"
  137. android:text="Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source."/>
  138.  
  139. </LinearLayout>
  140. </android.support.v7.widget.CardView>
  141.  
  142. <android.support.v7.widget.CardView
  143. android:visibility="visible"
  144. android:layout_width="match_parent"
  145. android:layout_height="wrap_content"
  146. android:layout_marginLeft="10dp"
  147. android:layout_marginRight="10dp"
  148. android:layout_marginBottom="10dp">
  149.  
  150. <LinearLayout
  151. android:orientation="vertical"
  152. android:layout_width="match_parent"
  153. android:layout_height="wrap_content"
  154. android:padding="10dp">
  155.  
  156. <TextView
  157. android:layout_width="wrap_content"
  158. android:layout_height="wrap_content"
  159. android:text="Produk lain dari Penjual"
  160. android:textStyle="bold"
  161. android:textSize="16sp"/>
  162.  
  163. <View
  164. android:layout_width="match_parent"
  165. android:layout_height="1px"
  166. android:layout_marginTop="10dp"
  167. android:layout_marginBottom="10dp"
  168. android:background="@color/colorGrey"/>
  169.  
  170. <LinearLayout
  171. android:layout_width="match_parent"
  172. android:layout_height="wrap_content"
  173. android:orientation="horizontal"
  174. android:padding="10dp">
  175.  
  176. <ImageView
  177. android:layout_width="match_parent"
  178. android:layout_height="wrap_content"
  179. android:layout_weight="1"
  180. android:adjustViewBounds="true"
  181. android:src="@drawable/product1"
  182. android:layout_margin="5dp"/>
  183. <ImageView
  184. android:layout_width="match_parent"
  185. android:layout_height="wrap_content"
  186. android:layout_weight="1"
  187. android:adjustViewBounds="true"
  188. android:src="@drawable/product2"
  189. android:layout_margin="5dp"/>
  190.  
  191. </LinearLayout>
  192.  
  193. <TextView
  194. android:layout_width="match_parent"
  195. android:layout_height="wrap_content"
  196. android:text="lihat semuanya"
  197. android:textColor="@color/colorPrimary"
  198. android:gravity="end"/>
  199.  
  200. </LinearLayout>
  201. </android.support.v7.widget.CardView>
  202.  
  203. </LinearLayout>
  204. </ScrollView>
  205.  
  206. <RelativeLayout
  207. android:layout_width="match_parent"
  208. android:layout_height="50dp"
  209. android:layout_alignParentBottom="true"
  210. android:background="@color/colorWhite"
  211. android:gravity="center">
  212.  
  213. <TextView
  214. android:id="@+id/txtBuy"
  215. android:layout_width="match_parent"
  216. android:layout_height="wrap_content"
  217. android:text="BELI SEKARANG"
  218. android:textStyle="bold"
  219. android:textSize="16sp"
  220. android:gravity="center"/>
  221.  
  222. </RelativeLayout>
  223.  
  224. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement