page_1.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:orientation="vertical">
  7. <android.support.v7.widget.Toolbar
  8. android:id="@+id/toolbar"
  9. android:layout_width="match_parent"
  10. android:layout_height="wrap_content"
  11. android:background="?attr/colorPrimary"
  12. android:minHeight="?attr/actionBarSize"
  13. android:theme="?attr/actionBarTheme"
  14. app:layout_constraintEnd_toEndOf="parent"
  15. app:layout_constraintStart_toStartOf="parent"
  16. app:layout_constraintTop_toTopOf="parent">
  17. <RelativeLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="wrap_content">
  20. <TextView
  21. android:id="@+id/textView"
  22. android:layout_width="wrap_content"
  23. android:layout_height="wrap_content"
  24. android:layout_centerHorizontal="true"
  25. android:text="@string/app_name"
  26. android:textColor="@android:color/white"
  27. android:textSize="18sp"
  28. android:textStyle="bold" />
  29. <com.joanzapata.iconify.widget.IconTextView
  30. android:id="@+id/search"
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:layout_alignParentEnd="true"
  34. android:layout_alignParentRight="true"
  35. android:layout_centerVertical="true"
  36. android:layout_marginEnd="16dp"
  37. android:layout_marginRight="16dp"
  38. android:text="{fa-search 20sp}"
  39. android:textColor="@android:color/white" />
  40. </RelativeLayout>
  41. </android.support.v7.widget.Toolbar>
  42. <android.support.v4.widget.SwipeRefreshLayout
  43. android:id="@+id/mainRefreshLayout"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content"
  46. app:layout_constraintBottom_toTopOf="@id/view"
  47. app:layout_constraintEnd_toEndOf="parent"
  48. app:layout_constraintStart_toStartOf="parent"
  49. app:layout_constraintTop_toBottomOf="@+id/toolbar">
  50. <ScrollView
  51. android:layout_width="match_parent"
  52. android:layout_height="match_parent">
  53. <LinearLayout
  54. android:layout_width="match_parent"
  55. android:layout_height="wrap_content"
  56. android:orientation="vertical">
  57. <cn.bingoogolapple.bgabanner.BGABanner
  58. android:id="@+id/mainBanner"
  59. android:layout_width="match_parent"
  60. android:layout_height="200dp"
  61. app:banner_pageChangeDuration="1000"
  62. app:banner_pointAutoPlayAble="true"
  63. app:banner_pointContainerBackground="@android:color/transparent"
  64. app:banner_pointDrawable="@drawable/bga_banner_selector_point_hollow"
  65. app:banner_pointTopBottomMargin="15dp"
  66. app:banner_tipTextColor="@android:color/black"
  67. app:banner_tipTextSize="16sp"
  68. app:banner_transitionEffect="alpha" />
  69. <com.joanzapata.iconify.widget.IconTextView
  70. android:id="@+id/notification"
  71. android:layout_width="match_parent"
  72. android:layout_height="wrap_content"
  73. android:layout_marginStart="16dp"
  74. android:layout_marginLeft="16dp"
  75. android:layout_marginTop="16dp"
  76. android:layout_marginEnd="16dp"
  77. android:layout_marginRight="16dp"
  78. android:padding="4dp"
  79. android:text="{fa-bell} 重要通知:在这里"
  80. android:textColor="@android:color/black" />
  81. <RelativeLayout
  82. android:id="@+id/courseHot"
  83. android:layout_width="match_parent"
  84. android:layout_height="wrap_content"
  85. android:layout_marginStart="16dp"
  86. android:layout_marginLeft="16dp"
  87. android:layout_marginTop="16dp"
  88. android:layout_marginEnd="16dp"
  89. android:layout_marginRight="16dp"
  90. android:padding="8dp">
  91. <TextView
  92. android:id="@+id/courseHotTitle"
  93. android:layout_width="wrap_content"
  94. android:layout_height="wrap_content"
  95. android:text="热门课程推荐"
  96. android:textColor="@android:color/black"
  97. android:textStyle="bold" />
  98. <TextView
  99. android:id="@+id/courseHotTip"
  100. android:layout_width="wrap_content"
  101. android:layout_height="wrap_content"
  102. android:layout_alignParentEnd="true"
  103. android:layout_alignParentRight="true"
  104. android:text="+123 more"
  105. android:textColor="@android:color/black" />
  106. <android.support.v7.widget.RecyclerView
  107. android:id="@+id/courseHotView"
  108. android:layout_width="match_parent"
  109. android:layout_height="wrap_content"
  110. android:layout_below="@+id/courseHotTitle"
  111. android:layout_marginTop="8dp" />
  112. </RelativeLayout>
  113. <RelativeLayout
  114. android:id="@+id/courseExcellent"
  115. android:layout_width="match_parent"
  116. android:layout_height="wrap_content"
  117. android:layout_marginStart="16dp"
  118. android:layout_marginLeft="16dp"
  119. android:layout_marginTop="16dp"
  120. android:layout_marginEnd="16dp"
  121. android:layout_marginRight="16dp"
  122. android:padding="8dp">
  123. <TextView
  124. android:id="@+id/courseExcellentTitle"
  125. android:layout_width="wrap_content"
  126. android:layout_height="wrap_content"
  127. android:text="名师课程推荐"
  128. android:textColor="@android:color/black"
  129. android:textStyle="bold" />
  130. <TextView
  131. android:id="@+id/courseExcellentTip"
  132. android:layout_width="wrap_content"
  133. android:layout_height="wrap_content"
  134. android:layout_alignParentEnd="true"
  135. android:layout_alignParentRight="true"
  136. android:text="+123 more"
  137. android:textColor="@android:color/black" />
  138. <android.support.v7.widget.RecyclerView
  139. android:id="@+id/courseExcellentView"
  140. android:layout_width="match_parent"
  141. android:layout_height="wrap_content"
  142. android:layout_below="@+id/courseExcellentTitle"
  143. android:layout_marginTop="8dp" />
  144. </RelativeLayout>
  145. <View
  146. android:layout_width="match_parent"
  147. android:layout_height="16dp" />
  148. </LinearLayout>
  149. </ScrollView>
  150. </android.support.v4.widget.SwipeRefreshLayout>
  151. </LinearLayout>