Newer
Older
MonCalc / app / src / main / res / layout / fragment_history.xml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto">
  4.  
  5. <data>
  6.  
  7. <variable
  8. name="historyViewModel"
  9. type="jackall.moncalc.viewmodel.HistoryViewModel" />
  10. </data>
  11.  
  12. <ScrollView
  13. android:layout_width="match_parent"
  14. android:layout_height="match_parent"
  15. android:background="#ffffff">
  16.  
  17. <android.support.constraint.ConstraintLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="wrap_content">
  20.  
  21. <android.support.v7.widget.CardView
  22. android:id="@+id/today_card_view"
  23. android:layout_width="match_parent"
  24. android:layout_height="wrap_content"
  25. android:layout_marginEnd="8dp"
  26. android:layout_marginStart="8dp"
  27. android:layout_marginTop="8dp"
  28. app:layout_constraintEnd_toEndOf="parent"
  29. app:layout_constraintStart_toStartOf="parent"
  30. app:layout_constraintTop_toTopOf="parent">
  31.  
  32. <android.support.constraint.ConstraintLayout
  33. android:layout_width="match_parent"
  34. android:layout_height="match_parent">
  35.  
  36. <TextView
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:layout_marginStart="8dp"
  40. android:layout_marginTop="8dp"
  41. android:text="過去24時間"
  42. android:textColor="@color/main_background"
  43. app:layout_constraintStart_toStartOf="parent"
  44. app:layout_constraintTop_toTopOf="parent" />
  45.  
  46. <TextView
  47. android:id="@+id/today_count_temple_title"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"
  50. android:layout_marginEnd="8dp"
  51. android:layout_marginStart="8dp"
  52. android:text="神殿の周回数"
  53. android:textSize="@dimen/history_card_title_size"
  54. app:layout_constraintEnd_toEndOf="parent"
  55. app:layout_constraintStart_toStartOf="parent"
  56. app:layout_constraintTop_toBottomOf="@id/today_count_temple_value" />
  57.  
  58. <TextView
  59. android:id="@+id/today_count_temple_value"
  60. android:layout_width="wrap_content"
  61. android:layout_height="wrap_content"
  62. android:layout_marginTop="24dp"
  63. android:text="@{historyViewModel.todayTempleCount}"
  64. android:textColor="@color/main_background"
  65. android:textSize="@dimen/hisotry_card_value_size"
  66. app:layout_constraintEnd_toEndOf="parent"
  67. app:layout_constraintStart_toStartOf="parent"
  68. app:layout_constraintTop_toTopOf="parent" />
  69.  
  70. <LinearLayout
  71. android:layout_width="match_parent"
  72. android:layout_height="wrap_content"
  73. android:layout_marginBottom="8dp"
  74. android:layout_marginTop="8dp"
  75. android:orientation="horizontal"
  76. app:layout_constraintBottom_toBottomOf="parent"
  77. app:layout_constraintEnd_toEndOf="parent"
  78. app:layout_constraintStart_toStartOf="parent"
  79. app:layout_constraintTop_toBottomOf="@+id/today_count_temple_title">
  80.  
  81. <LinearLayout
  82. android:layout_width="0dp"
  83. android:layout_height="match_parent"
  84. android:layout_weight="1"
  85. android:gravity="center_horizontal"
  86. android:orientation="vertical">
  87.  
  88. <TextView
  89. android:layout_width="wrap_content"
  90. android:layout_height="wrap_content"
  91. android:text="@{historyViewModel.todayDrop}"
  92. android:textColor="@color/main_background"
  93. android:textSize="@dimen/hisotry_card_value_size" />
  94.  
  95. <TextView
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:gravity="center"
  99. android:text="実のドロップ数"
  100. android:textSize="@dimen/history_card_title_size" />
  101.  
  102.  
  103. </LinearLayout>
  104.  
  105. <LinearLayout
  106. android:layout_width="0dp"
  107. android:layout_height="match_parent"
  108. android:layout_weight="1"
  109. android:gravity="center_horizontal"
  110. android:orientation="vertical">
  111.  
  112. <TextView
  113. android:layout_width="wrap_content"
  114. android:layout_height="wrap_content"
  115. android:text="@{historyViewModel.todaySpecialDrop}"
  116. android:textColor="@color/main_background"
  117. android:textSize="@dimen/hisotry_card_value_size" />
  118.  
  119. <TextView
  120. android:layout_width="wrap_content"
  121. android:layout_height="wrap_content"
  122. android:gravity="center"
  123. android:text="特急のドロップ数"
  124. android:textSize="@dimen/history_card_title_size" />
  125.  
  126.  
  127. </LinearLayout>
  128.  
  129. <LinearLayout
  130. android:layout_width="0dp"
  131. android:layout_height="match_parent"
  132. android:layout_weight="1"
  133. android:gravity="center_horizontal"
  134. android:orientation="vertical">
  135.  
  136. <TextView
  137. android:layout_width="wrap_content"
  138. android:layout_height="wrap_content"
  139. android:text="@{historyViewModel.todaySpecialPercent}"
  140. android:textColor="@color/main_background"
  141. android:textSize="@dimen/hisotry_card_value_size" />
  142.  
  143. <TextView
  144. android:layout_width="wrap_content"
  145. android:layout_height="wrap_content"
  146. android:text="特急のドロップ率"
  147. android:textSize="@dimen/history_card_title_size" />
  148.  
  149.  
  150. </LinearLayout>
  151. </LinearLayout>
  152.  
  153. </android.support.constraint.ConstraintLayout>
  154. </android.support.v7.widget.CardView>
  155.  
  156. <android.support.v7.widget.CardView
  157. android:id="@+id/week_card_view"
  158. android:layout_width="match_parent"
  159. android:layout_height="wrap_content"
  160. android:layout_marginBottom="8dp"
  161. android:layout_marginEnd="8dp"
  162. android:layout_marginStart="8dp"
  163. android:layout_marginTop="8dp"
  164. app:layout_constraintBottom_toBottomOf="parent"
  165. app:layout_constraintEnd_toEndOf="parent"
  166. app:layout_constraintStart_toStartOf="parent"
  167. app:layout_constraintTop_toBottomOf="@id/today_card_view">
  168.  
  169. <android.support.constraint.ConstraintLayout
  170. android:layout_width="match_parent"
  171. android:layout_height="match_parent">
  172.  
  173. <TextView
  174. android:layout_width="wrap_content"
  175. android:layout_height="wrap_content"
  176. android:layout_marginStart="8dp"
  177. android:layout_marginTop="8dp"
  178. android:text="過去1週間"
  179. android:textColor="@color/main_background"
  180. app:layout_constraintStart_toStartOf="parent"
  181. app:layout_constraintTop_toTopOf="parent" />
  182.  
  183. <TextView
  184. android:id="@+id/week_count_temple_title"
  185. android:layout_width="wrap_content"
  186. android:layout_height="wrap_content"
  187. android:layout_marginEnd="8dp"
  188. android:layout_marginStart="8dp"
  189. android:text="神殿の周回数"
  190. android:textSize="@dimen/history_card_title_size"
  191. app:layout_constraintEnd_toEndOf="parent"
  192. app:layout_constraintStart_toStartOf="parent"
  193. app:layout_constraintTop_toBottomOf="@id/week_count_temple_value" />
  194.  
  195. <TextView
  196. android:id="@+id/week_count_temple_value"
  197. android:layout_width="wrap_content"
  198. android:layout_height="wrap_content"
  199. android:layout_marginTop="24dp"
  200. android:text="@{historyViewModel.weekTempleCount}"
  201. android:textColor="@color/main_background"
  202. android:textSize="@dimen/hisotry_card_value_size"
  203. app:layout_constraintEnd_toEndOf="parent"
  204. app:layout_constraintStart_toStartOf="parent"
  205. app:layout_constraintTop_toTopOf="parent" />
  206.  
  207. <LinearLayout
  208. android:layout_width="match_parent"
  209. android:layout_height="wrap_content"
  210. android:layout_marginBottom="8dp"
  211. android:layout_marginTop="8dp"
  212. android:orientation="horizontal"
  213. app:layout_constraintBottom_toBottomOf="parent"
  214. app:layout_constraintEnd_toEndOf="parent"
  215. app:layout_constraintStart_toStartOf="parent"
  216. app:layout_constraintTop_toBottomOf="@+id/week_count_temple_title">
  217.  
  218. <LinearLayout
  219. android:layout_width="0dp"
  220. android:layout_height="match_parent"
  221. android:layout_weight="1"
  222. android:gravity="center_horizontal"
  223. android:orientation="vertical">
  224.  
  225. <TextView
  226. android:layout_width="wrap_content"
  227. android:layout_height="wrap_content"
  228. android:text="@{historyViewModel.weekDrop}"
  229. android:textColor="@color/main_background"
  230. android:textSize="@dimen/hisotry_card_value_size" />
  231.  
  232. <TextView
  233. android:layout_width="wrap_content"
  234. android:layout_height="wrap_content"
  235. android:gravity="center"
  236. android:text="実のドロップ数"
  237. android:textSize="@dimen/history_card_title_size" />
  238.  
  239.  
  240. </LinearLayout>
  241.  
  242. <LinearLayout
  243. android:layout_width="0dp"
  244. android:layout_height="match_parent"
  245. android:layout_weight="1"
  246. android:gravity="center_horizontal"
  247. android:orientation="vertical">
  248.  
  249. <TextView
  250. android:layout_width="wrap_content"
  251. android:layout_height="wrap_content"
  252. android:text="@{historyViewModel.weekSpecialDrop}"
  253. android:textColor="@color/main_background"
  254. android:textSize="@dimen/hisotry_card_value_size" />
  255.  
  256. <TextView
  257. android:layout_width="wrap_content"
  258. android:layout_height="wrap_content"
  259. android:gravity="center"
  260. android:text="特急のドロップ数"
  261. android:textSize="@dimen/history_card_title_size" />
  262.  
  263.  
  264. </LinearLayout>
  265.  
  266. <LinearLayout
  267. android:layout_width="0dp"
  268. android:layout_height="match_parent"
  269. android:layout_weight="1"
  270. android:gravity="center_horizontal"
  271. android:orientation="vertical">
  272.  
  273. <TextView
  274. android:layout_width="wrap_content"
  275. android:layout_height="wrap_content"
  276. android:text="@{historyViewModel.weekSpecialPercent}"
  277. android:textColor="@color/main_background"
  278. android:textSize="@dimen/hisotry_card_value_size" />
  279.  
  280. <TextView
  281. android:layout_width="wrap_content"
  282. android:layout_height="wrap_content"
  283. android:text="特急のドロップ率"
  284. android:textSize="@dimen/history_card_title_size" />
  285.  
  286.  
  287. </LinearLayout>
  288. </LinearLayout>
  289.  
  290. </android.support.constraint.ConstraintLayout>
  291. </android.support.v7.widget.CardView>
  292.  
  293. <!--<com.github.mikephil.charting.charts.LineChart-->
  294. <!--android:layout_width="match_parent"-->
  295. <!--android:layout_height="400dp"-->
  296. <!--android:layout_marginTop="8dp"-->
  297. <!--android:lineChart="@{historyViewModel.lineData}"-->
  298. <!--android:lineLabels="@{historyViewModel.labels}"-->
  299. <!--app:layout_constraintEnd_toEndOf="parent"-->
  300. <!--app:layout_constraintStart_toStartOf="parent"-->
  301. <!--app:layout_constraintTop_toBottomOf="@+id/week_card_view" />-->
  302.  
  303. <!--<android.support.v4.widget.SwipeRefreshLayout-->
  304. <!--android:layout_width="match_parent"-->
  305. <!--android:layout_height="match_parent"-->
  306. <!--app:onRefreshListener="@{() -> historyViewModel.onRefresh()}"-->
  307. <!--app:refreshing="@{historyViewModel.refreshLayoutLoading}">-->
  308.  
  309. <!--<android.support.v7.widget.RecyclerView-->
  310. <!--android:id="@+id/history_recycler_view"-->
  311. <!--android:layout_width="match_parent"-->
  312. <!--android:layout_height="match_parent" />-->
  313. <!--</android.support.v4.widget.SwipeRefreshLayout>-->
  314. </android.support.constraint.ConstraintLayout>
  315. </ScrollView>
  316. </layout>