item_free_training.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. xmlns:tools="http://schemas.android.com/tools"
  5. tools:ignore="ResourceName">
  6. <data>
  7. <variable
  8. name="data"
  9. type="com.yingyang.workbenches.entity.Record" />
  10. </data>
  11. <androidx.cardview.widget.CardView
  12. android:id="@+id/gameLayout"
  13. android:layout_width="@dimen/divider_184px"
  14. android:layout_height="@dimen/divider_249px"
  15. android:layout_marginTop="@dimen/divider_32px"
  16. app:cardCornerRadius="@dimen/divider_20px">
  17. <androidx.constraintlayout.widget.ConstraintLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="match_parent">
  20. <androidx.appcompat.widget.AppCompatImageView
  21. android:layout_width="match_parent"
  22. android:layout_height="match_parent"
  23. android:background="@mipmap/icon_game"
  24. app:isCircle="@{false}"
  25. app:layout_constraintBottom_toBottomOf="parent"
  26. app:layout_constraintLeft_toLeftOf="parent"
  27. app:layout_constraintRight_toRightOf="parent"
  28. app:layout_constraintTop_toTopOf="parent"
  29. app:loadHeadImg="@{data.gameCoverImage}" />
  30. <androidx.appcompat.widget.AppCompatTextView
  31. android:id="@+id/tvTitle"
  32. android:layout_width="@dimen/divider_133px"
  33. android:layout_height="@dimen/divider_34px"
  34. android:layout_marginTop="@dimen/divider_9px"
  35. android:background="@drawable/bg_train_title"
  36. android:gravity="center"
  37. android:text="@{data.gameType}"
  38. android:textColor="@color/color_FF416AFF"
  39. android:textSize="@dimen/divider_18px"
  40. app:layout_constraintLeft_toLeftOf="parent"
  41. app:layout_constraintRight_toRightOf="parent"
  42. app:layout_constraintTop_toTopOf="parent"
  43. tools:text="@string/accumulated_training_duration" />
  44. <androidx.appcompat.widget.AppCompatTextView
  45. android:id="@+id/tvTimes"
  46. android:layout_width="match_parent"
  47. android:layout_height="@dimen/divider_34px"
  48. android:layout_marginTop="@dimen/divider_9px"
  49. android:background="@drawable/bg_train_times"
  50. android:gravity="center"
  51. android:text='@{"累计训练"+data.currentLevel+"次"}'
  52. android:textColor="@android:color/white"
  53. android:textSize="@dimen/divider_18px"
  54. app:layout_constraintBottom_toTopOf="@+id/tvName"
  55. app:layout_constraintLeft_toLeftOf="parent"
  56. app:layout_constraintRight_toRightOf="parent"
  57. tools:text="@string/accumulated_training_duration" />
  58. <androidx.appcompat.widget.AppCompatTextView
  59. android:id="@+id/tvName"
  60. android:layout_width="match_parent"
  61. android:layout_height="@dimen/divider_45px"
  62. android:layout_marginTop="@dimen/divider_9px"
  63. android:background="@color/color_FF416AFF"
  64. android:gravity="center"
  65. android:text="@{data.gameName}"
  66. android:textColor="@android:color/white"
  67. android:textSize="@dimen/divider_24px"
  68. android:textStyle="bold"
  69. app:layout_constraintBottom_toBottomOf="parent"
  70. app:layout_constraintLeft_toLeftOf="parent"
  71. app:layout_constraintRight_toRightOf="parent"
  72. tools:text="@string/accumulated_training_duration" />
  73. </androidx.constraintlayout.widget.ConstraintLayout>
  74. </androidx.cardview.widget.CardView>
  75. </layout>