item_free_training.xml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <com.google.android.material.card.MaterialCardView
  12. android:id="@+id/gameLayout"
  13. android:layout_width="@dimen/divider_195px"
  14. android:layout_height="@dimen/divider_289px"
  15. android:layout_marginTop="@dimen/divider_32px"
  16. android:theme="@style/Theme.MaterialComponents.NoActionBar"
  17. app:cardBackgroundColor="@color/color_FFFFB841"
  18. app:cardCornerRadius="@dimen/divider_38px">
  19. <FrameLayout
  20. android:layout_width="match_parent"
  21. android:layout_height="match_parent">
  22. <androidx.constraintlayout.widget.ConstraintLayout
  23. android:layout_width="match_parent"
  24. android:layout_height="match_parent">
  25. <com.google.android.material.card.MaterialCardView
  26. android:id="@+id/cardImage"
  27. android:layout_width="@dimen/divider_185px"
  28. android:layout_height="@dimen/divider_185px"
  29. android:layout_marginTop="@dimen/divider_5px"
  30. android:theme="@style/Theme.MaterialComponents.NoActionBar"
  31. app:cardCornerRadius="@dimen/divider_36px"
  32. app:layout_constraintLeft_toLeftOf="parent"
  33. app:layout_constraintRight_toRightOf="parent"
  34. app:layout_constraintTop_toTopOf="parent"
  35. app:strokeColor="@android:color/white"
  36. app:strokeWidth="@dimen/divider_4px">
  37. <androidx.appcompat.widget.AppCompatImageView
  38. android:id="@+id/gameImage"
  39. android:layout_width="match_parent"
  40. android:layout_height="match_parent"
  41. android:scaleType="centerCrop" />
  42. </com.google.android.material.card.MaterialCardView>
  43. <LinearLayout
  44. android:layout_width="match_parent"
  45. android:layout_height="0dp"
  46. android:layout_marginStart="@dimen/divider_5px"
  47. android:layout_marginTop="@dimen/divider_10px"
  48. android:layout_marginEnd="@dimen/divider_5px"
  49. android:layout_marginBottom="@dimen/divider_10px"
  50. android:background="@drawable/bg_free_train_buttom_game"
  51. android:gravity="center"
  52. android:orientation="horizontal"
  53. app:layout_constraintBottom_toBottomOf="parent"
  54. app:layout_constraintLeft_toLeftOf="parent"
  55. app:layout_constraintRight_toRightOf="parent"
  56. app:layout_constraintTop_toBottomOf="@+id/cardImage">
  57. <TextView
  58. android:layout_width="match_parent"
  59. android:layout_height="wrap_content"
  60. android:gravity="center"
  61. android:text="@{data.gameName}"
  62. android:textColor="@color/color_FFA02C"
  63. android:textSize="@dimen/divider_22px"
  64. android:textStyle="bold" />
  65. </LinearLayout>
  66. </androidx.constraintlayout.widget.ConstraintLayout>
  67. <TextView
  68. android:id="@+id/tvType"
  69. android:layout_width="@dimen/divider_105px"
  70. android:layout_height="@dimen/divider_46px"
  71. android:layout_gravity="center_horizontal"
  72. android:layout_marginTop="@dimen/divider_21px"
  73. android:background="@mipmap/icon_free_train_top_game"
  74. android:gravity="center"
  75. android:text="@{data.gameType}"
  76. android:textColor="@android:color/white"
  77. android:textSize="@dimen/divider_18px"
  78. android:textStyle="bold"
  79. app:layout_constraintLeft_toLeftOf="parent"
  80. app:layout_constraintRight_toRightOf="parent"
  81. app:layout_constraintTop_toTopOf="parent" />
  82. </FrameLayout>
  83. </com.google.android.material.card.MaterialCardView>
  84. </layout>